CACHE_DONT_INVALIDATE_ON_SET problem

Alon Marx <[email protected]>
Newsgroups gmane.network.net-snmp.user
Organization iportent
Message-ID <[email protected]>
Hi all, 

For my table I'm using mib2c with mfd configuration and the
cached-container option. 

I found out that in the XXX_container_init routine the
NETSNMP_CACHE_DONT_INVALIDATE_ON_SET is set. In my case I do want to
invalidate the cache when a new value is set (information for some
columns is retrieved after the set was done).

Once I removed the INVALIDATE_ON_SET flag, snmpd crashes when I remove a
row. (log and backtrace below). Seems like the row is deleted twice...
Is this a bug in the mfd, or did I do something wrong (probably the
latter)?

Another question - is it better to leave the flag as is, and manually
call load_cache?

Thanks,
Alon





inject cache helper
verbose:ipsRoutingTable:init_ipsRoutingTable: called
verbose:ipsRoutingTable:initialize_table_ipsRoutingTable: called
internal:ipsRoutingTable:_ipsRoutingTable_initialize_interface: called
verbose:ipsRoutingTable:ipsRoutingTable_init_data: called
internal:ipsRoutingTable:_ipsRoutingTable_container_init: called
verbose:ipsRoutingTable:ipsRoutingTable_container_init: called
ipsRoutingTable:init_ipsRoutingTable: Registering ipsRoutingTable as a
mibs-for-dummies table.
Turning on AgentX master support.
NET-SNMP version 5.3.1

