Bug 59008 - Infinite recursion in SampleResult
Summary: Infinite recursion in SampleResult
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.13
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
Depends on:
Reported: 2016-02-15 14:12 UTC by Andrey Pokhilko
Modified: 2016-02-23 09:19 UTC (History)
1 user (show)

Proposed fix (1.08 KB, patch)
2016-02-15 14:12 UTC, Andrey Pokhilko
Details | Diff
Demo Test Plan (5.91 KB, application/xml)
2016-02-17 13:32 UTC, Andrey Pokhilko

Note You need to log in before you can comment on or make changes to this bug.
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.
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
Bug 59008 - Fix Infinite recursion SampleResult on frame depth limit reached
Bugzilla Id: 59008

Comment 7 The ASF infrastructure team 2022-09-24 20:38:02 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3832