Bug 42267 - Concurrent GUI update failure
Summary: Concurrent GUI update failure
Alias: None
Product: JMeter
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.2
Hardware: All All
: P1 major (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
Depends on:
Reported: 2007-04-26 08:26 UTC by Rossen Raykov
Modified: 2007-05-02 16:33 UTC (History)
1 user (show)

Error's stack trace (1.43 KB, text/plain)
2007-04-26 12:16 UTC, Rossen Raykov
Suggested patch (1.12 KB, patch)
2007-05-02 05:52 UTC, Alf Hogemark
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rossen Raykov 2007-04-26 08:26:30 UTC
Jmeter does not synchronize the GUI updates during recording sessions.
As are result when the request concurrency level is high enough (12 requests in
my case) the left three panel is miss mashed and the  “HTTP Proxy Server” panel
loses its Target Controller” selection.

I'm not familiar with the Jmeter code do do the best possible fix but making the
following two methods of  org.apache.jmeter.protocol.http.proxy.ProxyControl
from src/protocol/http helps to resolve the issue:

On line 557: 
private void placeSampler(HTTPSamplerBase sampler, TestElement[] subConfigs,
JMeterTreeNode myTarget)

On line 630:
private void removeValuesFromSampler(HTTPSamplerBase sampler, Collection

This is quick and dirty fix and I would not fix the rest of the protocols which
may have the same issue.
Comment 1 Rossen Raykov 2007-04-26 12:16:52 UTC
Created attachment 20055 [details]
Error's stack trace

This is the original stack trace.
Comment 2 Alf Hogemark 2007-04-27 00:30:23 UTC
This seems to be the same issue as or at least quite related to bug 39427.
Comment 3 Alf Hogemark 2007-05-02 05:52:07 UTC
Created attachment 20088 [details]
Suggested patch

The patch makes the deliverSampler method synchronized.
Since the Proxy starts one thread for each request it receives, and each thread
adds a sample to the test plan via the "ProxyControl.deliverSampler" method,
the method has to be synchronized. The "deliverSampler" method interacts with
GUI components, which are normally run on the GUI thread, i.e. just one thread.
Therefore, only one thread at the time should be able to deliver samples.
The org.apache.jmeter.gui.GuiPackage class for example, does not seem to be
threadsafe, and methods in that class is called indirectly by deliverSampler.

You can reproduce this bug by pointing your browser to a web site with many
images on the page, so that the browsers issues multiple concurrent requests.
Comment 4 Sebb 2007-05-02 16:33:29 UTC
Thanks - applied to SVN in r534655