Bug 63433

Summary: ListenerNotifier: Detected problem in Listener NullPointerException if filename is null
Product: JMeter - Now in Github Reporter: sergiy.iampol
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: normal CC: gvrachliotis, p.mouawad
Priority: P3 Keywords: FixedInTrunk
Version: 5.1.1   
Target Milestone: JMETER_5.2   
Hardware: All   
OS: All   
Attachments: test plan look

Description sergiy.iampol 2019-05-15 07:05:45 UTC
Sometimes getting following exception during load tests:

2019-05-13 14:46:37,661 ERROR o.a.j.t.ListenerNotifier: Detected problem in Listener.
java.lang.NullPointerException: null
	at java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011) ~[?:1.8.0_191]
	at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006) ~[?:1.8.0_191]
	at java.util.Collections$SetFromMap.add(Collections.java:5461) ~[?:1.8.0_191]
	at org.apache.jmeter.samplers.SampleResult.markFile(SampleResult.java:504) ~[ApacheJMeter_core.jar:5.1.1 r1855137]
	at org.apache.jmeter.reporters.ResultCollector.isResultMarked(ResultCollector.java:582) ~[ApacheJMeter_core.jar:5.1.1 r1855137]
	at org.apache.jmeter.reporters.ResultCollector.sampleOccurred(ResultCollector.java:549) ~[ApacheJMeter_core.jar:5.1.1 r1855137]
	at org.apache.jmeter.threads.ListenerNotifier.notifyListeners(ListenerNotifier.java:70) [ApacheJMeter_core.jar:5.1.1 r1855137]
	at org.apache.jmeter.threads.JMeterThread.notifyListeners(JMeterThread.java:980) [ApacheJMeter_core.jar:5.1.1 r1855137]
	at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:569) [ApacheJMeter_core.jar:5.1.1 r1855137]
	at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:486) [ApacheJMeter_core.jar:5.1.1 r1855137]
	at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253) [ApacheJMeter_core.jar:5.1.1 r1855137]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
Comment 1 Philippe Mouawad 2019-05-15 07:43:19 UTC
Hello,
Could you give us more details on how it happens ?

- Standalone or distributed testing ?
- What does your plan look like (Use Tools > Schematic Overview)
- Any useful information

Thanks
Comment 2 Philippe Mouawad 2019-05-15 07:45:18 UTC
(In reply to Philippe Mouawad from comment #1)
> Hello,
> Could you give us more details on how it happens ?
> 
> - Standalone or distributed testing ?
> - What does your plan look like (Use Tools > Schematic Overview)
> - Any useful information
> 
> Thanks

JVM version used
Comment 3 Philippe Mouawad 2019-05-15 07:57:04 UTC
My guess is issue is due to null filename as we switched from HashSet which accepts null value to ConcurrentHashMap which does not.

But how come filename is null ?
Comment 4 Philippe Mouawad 2019-05-15 08:31:30 UTC
Author: pmouawad
Date: Wed May 15 08:31:06 2019
New Revision: 1859277

URL: http://svn.apache.org/viewvc?rev=1859277&view=rev
Log:
Bug 63433 - ListenerNotifier: Detected problem in Listener NullPointerException if filename is null
Bugzilla Id: 63433

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java
    jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleResult.java
    jmeter/trunk/xdocs/changes.xml
Comment 5 sergiy.iampol 2019-05-15 08:33:10 UTC
java:
   OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-2ubuntu0.16.04.1-b12)
test mode:
   standalone
test plan look:
   attached
other:
   had the same test running on 2.13 and there were no such error.
   error appears after upgrading to 5.1.1
   unfortunately test is quite complex and it's hard to find what exactly cause an issue.
Comment 6 sergiy.iampol 2019-05-15 08:33:50 UTC
Created attachment 36586 [details]
test plan look
Comment 7 sergiy.iampol 2019-05-15 08:54:50 UTC
error is not permanent, and seems like happened under some load.
got only 7 such exceptions with ~300 requests made (during ~13min)
Comment 8 sergiy.iampol 2019-05-15 08:55:42 UTC
(In reply to sergiy.iampol from comment #7)
> error is not permanent, and seems like happened under some load.
> got only 7 such exceptions with ~300 requests made (during ~13min)

~300 = ~300K
Comment 9 Philippe Mouawad 2019-05-15 08:56:23 UTC
Hello,
Can you try this build:

https://builds.apache.org/job/JMeter-trunk/

Issue should be fixed.

Regards
Comment 10 sergiy.iampol 2019-05-15 09:21:38 UTC
Hi,
unfortunately I can't run whole test with custom build, due to some limitations with our approach.
However I can manually replace required JARs if you can tell me which should be replaced )
Comment 11 Philippe Mouawad 2019-05-15 09:23:47 UTC
You'll need to replace jars in lib/ext by their new version in this new bundle
Comment 12 sergiy.iampol 2019-05-15 12:48:26 UTC
wasn't reproduced with r1859277
Comment 13 Philippe Mouawad 2019-09-30 13:38:09 UTC
*** Bug 63789 has been marked as a duplicate of this bug. ***
Comment 14 Philippe Mouawad 2019-10-08 20:03:02 UTC
*** Bug 63789 has been marked as a duplicate of this bug. ***
Comment 15 The ASF infrastructure team 2022-09-24 20:38:16 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/5072