Well, This is interesting now... A different issue may completely hinder
our bisecting approach (i.e., is that other bug fixed at this point or
not?).
After putting some thought on this one, I think the bisecting approach
is no longer feasible here. Re-reading the whole bug history, I realized
that granjerox has left a core dump here a while ago.
Analyzing the coredump, I got
#0 0x00007f3c55540423 in _check_interface_entry_for_updates
(rowreq_ctx=0x55aab05e9230, cdc=0x7ffd7ec287d0) at
mibgroup/if-mib/ifTable/ifTable_data_access.c:317
317 int lastchanged = rowreq_ctx->data.ifLastChange;
and then checked the contents in data:
(gdb) p rowreq_ctx->data
$3 = {ifLinkUpDownTrapEnable = 0, ifAlias = '\000' <repeats 63 times>,
ifAlias_len = 0, ifCounterDiscontinuityTime = 0, ifentry = 0x0}
(gdb) p rowreq_ctx->data.ifLastChange
There is no member named ifLastChange.
Which shows the cause for the error we are seeing. Then, I found
https://github.com/net-snmp/net-snmp/issues/107, which describes the
exact same symptoms we are dealing with here, due to the same member of
"data" not being set.
The fix for that issue is available at https://github.com/net-snmp/net-
snmp/commit/d4b58c60367a262d829eb33e7888d28cd4337481. However, the fix
description says that the bug was introduced in an improvement available
at https://github.com/net-snmp/net-
snmp/commit/600c54135b1015d56070f702d878772dd9f0d51e. The issue here is
that this last change is __not__ present in 5.9.1 (jammy), where we are
experiencing the problem. However, the latter was introduced to fix a
race condition when scanning network interfaces, which could be the
culprit here.
Since the fix for the upstream issue cannot be applied without the
second commit I mentioned, I am proposing a new PPA version of net-snmp
with both of this patches on top of jammy's current version.
Moreover, since these would not apply cleanly, I am also including
https://github.com/net-snmp/net-snmp/commit/8da919e4ad66dec376f54a6d2f7dd7a7fe68b8f0
which is s small refactoring in the code (which reduces one function call when
searching for network interfaces), and
https://github.com/net-snmp/net-snmp/commit/8bb544fbd2d6986a9b73d3fab49235a4baa96c23,
which fixes a memory leak when reading network interfaces.
Therefore, I am providing a PPA with the following patches:
https://github.com/net-snmp/net-snmp/commit/8da919e4ad66dec376f54a6d2f7dd7a7fe68b8f0
https://github.com/net-snmp/net-snmp/commit/8bb544fbd2d6986a9b73d3fab49235a4baa96c23
https://github.com/net-snmp/net-snmp/commit/600c54135b1015d56070f702d878772dd9f0d51e
https://github.com/net-snmp/net-snmp/commit/d4b58c60367a262d829eb33e7888d28cd4337481
applied in the order they appear above.
The new package is available in the same PPA at
https://launchpad.net/~athos-ribeiro/+archive/ubuntu/net-snmp-segfault
net-snmp - 5.9.1+dfsg-1ubuntu2.7~ppa5
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/720638
Title:
snmpd crashes with segfault (libnetsnmpmibs.so.15.1.2)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/720638/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs