You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2014/08/06 18:46:15 UTC

[Bug 56821] New: Stuck Threads

https://issues.apache.org/bugzilla/show_bug.cgi?id=56821

            Bug ID: 56821
           Summary: Stuck Threads
           Product: JMeter
           Version: 2.11
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: ricardo.da.silva.ist@gmail.com

Hi, i created a simple test plan plugin, which does:

@Override
public SampleResult runTest(JavaSamplerContext context) {
        try {
            Thread.currentThread().sleep(25);
        } catch (InterruptedException e) {
            // stuff to log
        }

        SampleResult sampleResult = new SampleResult();
        sampleResult.setSampleLabel(Thread.currentThread().getName());
        sampleResult.setResponseOK(); 
        return sampleResult;
    }
}


Very simple as you see, with Thread Group definitions:
- Number of threads = 1000;
- Rump-up-Period = 0;
- Loop-count = 2;

When i run this Test Plan, mostly performs well. As expected in Summary Report
i have 2000 samples. But sometimes, i only have 1998 samples and 1 thread that
never ends, even if i request Stop Test in Jmeter GUI. When that situation
happen i noticed this lines appears in jmeter log:

2014/08/06 17:35:37 INFO  AWT-EventQueue-0     jmeter.gui.action.Start:
Stopping test 
2014/08/06 17:35:37 INFO  Thread-7             jmeter.threads.JMeterThread:
Stopping: Thread Group 1-834 
2014/08/06 17:35:37 WARN  Thread-7             jmeter.threads.JMeterThread:
Sampler is not Interruptible: Java Request 
2014/08/06 17:35:42 WARN  Thread-7             jmeter.threads.ThreadGroup:
Thread won't exit: Thread Group 1-834 


I even tried to perform this test using jmeter-server in a linux based OS, with
same consequences. I already increased jmeter memory parameters with any sucess
and tried the exactly test plan in jmeter 2.10. 

After all tests i have done, i m forced to concluded that this situation can be
some kind of jmeter bug.


Best regards,
Ricardo Silva.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 56821] Stuck Threads with custom JavaSamplerClient implementation when stopping Test Plan

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56821

--- Comment #4 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Attached test plan uses SleepTest which does what you describe, running it many
times with your config, I was not able to reproduce.
Closed issue, feel free to reopen but with more details

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 56821] Stuck Threads with custom JavaSamplerClient implementation when stopping Test Plan

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56821

--- Comment #5 from ricardo silva <ri...@gmail.com> ---
Tks guys,

with "ramp-up period set to 1" and explanation that "So when you call stop,
JMeter does nothing for it. It then waits 10*Number of still active threads
millis. And then checks if threads are stopped" e adjust my proprieties and
timers. 

Now performs correctly, tks.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 56821] Stuck Threads

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56821

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om
                 OS|                            |All

--- Comment #1 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
can you try with ramp-up period set to 1?

Does it hang if you don't stop or only when you stop ?

Thanks

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 56821] Stuck Threads with custom JavaSamplerClient implementation when stopping Test Plan

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56821

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|---                         |WORKSFORME

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 56821] Stuck Threads with custom JavaSamplerClient implementation when stopping Test Plan

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56821

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Stuck Threads               |Stuck Threads with custom
                   |                            |JavaSamplerClient
                   |                            |implementation when
                   |                            |stopping Test Plan

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 56821] Stuck Threads with custom JavaSamplerClient implementation when stopping Test Plan

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56821

--- Comment #3 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Created attachment 31952
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31952&action=edit
Test plan showing issue cannot be reproduced

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 56821] Stuck Threads

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56821

--- Comment #2 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Your issue is due to the following:
- Java Request is not interruptible
So when you call stop, JMeter does nothing for it
It then waits 10*Number of still active threads millis
And then checks if threads are stopped
If it is still not stopped it issues the warning

Looking at your code, you have a 25 ms sleep which could be running during the
stop and may explain your issue.
But we would really need more details otherwise we will have to close bug as
cannot reproduce.

-- 
You are receiving this mail because:
You are the assignee for the bug.