這幾天在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
0b7c21000-b7d00000 ---p b7c21000 00:00
0b7dd1000-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
0b7ddd000-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
0b7f0b000-b7f0c000 rwxp b7f0b000 00:00
0b7f0c000-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
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.
#00xffffe410 in __kernel_vsyscall ()
(gdb) where
#00xffffe410 in __kernel_vsyscall ()
#10xb7e058d0 in raise () from /lib/libc.so.6
#20xb7e06ff3 in abort () from /lib/libc.so.6
#30xb7e3b32b in __libc_message () from /lib/libc.so.6
#40xb7e40cb1 in malloc_printerr () from /lib/libc.so.6
#50xb7e42314 in free () from /lib/libc.so.6
#60x0805cd09 in mgmt_term_env ()
#70x0804e120 in agent_shutdown ()
#80x0804b275 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引數起什麼影響?
奇怪奇怪的問題
由於需求,我自己寫了乙個mydialog extends dialog 在dialog裡面寫了乙個handler,用來更新dialog上的字。第二次更新介面,需要dialog比第一次變大點。可是dialog在activity裡面顯示,如果activity不掛後台的話,更新很正常。但是我把activi...
奇怪的比賽
某電視台舉辦了低碳生活大獎賽。題目的計分規則相當奇怪 每位選手需要回答10個問題 其編號為1到10 越後面越有難度。答對的,當前分數翻倍 答錯了則扣掉與題號相同的分數 選手必須回答問題,不回答按錯誤處理 每位選手都有乙個起步的分數為10分。某獲勝選手最終得分剛好是100分,如果不讓你看比賽過程,你能...
奇怪的比賽
include include include include include includeusing namespace std const int target 100 int globalcnt 0 int cnt 11 int next int id,int cur 開始答第id道題 in...