Bug 50178 - HeaderManager added as child of Thread Group can create concatenated HeaderManager names and OutOfMemoryException
Summary: HeaderManager added as child of Thread Group can create concatenated HeaderMa...
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.4
Hardware: PC Mac OS X 10.5
: P2 major (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-29 01:20 UTC by Peter Lynch
Modified: 2010-10-29 19:53 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Lynch 2010-10-29 01:20:58 UTC
1. Add a Header Manager as a direct child of a thread group. ( use case is test plan with multiple thread groups, each requiring diffferent headers.)
2. If multiple threads for thread group loop forever, each test iteration concats the Header manager's name to the previous name as part of merging header name/values. See line 315 of HeaderManager.java (scm 915405 )

This apparently is done to track that header manager's were merged. Problem is when cycling test iterations, this string keeps growing and growing forever - as long as the loop. Then you see crazy long log messages from line 666 (evil!) in HttpSamplerBase.java 

Given that the actual merge operation itself is logged, please remove the name concatenation during the merge operation so that there is no internal leak of memory for the HeaderManager name. Not doing this will eventually result in JMeter running out of memory allocating strings.
Comment 1 Sebb 2010-10-29 07:45:00 UTC
Note: the merge function was added as part of Bug 45479
Comment 2 Sebb 2010-10-29 19:53:08 UTC
The problem is really that the Header Manager sampler entry is not reset before the HMs are merged. Fixing this allows the updated name to work OK.

Added to SVN:


URL: http://svn.apache.org/viewvc?rev=1028948&view=rev
Log:
Bug 50178 - HeaderManager added as child of Thread Group can create concatenated HeaderManager names and OutOfMemoryException

Modified:
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/AbstractTestElement.java
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/TestElement.java
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/TestCompiler.java
   jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
   jakarta/jmeter/trunk/xdocs/changes.xml


Thanks for the bug report.
Comment 3 The ASF infrastructure team 2022-09-24 20:37:45 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2419