Bug 59008

Summary: Infinite recursion in SampleResult
Product: JMeter Reporter: Andrey Pokhilko <apc4>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: normal CC: p.mouawad
Priority: P2    
Version: 2.13   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: Proposed fix
Demo Test Plan

Description Andrey Pokhilko 2016-02-15 14:12:26 UTC
Created attachment 33558 [details]
Proposed fix

There is a situation where Jmeter gets recursive structure of sub-samples under sample result. It happens when httpsampler.max_frame_depth is exceeded. See patch attached, original line just adds clone of a sample as a child of itself.

Having that recursive sample structure makes UI of listeners crazy, makes it unable to write result into XML JTL.
Comment 1 Philippe Mouawad 2016-02-17 12:58:24 UTC
Would it be possible to have a Test Plan or Junit for this issue ?
Can this issue only occur in this piece of code as I see new HTTPSampleResult(res) is used in many other places.
Thanks
Comment 2 Andrey Pokhilko 2016-02-17 13:32:20 UTC
Created attachment 33563 [details]
Demo Test Plan

Here's demo test plan
Comment 3 Philippe Mouawad 2016-02-17 20:43:49 UTC
Fix works for me, but besides this isssue, behaviour for this URL differs a lot from Browser behaviour, and recursion seems huge compared to what browser does no ?
Comment 4 Andrey Pokhilko 2016-02-18 07:08:54 UTC
I think browsers are smart enough to detect cycled redirects. So as JMeter, which breaks the cycle, but has an issue of cycled SampleResult.
Comment 5 Philippe Mouawad 2016-02-21 21:24:38 UTC
+1 for commiting the fix
Comment 6 Andrey Pokhilko 2016-02-23 09:19:06 UTC
Date: Tue Feb 23 08:35:56 2016
New Revision: 1731805

URL: http://svn.apache.org/viewvc?rev=1731805&view=rev
Log:
Bug 59008 - Fix Infinite recursion SampleResult on frame depth limit reached
Bugzilla Id: 59008

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
    jmeter/trunk/xdocs/changes.xml