Hi Dave,
Sure, once I figure out the fix, I will definitely update the users
list.
Meanwhile I tried to debug the agent code and these are my observations.
Call stack on the OpenWRT environment
Breakpoint 1, ifTable_index_to_oid (oid_idx=0xbefe2f64, mib_idx=0xbefe318c) at
if-mib/ifTable/ifTable_interface.c:432
432 DEBUGMSGTL(("verbose:ifTable:ifTable_index_to_oid", "called\n"));
(gdb) where
#0 ifTable_index_to_oid (oid_idx=0xbefe2f64, mib_idx=0xbefe318c) at
if-mib/ifTable/ifTable_interface.c:432
#1 0x00082bcc in ifTable_row_find_by_mib_index (mib_idx=0xbefe318c) at
if-mib/ifTable/ifTable_interface.c:1973
#2 0x00074a58 in getType (index=0x1) at tunnel/tunnel.c:238
#3 0x000750d8 in updateTunnels () at tunnel/tunnel.c:430
#4 0x000758c8 in var_tunnelIfEntry (vp=0xbefe3424, name=0xbefe321c,
length=0xbefe3218, exact=0x0, var_len=0xbefe341c, write_method=0xbefe3420) at
tunnel/tunnel.c:803
#5 0x000393b8 in netsnmp_old_api_helper (handler=0x1ca2c8, reginfo=0x1ca270,
reqinfo=0x1f5968, requests=0x219920) at old_api.c:286
#6 0x00020430 in netsnmp_call_handler (next_handler=0x1ca2c8,
reginfo=0x1ca270, reqinfo=0x1f5968, requests=0x219920) at agent_handler.c:435
#7 0x00020a98 in netsnmp_call_handlers (reginfo=0x1ca270, reqinfo=0x1f5968,
requests=0x219920) at agent_handler.c:516
#8 0x0000f4a4 in handle_var_requests (asp=0x20bc60) at snmp_agent.c:2530
#9 0x00011378 in handle_getnext_loop (asp=0x20bc60) at snmp_agent.c:2970
#10 0x00011f98 in handle_pdu (asp=0x20bc60) at snmp_agent.c:3339
#11 0x00012bac in netsnmp_handle_request (asp=0x20bc60, status=0x0) at
snmp_agent.c:3122
#12 0x00013980 in handle_snmp_packet (op=0x1, session=0x1dbf48,
reqid=0x25b8483b, pdu=0x219358, magic=0x0) at snmp_agent.c:1852
#13 0x000ccaf4 in _sess_process_packet (sessp=0x217f98, sp=0x1dbf48,
isp=0x20f9e8, transport=0x217410, opaque=0x20c150, olength=0x14,
packetptr=0x21e5e0 "0K\002\001\001\004\006public¡>\002\004%¸H;\002\001",
length=0x4d) at snmp_api.c:5326
#14 0x000cf55c in _sess_read (sessp=0x217f98, fdset=0xbefe3bf4) at
snmp_api.c:5742
#15 0x000cf5bc in snmp_sess_read (sessp=0x217f98, fdset=0xbefe3bf4) at
snmp_api.c:5761
#16 0x000cf648 in snmp_read (fdset=0xbefe3bf4) at snmp_api.c:5378
#17 0x0000b5b4 in receive () at snmpd.c:1199
#18 0x0000d6b0 in main (argc=0x6, argv=0xbefe3e64) at snmpd.c:1038
I tried to debug further on OpenWRT machine at netsnmp_old_api_helper() and I
saw
260 cvp->findVar = vp->findVar;
(gdb) print vp->findVar
$6 = (FindVarMethod *) 0x757f4 <var_tunnelIfEntry>
Where as on Ubuntu where everything works fine looks like
260 cvp->findVar = vp->findVar;
(gdb) print vp->findVar
$1 = (FindVarMethod *) 0x7f6c5e13fa80 <var_udp6>
I could not understand why the handler's "findVar" got asssigned to
"var_tunnelIfEntry" instead of "var_udp6"..Am I missing something fundamentally?
Thanks and Regards,
Malathi
--- On Fri, 4/9/10, Dave Shield <[email protected]> wrote:
From: Dave Shield <[email protected]>
Subject: Re: Seg fault when querying for the UDP table
To: "Malathi Panyam" <[email protected]>
Cc: [email protected]
Date: Friday, April 9, 2010, 2:47 AM
On 9 April 2010 01:23, Malathi Panyam <[email protected]> wrote:
> I would like to mention that When I try the same on Ubuntu machine everything
> works fine, when I try to move the code to the target machine, which runs the
> linux with OpenWRT I am seeing the segfault..
It might have been useful if you had mentioned this earlier.
Embedded systems are a somewhat specialised environment,
and can often work differently to more conventional setups.
> I would like to know if any such problem seen with OpenWRT before?
Good luck!
I've been trying for years to get somebody (anybody!) to give us
feedback of their experiences with using Net-SNMP in embedded
environments. But I've been met with a deafening silence.
People are fast enough to come to us when they run into problems,
but seem singularly reluctant to share information about how they
overcame those problems. That makes trying to support this software
rather difficult!
All I can suggest is that you ask on one of the OpenWRT community
lists to see if anyone has any advice. (And please consider giving
something back to the Net-SNMP community, by sharing your experiences
when you finally get things working properly)
Dave
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users