Hi Thomas ,

I've succeeded to reconstruct the problem in Net-SNMP 5.4.2.1, attached
the agentx crash log .

I'll explain the scenario : the agnetx access to one of our table
because of getbulk request ( in snmp walk we don't crash,) in this mode
when our  table include string index that longer than 13 bytes ( in our
case 15 bytes ) the agentx crash.

I've also attached  the agentx log .

Thanks

Kobi 


Interrupt handler was triggered

TID:               3810
Thread ID          1442044704
Caught Signal      1
Fault Address:     0x21fc
Errno value:       Success
Exception:         Debug request - do bt on stack
SCOS Thread name   SNMP agentx Task

############ end stack trace    ############
/pkg/scos/scos-main(_ZN10StackUtils27doStackTraceOnCurrentThreadEi+0x3c)
[0x1045efc8]
/pkg/scos/scos-main(_ZN21SignalHandlingManager7loggingEiiiNS_7Logging4Ty
peEP7siginfoPv+0x1c4)[0x104588b4]
/pkg/scos/scos-main(_ZN21SignalHandlingManager19callbackStartSignalEiP7s
iginfoPv+0x90)[0x10458cf4]
/pkg/scos/scos-main(_ZN14SignalHandling19defaultFaultHandlerEiP7siginfoP
v+0x1b0)[0x10458038]
[0x100380]
/lib/tls/libpthread.so.0(sem_wait+0x64)[0xfb31844]
/pkg/scos/scos-main(_ZN19CountLimitSemaphore4takeEi+0x274)[0x1043695c]
/pkg/scos/scos-main(SANB_SemTake+0x28)[0x104371bc]
/pkg/scos/scos-main(_ZN21SignalHandlingManager20callbackFinishSignalEiP7
siginfoPv+0xc0)[0x104585f8]
/pkg/scos/scos-main(_ZN14SignalHandling19defaultFaultHandlerEiP7siginfoP
v+0x194)[0x1045801c]
[0x100380]
[0x12590498]
/lib/tls/libc.so.6[0xfa43cbc]
/lib/tls/libc.so.6(cfree+0xcc)[0xfa46800]
/pkg/net-snmp/lib/libnetsnmp.so.15(_sess_read+0x6cc)[0xfd84060]
/pkg/net-snmp/lib/libnetsnmp.so.15(snmp_sess_read+0x2c)[0xfd84768]
/pkg/net-snmp/lib/libnetsnmp.so.15(snmp_read+0x44)[0xfd847e8]
/pkg/net-snmp/lib/libnetsnmpagent.so.15(agent_check_and_process+0xcc)[0x
fe68c64]
/pkg/scos/scos-main(_ZN10SNMPAgentx10mainThreadEv+0x214)[0x10de760c]
/pkg/scos/scos-main(_Z13spawnEnvelopeP8Envelope+0x2e4)[0x1043f7e0]
/lib/tls/libpthread.so.0[0xfb2b980]
/lib/tls/libc.so.6(clone+0x5c)[0xfa9911c]

############ start stack trace  ############



############ start log named registers  ############
NIP   : 0x113f2ec0
MSR   : 0xfb31860
ORIG_GPPR3 : 0x200d032
CTR   : 0x53cefda8
LINK  : 0x104366e8
XER   : 0xfb31844
CCR   : 0x0
MQ    : 0x38844448
TRAP  : 0x0
DAR   : 0xc00
DSISR : 0xc
Register[0] = 0xdd
Register[1] = 0x55f3c9f0
Register[2] = 0x55f44f80
Register[3] = 0x4
Register[4] = 0x0
Register[5] = 0x0
Register[6] = 0x0
Register[7] = 0x11bc5138
Register[8] = 0x11bc2444
Register[9] = 0x2
Register[10] = 0x55f3db78
Register[11] = 0x0
Register[12] = 0x10436908
Register[13] = 0x117a9a60
Register[14] = 0x1196d190
Register[15] = 0x11540000
Register[16] = 0x55f3d3b0
Register[17] = 0x55f3d3a0
Register[18] = 0x11960000
Register[19] = 0x11978540
Register[20] = 0x11961d78
Register[21] = 0x117a0000
Register[22] = 0x11960000
Register[23] = 0x0
Register[24] = 0x10000
Register[25] = 0x123f4638
Register[26] = 0x0
Register[27] = 0x53cefae0
Register[28] = 0x117a0000
Register[29] = 0x0
Register[30] = 0xfb48020
Register[31] = 0x53cefda8


############ end  registers logging    ############

Return value is: 0 = 0x0.
SCE8000#>                

Information that we use the latest Net-SNMP 5.4.2:

[EMAIL PROTECTED] /apps/var/net-snmp]#>pgrep snmpd
4157
[EMAIL PROTECTED] /apps/var/net-snmp]#>cd /proc/4157 [EMAIL PROTECTED]
/proc/4157]#>ll total 0
-r--------  1 root root 0 Nov 26 14:24 auxv
-r--r--r--  1 root root 0 Nov 26 14:01 cmdline lrwxrwxrwx  1 root root 0
Nov 26 14:24 cwd -> /
-r--------  1 root root 0 Nov 26 14:24 environ lrwxrwxrwx  1 root root 0
Nov 26 14:24 exe -> /apps/data/dd/packages/net-snmp.6/bin/snmpd
dr-x------  2 root root 0 Nov 26 14:24 fd
-r--r--r--  1 root root 0 Nov 26 14:24 maps
-rw-------  1 root root 0 Nov 26 14:24 mem
-r--r--r--  1 root root 0 Nov 26 14:24 mounts
-r--------  1 root root 0 Nov 26 14:24 mountstats
-rw-r--r--  1 root root 0 Nov 26 14:24 oom_adj
-r--r--r--  1 root root 0 Nov 26 14:24 oom_score lrwxrwxrwx  1 root root
0 Nov 26 14:24 root -> /
-r--r--r--  1 root root 0 Nov 26 14:24 smaps
-r--r--r--  1 root root 0 Nov 26 14:01 stat
-r--r--r--  1 root root 0 Nov 26 14:01 statm
-r--r--r--  1 root root 0 Nov 26 14:01 status dr-xr-xr-x  3 root root 0
Nov 26 14:24 task
-r--r--r--  1 root root 0 Nov 26 14:24 wchan [EMAIL PROTECTED]
/proc/4157]#>cd cat maps
-bash: cd: cat: No such file or directory [EMAIL PROTECTED] /proc/4157]#>cat
maps 00100000-00103000 r-xp 00100000 00:00 0 
0fa91000-0fbb7000 r-xp 00000000 03:02 48986      /lib/tls/libc-2.3.3.so
0fbb7000-0fbc1000 ---p 00126000 03:02 48986      /lib/tls/libc-2.3.3.so
0fbc1000-0fbc6000 rwxp 00120000 03:02 48986      /lib/tls/libc-2.3.3.so
0fbc6000-0fbcd000 r--p 00125000 03:02 48986      /lib/tls/libc-2.3.3.so
0fbcd000-0fbd1000 rwxp 0012c000 03:02 48986      /lib/tls/libc-2.3.3.so
0fbd1000-0fbd3000 rwxp 0fbd1000 00:00 0 
0fbe3000-0fcf0000 r-xp 00000000 03:02 18082
/usr/lib/libcrypto.so.0.9.7
0fcf0000-0fcf3000 ---p 0010d000 03:02 18082
/usr/lib/libcrypto.so.0.9.7
0fcf3000-0fd11000 rwxp 00100000 03:02 18082
/usr/lib/libcrypto.so.0.9.7
0fd11000-0fd15000 rwxp 0fd11000 00:00 0 
0fd25000-0fd27000 r-xp 00000000 03:02 48992      /lib/tls/libdl-2.3.3.so
0fd27000-0fd35000 ---p 00002000 03:02 48992      /lib/tls/libdl-2.3.3.so
0fd35000-0fd36000 rwxp 00000000 03:02 48992      /lib/tls/libdl-2.3.3.so
0fd36000-0fd37000 r--p 00001000 03:02 48992      /lib/tls/libdl-2.3.3.so
0fd37000-0fd38000 rwxp 00002000 03:02 48992      /lib/tls/libdl-2.3.3.so
0fd48000-0fdd1000 r-xp 00000000 03:05 110382
/apps/data/dd/packages/net-snmp.6/lib/libnetsnmp.so.15
0fdd1000-0fdd8000 ---p 00089000 03:05 110382
/apps/data/dd/packages/net-snmp.6/lib/libnetsnmp.so.15
0fdd8000-0fde4000 rwxp 00080000 03:05 110382
/apps/data/dd/packages/net-snmp.6/lib/libnetsnmp.so.15
0fde4000-0fe05000 rwxp 0fde4000 00:00 0 
0fe15000-0ff0b000 r-xp 00000000 03:05 110385
/apps/data/dd/packages/net-snmp.6/lib/libnetsnmpmibs.so.15
0ff0b000-0ff15000 ---p 000f6000 03:05 110385
/apps/data/dd/packages/net-snmp.6/lib/libnetsnmpmibs.so.15
0ff15000-0ff26000 rwxp 000f0000 03:05 110385
/apps/data/dd/packages/net-snmp.6/lib/libnetsnmpmibs.so.15
0ff26000-0ff55000 rwxp 0ff26000 00:00 0 
0ff65000-0ff86000 r-xp 00000000 03:05 110384
/apps/data/dd/packages/net-snmp.6/lib/libnetsnmphelpers.so.15
0ff86000-0ff95000 ---p 00021000 03:05 110384
/apps/data/dd/packages/net-snmp.6/lib/libnetsnmphelpers.so.15
0ff95000-0ff97000 rwxp 00020000 03:05 110384
/apps/data/dd/packages/net-snmp.6/lib/libnetsnmphelpers.so.15
0ffa7000-0ffdd000 r-xp 00000000 03:05 110383
/apps/data/dd/packages/net-snmp.6/lib/libnetsnmpagent.so.15
0ffdd000-0ffe7000 ---p 00036000 03:05 110383
/apps/data/dd/packages/net-snmp.6/lib/libnetsnmpagent.so.15
0ffe7000-0ffef000 rwxp 00030000 03:05 110383
/apps/data/dd/packages/net-snmp.6/lib/libnetsnmpagent.so.15
0ffef000-0fff0000 rwxp 0ffef000 00:00 0 
10000000-10006000 r-xp 00000000 03:05 110378
/apps/data/dd/packages/net-snmp.6/bin/snmpd
10015000-10016000 rwxp 00005000 03:05 110378
/apps/data/dd/packages/net-snmp.6/bin/snmpd
10016000-10180000 rwxp 10016000 00:00 0          [heap]
30000000-30018000 r-xp 00000000 03:02 48978      /lib/ld-2.3.3.so
30018000-3001c000 rw-p 30018000 00:00 0 
30027000-30028000 r--p 00017000 03:02 48978      /lib/ld-2.3.3.so
30028000-30029000 rwxp 00018000 03:02 48978      /lib/ld-2.3.3.so
7f918000-7f96a000 rw-p 7f918000 00:00 0       

-----Original Message-----
From: Kobi Vaknin (kvaknin)
Sent: Wednesday, November 26, 2008 10:47 AM
To: '[email protected]'
Subject: RE: Net-SNMP 5.3.1 sub agent crash on long string index

Thanks Tomas .

I've already check the list and the only thing which was look connected
to the problem was patch 1944581.


Attached the  the agentx transactions log  and the crash dump , maybe it
can help in understanding the problem.

This are the last lines in the agentx log before the crash , you can see
that the last type was integer although we validate that the root cause
is the long string index during get bulk:


race:
/auto/srg-sce-swinfra-usr/emb/users/kvaknin/work/Emb/V3.1.6S/Source/Cont
rolCard/Management/MIBs/Source/Linux/cscRdrCategoryDestTable.cpp, 238:
cscRdrCategoryDestTable: Varbind
SNMPv2-SMI::enterprises.9.9.637.1.4.1.1.10.1.33000.15.49.57.53.46.49.51.
48.46.49.53.56.46.49.51.54
trace:
/auto/srg-sce-swinfra-usr/emb/users/kvaknin/work/Emb/V3.1.6S/Source/Cont
rolCard/Management/MIBs/Source/Linux/cscRdrCategoryDestTable.cpp, 241:
cscRdrCategoryDestTable: Colnum 1
trace:
/auto/srg-sce-swinfra-usr/emb/users/kvaknin/work/Emb/V3.1.6S/Source/Cont
rolCard/Management/MIBs/Source/Linux/cscRdrCategoryDestTable.cpp, 261:
cscRdrCategoryDestTable: handler finished
trace: netsnmp_call_handler(): agent_handler.c, 431:
handler:returned: handler cscRdrCategoryDestTable returned 0
trace: netsnmp_call_handler(): agent_handler.c, 431:
handler:returned: handler table returned 0
trace: netsnmp_handle_request(): snmp_agent.c, 3055:
results: request results (status = 0):
trace: netsnmp_handle_request(): snmp_agent.c, 3058:
results:        trace: sprint_realloc_by_type(): mib.c, 1977:
output: sprint_by_type, type 2
SNMPv2-SMI::enterprises.9.9.637.1.4.1.1.10.1.33000.15.49.57.53.46.49.51.
48.46.49.53.56.46.49.51.54 = INTEGER: 50



