Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seg fault in handle_subagent_set_response #28

Open
joeclarkia opened this issue Oct 15, 2019 · 2 comments
Open

seg fault in handle_subagent_set_response #28

joeclarkia opened this issue Oct 15, 2019 · 2 comments

Comments

@joeclarkia
Copy link

We have built a subagent (using NetSNMP 5.8.dev) and we occasionally see our subagent crash with a seg fault in handle_subagent_set_response. By looking at the disassembly of the core file in gdb, I can tell that the error is in subagent.c at (or very near) line 680:

https://github.com/net-snmp/net-snmp/blob/master/agent/mibgroup/agentx/subagent.c#L680

There are a couple reports online of what is probably the same error:

Has there been any progress on resolving this issue? The current master code looks fairly similar to our existing code. Apparently none of the available patches have been "blessed" and committed to the main repository. We would very much like to resolve this issue, but we would prefer not to apply "random" patches we find online....

@bvanassche
Copy link
Contributor

A candidate fix has been checked in on the V5.8 and master branches. Please retest.

@joeclarkia
Copy link
Author

joeclarkia commented Oct 21, 2019

I tested the candidate fix and it didn't seem to resolve the issue. I believe that in our case retsess is not NULL but is invalid, as indicated by gdb disassembly. Other previous error reports suggest the same thing, with wording like "corrupt" vs "NULL".

Continuing the investigation, I applied the patch linked in the problem statement, and so far that seems to be a solid solution to this problem -- since applying the patch we still have some SNMP unhappiness at high CPU load levels, but the subagent doesn't crash. I'm not sure why the patch was never applied to the net-snmp trunk, but here's my vote that it probably should be...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants