Possible thread leak in SnmpUtils
Description
Acceptance / Success Criteria
Attachments
is duplicated by
Lucidchart Diagrams
Activity

guenther.schreiner June 9, 2017 at 9:01 AM
Definitely fixed in 20.0.0.
The version 20.0.0 has huge improvements regarding number of open files, too.
Here comes the statistics of number of open files for the OpenNMS java process:
version 19:
2017-06-09-10:50:01.log:7614
2017-06-09-10:55:01.log:7613
2017-06-09-11:00:01.log:7616
2017-06-09-11:05:01.log:7614
2017-06-09-11:10:01.log:7614
2017-06-09-11:15:01.log:7615
2017-06-09-11:20:01.log:7611
2017-06-09-11:25:02.log:7612
2017-06-09-11:35:01.log:7613
2017-06-09-11:40:01.log:7615
2017-06-09-11:45:01.log:7614
2017-06-09-11:50:01.log:7613
2017-06-09-11:55:01.log:7613
2017-06-09-12:00:01.log:7615
2017-06-09-12:05:01.log:7623
2017-06-09-12:10:01.log:7612
2017-06-09-12:15:02.log:7613
2017-06-09-12:20:01.log:7615
2017-06-09-12:25:01.log:7614
2017-06-09-12:35:01.log:7613
2017-06-09-12:40:01.log:7610
2017-06-09-12:45:02.log:7614
2017-06-09-12:50:01.log:7609
2017-06-09-12:55:01.log:7609
2017-06-09-13:00:01.log:7608
2017-06-09-13:05:01.log:7617
2017-06-09-13:10:01.log:7611
version 20:
2017-06-09-13:49:01.log:4007
2017-06-09-13:50:01.log:4452
2017-06-09-13:51:01.log:4437
2017-06-09-13:52:01.log:4440
2017-06-09-13:53:01.log:4439
2017-06-09-13:54:01.log:4498
2017-06-09-13:55:02.log:4487
2017-06-09-13:56:01.log:4493
2017-06-09-13:57:01.log:4484
2017-06-09-13:58:01.log:4483
2017-06-09-13:59:01.log:4491
2017-06-09-14:00:02.log:4489
2017-06-09-14:01:01.log:4479
2017-06-09-14:02:01.log:4480
2017-06-09-14:03:01.log:4490
2017-06-09-14:04:01.log:4485
2017-06-09-14:05:01.log:4482
2017-06-09-14:06:01.log:4481
2017-06-09-14:07:01.log:4488
2017-06-09-14:08:01.log:4479
2017-06-09-14:09:01.log:4488
2017-06-09-14:10:01.log:4494
2017-06-09-14:11:01.log:4478
2017-06-09-14:12:01.log:4479
2017-06-09-14:13:01.log:4490
2017-06-09-14:14:01.log:4488
2017-06-09-14:15:01.log:4483
2017-06-09-14:16:01.log:4480
2017-06-09-14:17:01.log:4494
2017-06-09-14:18:01.log:4477
2017-06-09-14:19:01.log:4487
2017-06-09-14:20:01.log:4498
2017-06-09-14:21:01.log:4486
2017-06-09-14:22:01.log:4484
2017-06-09-14:23:01.log:4489
2017-06-09-14:24:01.log:4496
2017-06-09-14:25:01.log:4487
2017-06-09-14:26:01.log:4485
2017-06-09-14:27:01.log:4498
2017-06-09-14:28:01.log:4486
2017-06-09-14:29:01.log:4488
2017-06-09-14:30:01.log:4493
2017-06-09-14:31:01.log:4909
2017-06-09-14:32:01.log:4502
2017-06-09-14:33:01.log:4494

tim June 1, 2017 at 11:37 AM
Hi Jesse,
I have the same issue. Could you give me the link to the Attachments:
org.opennms.core.snmp.implementations.snmp4j-19.0.1-NMS-9233.jar
org.opennms.core.snmp.proxy.rpc-impl-19.0.1-NMS-9233.jar
Thanks
Tim liu

Jesse White May 11, 2017 at 9:16 AM
Attached patched .jars for 19.1.0:
e84e5dce7cdd8c90d131babbf2f3d3a3406a89eb org.opennms.core.snmp.implementations.snmp4j-19.1.0-NMS-9233.jar
c66154accc74322b72b159abbac3241d976dc95f org.opennms.core.snmp.proxy.rpc-impl-19.1.0-NMS-9233.jar

Jesse White May 11, 2017 at 8:59 AM
Cherry-picked to foundation-2017
and release-19.1.1
branches.

Jesse White May 11, 2017 at 8:57 AM
This patch was only committed to develop
instead of foundation-2017
, and as a result was not made part of the 19.1.0
release.
A few user on the discuss list have reported OpenNMS crashing with errors of the form: java.lang.OutOfMemoryError: unable to create new native thread.
In this particular thread, http://marc.info/?l=opennms-discuss&m=148822545512791&w=2, the user attached the hprof file which shows thousands threads named "DefaultUDPTransportMapping_0.0.0.0/0".
This could be related to the changes made in https://issues.opennms.org/browse/NMS-8813, but after auditing the code, I did not find any problems.