Crash dump :


TID:               3679
Thread ID          1442200352
Caught Signal      1
Fault Address:     0x49d9
Errno value:       Success
Exception:         Debug request - do bt on stack
SCOS Thread name   SNMP agentx Task

############ end stack trace    ############
/pkg/scos/scos-main(_ZN10StackUtils27doStackTraceOnCurrentThreadEi+0x3c)
[0x1045efc8]
/pkg/scos/scos-main(_ZN21SignalHandlingManager7loggingEiiiNS_7Logging4Ty
peEP7siginfoPv+0x1c4)[0x104588b4]
/pkg/scos/scos-main(_ZN21SignalHandlingManager19callbackStartSignalEiP7s
iginfoPv+0x90)[0x10458cf4]
/pkg/scos/scos-main(_ZN14SignalHandling19defaultFaultHandlerEiP7siginfoP
v+0x1b0)[0x10458038]
[0x100380]
/lib/tls/libpthread.so.0(sem_wait+0x64)[0xfb52844]
/pkg/scos/scos-main(_ZN19CountLimitSemaphore4takeEi+0x274)[0x1043695c]
/pkg/scos/scos-main(SANB_SemTake+0x28)[0x104371bc]
/pkg/scos/scos-main(_ZN21SignalHandlingManager20callbackFinishSignalEiP7
siginfoPv+0xc0)[0x104585f8]
/pkg/scos/scos-main(_ZN14SignalHandling19defaultFaultHandlerEiP7siginfoP
v+0x194)[0x1045801c]
[0x100380]
[0x1258a700]
/lib/tls/libc.so.6[0xfa64cbc]
/lib/tls/libc.so.6(cfree+0xcc)[0xfa67800]
/pkg/net-snmp/lib/libnetsnmp.so.10(_sess_read+0x708)[0xfda40a8]
/pkg/net-snmp/lib/libnetsnmp.so.10(snmp_sess_read+0x2c)[0xfda476c]
/pkg/net-snmp/lib/libnetsnmp.so.10(snmp_read+0x44)[0xfda47ec]
/pkg/net-snmp/lib/libnetsnmpagent.so.10(agent_check_and_process+0xcc)[0x
fe816d8]
/pkg/scos/scos-main(_ZN10SNMPAgentx10mainThreadEv+0x214)[0x10de760c]
/pkg/scos/scos-main(_Z13spawnEnvelopeP8Envelope+0x2e4)[0x1043f7e0]
/lib/tls/libpthread.so.0[0xfb4c980]
/lib/tls/libc.so.6(clone+0x5c)[0xfaba11c]