Received 53 bytes from UDP: [127.0.0.1]:34633
0000: 30 33 02 01  01 04 07 64  76 64 65 76  65 6C A3 25
03.....dvdevel.%
0016: 02 04 28 48  ED 43 02 01  00 02 01 00  30 17 30
15    ..(H.C......0.0.
0032: 06 10 2B 06  01 04 01 81  CD 5F 01 03  01 04 02
01    ..+......_......
0048: 02 02 02 01  06                                       .....

Received SNMP packet(s) from UDP: [127.0.0.1]:34633
  SET message
    -- IPORTENT-MIB::ipsRouteRowStatus.2
internal:ipsRoutingTable:_cache_load: called
verbose:ipsRoutingTable:ipsRoutingTable_container_load: called
internal:ipsRoutingTable:ipsRoutingTable_allocate_rowreq_ctx: called
verbose:ipsRoutingTable:ipsRoutingTable_rowreq_ctx_init: called
verbose:ipsRoutingTable:ipsRoutingTable_indexes_set: called
verbose:ipsRoutingTable:ipsRoutingTable_indexes_set_tbl_idx: called
verbose:ipsRoutingTable:ipsRoutingTable_index_to_oid: called
verbose:ipsRoutingTable:ipsRoutingTable_container_load:
dv_get_routing_rule(0)
verbose:ipsRoutingTable:ipsRoutingTable_container_load: ipsRouteIP
14a8c0
verbose:ipsRoutingTable:ipsRoutingTable_container_load: ipsRouteMask
fcffffff
verbose:ipsRoutingTable:ipsRoutingTable_container_load: device_mac <len
6> 0 12 3f 8d e8 56 
verbose:ipsRoutingTable:ipsRoutingTable_container_load:
ipsRouteInterface <len 5> eth0
verbose:ipsRoutingTable:ipsRoutingTable_container_load: ipsRouteGWIP 0
verbose:ipsRoutingTable:ipsRoutingTable_container_load: ipsRouteGWHwAddr
<len 6> fe fd 0 0 0 0 
verbose:ipsRoutingTable:ipsRoutingTable_container_load: CONTAINER_INSERT
0, set fe, exists fe
verbose:ipsRoutingTable:ipsRoutingTable_container_load: count 1
internal:ipsRoutingTable:ipsRoutingTable_allocate_rowreq_ctx: called
verbose:ipsRoutingTable:ipsRoutingTable_rowreq_ctx_init: called
verbose:ipsRoutingTable:ipsRoutingTable_indexes_set: called
verbose:ipsRoutingTable:ipsRoutingTable_indexes_set_tbl_idx: called
verbose:ipsRoutingTable:ipsRoutingTable_index_to_oid: called
verbose:ipsRoutingTable:ipsRoutingTable_container_load:
dv_get_routing_rule(1)
verbose:ipsRoutingTable:ipsRoutingTable_container_load: ipsRouteIP
15a8c0
verbose:ipsRoutingTable:ipsRoutingTable_container_load: ipsRouteMask
fcffffff
verbose:ipsRoutingTable:ipsRoutingTable_container_load: device_mac <len
6> 0 12 3f 8d e8 56 
verbose:ipsRoutingTable:ipsRoutingTable_container_load:
ipsRouteInterface <len 5> eth0
verbose:ipsRoutingTable:ipsRoutingTable_container_load: ipsRouteGWIP
114a8c0
verbose:ipsRoutingTable:ipsRoutingTable_container_load: ipsRouteGWHwAddr
<len 6> 0 13 20 49 b9 12 
verbose:ipsRoutingTable:ipsRoutingTable_container_load: CONTAINER_INSERT
1, set fe, exists fe
verbose:ipsRoutingTable:ipsRoutingTable_container_load: count 2
internal:ipsRoutingTable:ipsRoutingTable_allocate_rowreq_ctx: called
verbose:ipsRoutingTable:ipsRoutingTable_rowreq_ctx_init: called
verbose:ipsRoutingTable:ipsRoutingTable_indexes_set: called
verbose:ipsRoutingTable:ipsRoutingTable_indexes_set_tbl_idx: called
verbose:ipsRoutingTable:ipsRoutingTable_index_to_oid: called
verbose:ipsRoutingTable:ipsRoutingTable_container_load:
dv_get_routing_rule(2)
verbose:ipsRoutingTable:ipsRoutingTable_container_load: ipsRouteIP
314a8c0
verbose:ipsRoutingTable:ipsRoutingTable_container_load: ipsRouteMask
ffffffff
verbose:ipsRoutingTable:ipsRoutingTable_container_load: device_mac <len
6> 0 12 3f 8d e8 56 
verbose:ipsRoutingTable:ipsRoutingTable_container_load:
ipsRouteInterface <len 5> eth0
verbose:ipsRoutingTable:ipsRoutingTable_container_load: ipsRouteGWIP 0
verbose:ipsRoutingTable:ipsRoutingTable_container_load: ipsRouteGWHwAddr
<len 6> fe fd 0 0 0 0 
verbose:ipsRoutingTable:ipsRoutingTable_container_load: CONTAINER_INSERT
2, set fe, exists fe
verbose:ipsRoutingTable:ipsRoutingTable_container_load: count 3
verbose:ipsRoutingTable:ipsRoutingTable_container_load: inserted 3
records
internal:ipsRoutingTable:_mfd_ipsRoutingTable_pre_request: called
internal:ipsRoutingTable:_mfd_ipsRoutingTable_object_lookup: called
verbose:ipsRoutingTable:ipsRoutingTable_row_prep: called
internal:ipsRoutingTable:_mfd_ipsRoutingTable_check_objects: called
internal:ipsRoutingTable:_ipsRoutingTable_check_column: called for 2
verbose:ipsRoutingTable:ipsRouteRowStatus_check_value: called
internal:ipsRoutingTable:_mfd_ipsRoutingTable_undo_setup: called
verbose:ipsRoutingTable:ipsRoutingTable_allocate_data: called
verbose:ipsRoutingTable:ipsRoutingTable_undo_setup: called
internal:ipsRoutingTable:_ipsRoutingTable_undo_setup_column: called for
2
verbose:ipsRoutingTable:ipsRouteRowStatus_undo_setup: called
internal:ipsRoutingTable:_mfd_ipsRoutingTable_set_values: called
internal:ipsRoutingTable:_ipsRoutingTable_set_column: called for 2
verbose:ipsRoutingTable:ipsRouteRowStatus_set: called
internal:ipsRoutingTable:_mfd_ipsRoutingTable_check_dependencies: called
internal:ipsRoutingTable:ipsRoutingTable_check_dependencies: called
internal:ipsRoutingTable:_mfd_ipsRoutingTable_commit: called
verbose:ipsRoutingTable:ipsRoutingTable_commit: called
dv_remove_routing_rule(314A8C0) called
ipsRoutingTable:ipsRoutingTable_dirty_set: called. was 0, now 1
internal:ipsRoutingTable:_cache_free: called
internal:ipsRoutingTable:_container_free: called
verbose:ipsRoutingTable:ipsRoutingTable_container_free: called
internal:ipsRoutingTable:_container_item_free: called
internal:ipsRoutingTable:ipsRoutingTable_release_rowreq_ctx: called
internal:ipsRoutingTable:_container_item_free: called
internal:ipsRoutingTable:ipsRoutingTable_release_rowreq_ctx: called
internal:ipsRoutingTable:_container_item_free: called
internal:ipsRoutingTable:ipsRoutingTable_release_rowreq_ctx: called
verbose:ipsRoutingTable:ipsRoutingTable_release_data: called
internal:ipsRoutingTable:_mfd_ipsRoutingTable_irreversible:commit:
called
internal:ipsRoutingTable:_mfd_ipsRoutingTable_undo_cleanup: called
verbose:ipsRoutingTable:ipsRoutingTable_undo_cleanup: called
verbose:ipsRoutingTable:ipsRoutingTable_release_data: called

*** glibc detected *** /usr/local/sbin/snmpd: double free or corruption
(!prev): 0x088c7398 ***
======= Backtrace: =========
/lib/libc.so.6[0xb5a1e0]
/lib/libc.so.6(__libc_free+0x77)[0xb5a72b]
/usr/local/lib/libnetsnmpmibs.so.10(ipsRoutingTable_release_data
+0x8f)[0x45cd3b]
/usr/local/lib/libnetsnmpmibs.so.10[0x45efe0]
/usr/local/lib/libnetsnmphelpers.so.10[0x156061]
/usr/local/lib/libnetsnmpagent.so.10(netsnmp_call_handler
+0x1c0)[0x884670]
/usr/local/lib/libnetsnmpagent.so.10(netsnmp_call_next_handler
+0xb5)[0x884af9]
/usr/local/lib/libnetsnmphelpers.so.10[0x155ad3]
/usr/local/lib/libnetsnmpagent.so.10(netsnmp_call_handler
+0x1c0)[0x884670]
/usr/local/lib/libnetsnmpagent.so.10(netsnmp_call_next_handler
+0xb5)[0x884af9]
/usr/local/lib/libnetsnmphelpers.so.10(netsnmp_row_merge_helper_handler
+0x132)[0x15bdb2]
/usr/local/lib/libnetsnmpagent.so.10(netsnmp_call_handler
+0x1c0)[0x884670]
/usr/local/lib/libnetsnmpagent.so.10(netsnmp_call_next_handler
+0xb5)[0x884af9]
/usr/local/lib/libnetsnmphelpers.so.10(table_helper_handler
+0x61b)[0x1654d7]
/usr/local/lib/libnetsnmpagent.so.10(netsnmp_call_handler
+0x1c0)[0x884670]
/usr/local/lib/libnetsnmpagent.so.10(netsnmp_call_handlers
+0x177)[0x88496b]
/usr/local/lib/libnetsnmpagent.so.10(handle_var_requests+0x5d)[0x87a469]
/usr/local/lib/libnetsnmpagent.so.10(handle_set+0x4c)[0x87ab24]
/usr/local/lib/libnetsnmpagent.so.10(handle_set_loop+0x27)[0x87adbb]
/usr/local/lib/libnetsnmpagent.so.10(handle_pdu+0x129)[0x87af11]
/usr/local/lib/libnetsnmpagent.so.10(netsnmp_handle_request
+0x71)[0x87be6d]
/usr/local/lib/libnetsnmpagent.so.10(handle_snmp_packet+0x1e4)[0x87c354]
/usr/local/lib/libnetsnmp.so.10[0x9a453b]
/usr/local/lib/libnetsnmp.so.10(_sess_read+0x8e7)[0x9a5acf]
/usr/local/lib/libnetsnmp.so.10(snmp_sess_read+0x20)[0x9a623c]
/usr/local/lib/libnetsnmp.so.10(snmp_read+0x2e)[0x9a628e]
/usr/local/sbin/snmpd[0x804b6f2]
/lib/libc.so.6(__libc_start_main+0xdf)[0xb0bd7f]
/usr/local/sbin/snmpd[0x8049be9]
======= Memory map: ========
00111000-00113000 r-xp 00000000 fd:00
1822824    /usr/lib/libkrb5support.so.0.0
00113000-00114000 rw-p 00001000 fd:00
1822824    /usr/lib/libkrb5support.so.0.0
00114000-00131000 r-xp 00000000 fd:00
1822723    /usr/lib/libexpat.so.0.5.0
00131000-00133000 rw-p 0001c000 fd:00
1822723    /usr/lib/libexpat.so.0.5.0
00133000-0013c000 r-xp 00000000 fd:00
5062716    /lib/libgcc_s-4.0.2-20051126.so.1
0013c000-0013d000 rw-p 00009000 fd:00
5062716    /lib/libgcc_s-4.0.2-20051126.so.1
0014f000-0016a000 r-xp 00000000 fd:00
5067319    /usr/local/lib/libnetsnmphelpers.so.10.0.1
0016a000-0016b000 rw-p 0001a000 fd:00
5067319    /usr/local/lib/libnetsnmphelpers.so.10.0.1
0016b000-001c4000 r-xp 00000000 fd:00 1832144    /usr/lib/librpm-4.4.so
001c4000-001c7000 rw-p 00058000 fd:00 1832144    /usr/lib/librpm-4.4.so
001c7000-001fa000 rw-p 001c7000 00:00 0
001fa000-00302000 r-xp 00000000 fd:00
1822946    /usr/lib/librpmdb-4.4.so
00302000-00306000 rw-p 00107000 fd:00
1822946    /usr/lib/librpmdb-4.4.so
00306000-00307000 rw-p 00306000 00:00 0
00307000-00378000 r-xp 00000000 fd:00
1822943    /usr/lib/librpmio-4.4.so
00378000-0037b000 rw-p 00070000 fd:00
1822943    /usr/lib/librpmio-4.4.so
0037b000-0039e000 rw-p 0037b000 00:00 0
003e2000-0050b000 r-xp 00000000 fd:00
1823142    /usr/local/lib/libnetsnmpmibs.so.10.0.1
0050b000-00515000 rw-p 00128000 fd:00
1823142    /usr/local/lib/libnetsnmpmibs.so.10.0.1
00515000-00546000 rw-p 00515000 00:00 0
00546000-005b5000 r-xp 00000000 fd:00 1822826    /usr/lib/libkrb5.so.3.2
005b5000-005b8000 rw-p 0006e000 fd:00 1822826    /usr/lib/libkrb5.so.3.2
005b8000-006b0000 r-xp 00000000 fd:00
5063704    /lib/libcrypto.so.0.9.7f
006b0000-006c2000 rw-p 000f8000 fd:00
5063704    /lib/libcrypto.so.0.9.7f
006c2000-006c5000 rw-p 006c2000 00:00 0
0077a000-00783000 r-xp 00000000 fd:00
5062766    /lib/libnss_files-2.3.6.so
00783000-00784000 r--p 00008000 fd:00
5062766    /lib/libnss_files-2.3.6.so
00784000-00785000 rw-p 00009000 fd:00
5062766    /lib/libnss_files-2.3.6.so
0079f000-007af000 r-xp 00000000 fd:00 5063668    /lib/libselinux.so.1
007af000-007b0000 rw-p 00010000 fd:00 5063668    /lib/libselinux.so.1
007c5000-007d4000 r-xp 00000000 fd:00 5062801    /lib/libresolv-2.3.6.so
007d4000-007d5000 r--p 0000e000 fd:00 5062801    /lib/libresolv-2.3.6.so
007d5000-007d6000 rw-p 0000f000 fd:00 5062801    /lib/libresolv-2.3.6.so
007d6000-007d8000 rw-p 007d6000 00:00 0
007da000-007e1000 r-xp 00000000 fd:00
1822707    /usr/lib/libpopt.so.0.0.0
007e1000-007e2000 rw-p 00006000 fd:00
1822707    /usr/lib/libpopt.so.0.0.0
007e4000-007e6000 r-xp 00000000 fd:00 5063702    /lib/libcom_err.so.2.1
007e6000-007e7000 rw-p 00001000 fd:00 5063702    /lib/libcom_err.so.2.1
00809000-00811000 r-xp 00000000 fd:00 5063709    /lib/librt-2.3.6.so
00811000-00812000 r--p 00007000 fd:00 5063709    /lib/librt-2.3.6.so
00812000-00813000 rw-p 00008000 fd:00 5063709    /lib/librt-2.3.6.so
00813000-0081d000 rw-p 00813000 00:00 0
00847000-0086a000 r-xp 00000000 fd:00
1822825    /usr/lib/libk5crypto.so.3.0
0086a000-0086b000 rw-p 00023000 fd:00
1822825    /usr/lib/libk5crypto.so.3.0
0086f000-008a1000 r-xp 00000000 fd:00
5067328    /usr/local/lib/libnetsnmpagent.so.10.0.1
008a1000-008a3000 rw-p 00031000 fd:00
5067328    /usr/local/lib/libnetsnmpagent.so.10.0.1
00971000-009e8000 r-xp 00000000 fd:00
1822881    /usr/local/lib/libnetsnmp.so.10.0.1
009e8000-009eb000 rw-p 00076000 fd:00
1822881    /usr/local/lib/libnetsnmp.so.10.0.1
009eb000-00a09000 rw-p 009eb000 00:00 0
00a4d000-00a64000 r-xp 00000000 fd:00
1822827    /usr/lib/libgssapi_krb5.so.2.2
00a64000-00a65000 rw-p 00017000 fd:00
1822827    /usr/lib/libgssapi_krb5.so.2.2
00a67000-00a9c000 r-xp 00000000 fd:00 5063706    /lib/libssl.so.0.9.7f
00a9c000-00a9f000 rw-p 00035000 fd:00 5063706    /lib/libssl.so.0.9.7f
00ad8000-00ad9000 r-xp 00ad8000 00:00 0          [vdso]
00ad9000-00af3000 r-xp 00000000 fd:00 5062679    /lib/ld-2.3.6.so
00af3000-00af4000 r--p 00019000 fd:00 5062679    /lib/ld-2.3.6.so
00af4000-00af5000 rw-p 0001a000 fd:00 5062679    /lib/ld-2.3.6.so
00af7000-00c1a000 r-xp 00000000 fd:00 5062683    /lib/libc-2.3.6.so
00c1a000-00c1c000 r--p 00122000 fd:00 5062683    /lib/libc-2.3.6.so
00c1c000-00c1e000 rw-p 00124000 fd:00 5062683    /lib/libc-2.3.6.so
00c1e000-00c20000 rw-p 00c1e000 00:00 0
00c22000-00c45000 r-xp 00000000 fd:00 5062685    /lib/libm-2.3.6.so
00c45000-00c46000 r--p 00022000 fd:00 5062685    /lib/libm-2.3.6.so
00c46000-00c47000 rw-p 00023000 fd:00 5062685    /lib/libm-2.3.6.so
00c49000-00c4b000 r-xp 00000000 fd:00 5062687    /lib/libdl-2.3.6.so
00c4b000-00c4c000 r--p 00001000 fd:00 5062687    /lib/libdl-2.3.6.so
00c4c000-00c4d000 rw-p 00002000 fd:00 5062687    /lib/libdl-2.3.6.so
00c4f000-00c68000 r-xp 00000000 fd:00
1822942    /usr/lib/libneon.so.24.0.7
00c68000-00c69000 rw-p 00019000 fd:00
1822942    /usr/lib/libneon.so.24.0.7
00c7d000-00cd0000 r-xp 00000000 fd:00
1822944    /usr/lib/libsqlite3.so.0.8.6
00cd0000-00cd2000 rw-p 00052000 fd:00
1822944    /usr/lib/libsqlite3.so.0.8.6
00cd4000-00d1b000 r-xp 00000000 fd:00
1822941    /usr/lib/libbeecrypt.so.6.4.0
00d1b000-00d1e000 rw-p 00046000 fd:00
1822941    /usr/lib/libbeecrypt.so.6.4.0
00d36000-00d48000 r-xp 00000000 fd:00
1822721    /usr/lib/libz.so.1.2.2.2
00d48000-00d49000 rw-p 00011000 fd:00
1822721    /usr/lib/libz.so.1.2.2.2
00d4b000-00d59000 r-xp 00000000 fd:00
5062707    /lib/libpthread-2.3.6.so
00d59000-00d5a000 r--p 0000d000 fd:00
5062707    /lib/libpthread-2.3.6.so
00d5a000-00d5b000 rw-p 0000e000 fd:00
5062707    /lib/libpthread-2.3.6.so
00d5b000-00d5d000 rw-p 00d5b000 00:00 0
00d86000-00d98000 r-xp 00000000 fd:00
1822945    /usr/lib/libelf-0.108.so
00d98000-00d99000 rw-p 00012000 fd:00
1822945    /usr/lib/libelf-0.108.so
00d99000-00e6e000 r-xp 00000000 fd:00 1822747    /usr/lib/libstdc
++.so.6.0.7
00e6e000-00e73000 rw-p 000d5000 fd:00 1822747    /usr/lib/libstdc
++.so.6.0.7
00e73000-00e78000 rw-p 00e73000 00:00 0
03799000-037aa000 r-xp 00000000 fd:00
1822835    /usr/lib/libbz2.so.1.0.2
037aa000-037ab000 rw-p 00010000 fd:00
1822835    /usr/lib/libbz2.so.1.0.2
08048000-0804d000 r-xp 00000000 fd:00 5128205    /usr/local/sbin/snmpd
0804d000-0804e000 rw-p 00004000 fd:00 5128205    /usr/local/sbin/snmpd
08730000-08907000 rw-p 08730000 00:00 0          [heap]
b7a00000-b7a21000 rw-p b7a00000 00:00 0
b7a21000-b7b00000 ---p b7a21000 00:00 0
b7bf9000-b7df9000 r--p 00000000 fd:00
1822186    /usr/lib/locale/locale-archive
b7df9000-b7f03000 rw-p b7df9000 00:00 0
b7f15000-b7f1c000 r--s 00000000 fd:00
1786307    /usr/lib/gconv/gconv-modules.cache
b7f1d000-b7f1f000 rw-p b7f1d000 00:00 0
bfe6a000-bfe80000 rw-p bfe6a000 00:00 0          [stack]



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.