这几天在suse10下面配置oracle的enterprise manager的时候,master peer起不来,在rhel3下面一点问题都没有
起来的时候出错:
- stat:/opt/oracle/product/9.2.0/network/snmp/peer # ./master_peer CONFIG.master NOV
- Setup select/poll problem: Bad file descriptor
- ./master_peer: error processing configuration
- *** glibc detected *** ./master_peer: double free or corruption (fasttop): 0x0807d948 ***
- ======= Backtrace: =========
- /lib/libc.so.6[0xb7e40cb1]
- /lib/libc.so.6(__libc_free+0x84)[0xb7e42314]
- ./master_peer[0x805cd09]
- ./master_peer[0x804e120]
- ./master_peer[0x804b275]
- /lib/libc.so.6(__libc_start_main+0xdc)[0xb7df287c]
- ./master_peer(_IO_getc+0x41)[0x8048dc1]
- ======= Memory map: ========
- 08048000-08066000 r-xp 00000000 68:03 97956 /opt/oracle/product/9.2.0/network/snmp/peer/master_peer
- 08066000-08067000 rwxp 0001d000 68:03 97956 /opt/oracle/product/9.2.0/network/snmp/peer/master_peer
- 08067000-0809e000 rwxp 08067000 00:00 0 [heap]
- b7b9c000-b7bd1000 r-xs 00000000 68:02 1183412 /var/run/nscd/dbVtklvZ (deleted)
- b7bd1000-b7bd9000 r-xp 00000000 68:02 738756 /lib/libnss_files-2.4.so
- b7bd9000-b7bdb000 rwxp 00007000 68:02 738756 /lib/libnss_files-2.4.so
- b7c00000-b7c21000 rwxp b7c00000 00:00 0
- b7c21000-b7d00000 ---p b7c21000 00:00 0
- b7dd1000-b7ddb000 r-xp 00000000 68:02 738781 /lib/libgcc_s.so.1
- b7ddb000-b7ddc000 rwxp 00009000 68:02 738781 /lib/libgcc_s.so.1
- b7ddc000-b7ddd000 rwxp b7ddc000 00:00 0
- b7ddd000-b7ef8000 r-xp 00000000 68:02 738739 /lib/libc-2.4.so
- b7ef8000-b7efa000 r-xp 0011a000 68:02 738739 /lib/libc-2.4.so
- b7efa000-b7efc000 rwxp 0011c000 68:02 738739 /lib/libc-2.4.so
- b7efc000-b7eff000 rwxp b7efc000 00:00 0
- b7f0b000-b7f0c000 rwxp b7f0b000 00:00 0
- b7f0c000-b7f26000 r-xp 00000000 68:02 738732 /lib/ld-2.4.so
- b7f26000-b7f28000 rwxp 0001a000 68:02 738732 /lib/ld-2.4.so
- bff5e000-bff73000 rwxp bff5e000 00:00 0 [stack]
- ffffe000-fffff000 ---p 00000000 00:00 0 [vdso]
- Aborted (core dumped)
- stat:/opt/oracle/product/9.2.0/network/snmp/peer #
查看core文件
- stat:/opt/oracle/product/9.2.0/network/snmp/peer # gdb master_peer core
- GNU gdb 6.6
- Copyright (C) 2006 Free Software Foundation, Inc.
- GDB is free software, covered by the GNU General Public License, and you are
- welcome to change it and/or distribute copies of it under certain conditions.
- Type "show copying" to see the conditions.
- There is absolutely no warranty for GDB. Type "show warranty" for details.
- This GDB was configured as "i586-suse-linux"...
- Using host libthread_db library "/lib/libthread_db.so.1".
-
- warning: Can't read pathname for load map: Input/output error.
- Reading symbols from /lib/libc.so.6...done.
- Loaded symbols for /lib/libc.so.6
- Reading symbols from /lib/ld-linux.so.2...done.
- Loaded symbols for /lib/ld-linux.so.2
- Reading symbols from /lib/libnss_files.so.2...done.
- Loaded symbols for /lib/libnss_files.so.2
- Reading symbols from /lib/libgcc_s.so.1...done.
- Loaded symbols for /lib/libgcc_s.so.1
- Core was generated by `./master_peer CONFIG.master NOV'.
- Program terminated with signal 6, Aborted.
- #0 0xffffe410 in __kernel_vsyscall ()
- (gdb) where
- #0 0xffffe410 in __kernel_vsyscall ()
- #1 0xb7e058d0 in raise () from /lib/libc.so.6
- #2 0xb7e06ff3 in abort () from /lib/libc.so.6
- #3 0xb7e3b32b in __libc_message () from /lib/libc.so.6
- #4 0xb7e40cb1 in malloc_printerr () from /lib/libc.so.6
- #5 0xb7e42314 in free () from /lib/libc.so.6
- #6 0x0805cd09 in mgmt_term_env ()
- #7 0x0804e120 in agent_shutdown ()
- #8 0x0804b275 in main ()
- (gdb)
进程起来的时候怎么调用了agent_shutdown 函数?
master_peer.out显示错误:
Setup select/poll problem: Bad file descriptor
./master_peer: error processing configuration
在metalink下找到一个文章,需要设置把ulimit -n 2048,尝试设置成2048,还是不行,实在没办法,推出crt登陆,直接进root下,再尝试启动master_peer,居然起来了
观察了一下,直接进root的时候ulimit -n的值是1024,而进oracle后再su到root的话,ulimit -n的值是65536,原来问题真的出在open files上面,metalink还是对的,只是suse10下面要设置1024才行,rhel3上面设置成8192都没问题
是跟操作系统内核还是什么有关?这个open files参数起什么影响?