############ start stack trace  ############



############ start log named registers  ############
NIP   : 0x113f2ec0
MSR   : 0xfb52860
ORIG_GPPR3 : 0x200d032
CTR   : 0x53f753b8
LINK  : 0x104366e8
XER   : 0xfb52844
CCR   : 0x0
MQ    : 0x38844448
TRAP  : 0x0
DAR   : 0xc00
DSISR : 0x9282b4
Register[0] = 0xdd
Register[1] = 0x55f629f0
Register[2] = 0x55f6af80
Register[3] = 0x4
Register[4] = 0x0
Register[5] = 0x0
Register[6] = 0x0
Register[7] = 0x11bc5138
Register[8] = 0x11bbb358
Register[9] = 0x2
Register[10] = 0x55f63b78
Register[11] = 0x0
Register[12] = 0x10436908
Register[13] = 0x117a9a60
Register[14] = 0x1196d190
Register[15] = 0x11540000
Register[16] = 0x55f633b0
Register[17] = 0x55f633a0
Register[18] = 0x11960000
Register[19] = 0x11978540
Register[20] = 0x11961d78
Register[21] = 0x117a0000
Register[22] = 0x11960000
Register[23] = 0x0
Register[24] = 0x10000
Register[25] = 0x55ebd5a8
Register[26] = 0x0
Register[27] = 0x53f750f0
Register[28] = 0x117a0000
Register[29] = 0x0
Register[30] = 0xfb69020
Register[31] = 0x53f753b8


############ end  registers logging    ############

-----Original Message-----
From: Thomas Anders [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2008 10:39 AM
To: Kobi Vaknin (kvaknin)
Cc: [email protected]
Subject: Re: Net-SNMP 5.3.1 sub agent crash on long string index

Kobi Vaknin (kvaknin) wrote:
> Do you know if specific problem was known and already fixed ?

The list of fixes between 5.3.1 and 5.4.2 is quite long. See the
ChangeLog file that ships with 5.4.2 for details.


+Thomas

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to