[jira] [Commented] (SUREFIRE-1430) Parallel parameterized JUnit test hangs on Linux

2019-06-03 Thread Tibor Digana (JIRA)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-1430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16855033#comment-16855033
 ] 

Tibor Digana commented on SUREFIRE-1430:


[~vladimirsitnikov] I know but we had to postpone it due to there is more work 
with it in MOJO as well. I want to work on it sooner but we have only few 
active people (-;

> Parallel parameterized JUnit test hangs on Linux
> 
>
> Key: SUREFIRE-1430
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1430
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Junit 4.7+ (parallel) support
>Affects Versions: 2.18, 2.18.1, 2.19, 2.19.1, 2.20, 2.20.1
> Environment: Linux/Ubuntu
>Reporter: Christian Beikov
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 3.0.1
>
>
> This is a follow up of SUREFIRE-1264. The test case is here: 
> https://github.com/beikov/surefire-test
> The problem is, that a simple parameterized JUnit test hangs when running in 
> parallel mode on Linux.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SUREFIRE-1430) Parallel parameterized JUnit test hangs on Linux

2019-06-03 Thread Vladimir Sitnikov (JIRA)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-1430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16854987#comment-16854987
 ] 

Vladimir Sitnikov commented on SUREFIRE-1430:
-

Just in case, here's a thread dump of the failure case.

 

It looks like maven-surefire creates a Semaphore with capacity of 1, and:

1) main thread acquires a permit just before {{at 
org.apache.maven.surefire.junitcore.pc.Scheduler.schedule(Scheduler.java:346)}}

2) pool-1-thread-1 tries to acquire another permit {{at 
org.apache.maven.surefire.junitcore.pc.Scheduler.schedule(Scheduler.java:342)}

It looks like "main thread" is executing "a suite" while "pool-1-thread-1" is 
executing tests.
I don't want to make quick judgements, however it looks like "suite executor" 
should not acquire permits in case its only purpose is to delegate work to a 
worker pool.

 
{noformat}
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.151-b12 mixed mode):
"pool-1-thread-1" #8 prio=5 os_prio=0 tid=0x7f4f40326000 nid=0x12e5 waiting 
on condition [0x7f4f29c33000]
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0xe06102e0> (a 
java.util.concurrent.Semaphore$FairSync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
at java.util.concurrent.Semaphore.acquire(Semaphore.java:312)
at 
org.apache.maven.surefire.junitcore.pc.ThreadResourcesBalancer.acquirePermit(ThreadResourcesBalancer.java:75)
at 
org.apache.maven.surefire.junitcore.pc.Scheduler.schedule(Scheduler.java:342)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at 
org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:387)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
"Service Thread" #7 daemon prio=9 os_prio=0 tid=0x7f4f40141000 nid=0x12e3 
runnable [0x]
   java.lang.Thread.State: RUNNABLE
"C1 CompilerThread1" #6 daemon prio=9 os_prio=0 tid=0x7f4f4013e000 
nid=0x12e2 waiting on condition [0x]
   java.lang.Thread.State: RUNNABLE
"C2 CompilerThread0" #5 daemon prio=9 os_prio=0 tid=0x7f4f4013b000 
nid=0x12e1 waiting on condition [0x]
   java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" #4 daemon prio=9 os_prio=0 tid=0x7f4f40139800 
nid=0x12e0 waiting on condition [0x]
   java.lang.Thread.State: RUNNABLE
"Finalizer" #3 daemon prio=8 os_prio=0 tid=0x7f4f40107000 nid=0x12df in 
Object.wait() [0x7f4f2ae4f000]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0xe0008ec8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
- locked <0xe0008ec8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)
"Reference Handler" #2 daemon prio=10 os_prio=0 tid=0x7f4f40102800 
nid=0x12de in Object.wait() [0x7f4f2af5]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0xe0006b68> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:502)
at java.lang.ref.Reference.tryHandlePending(Reference.java:191)
- locked <0xe0006b68> (a java.lang.ref.Reference$Lock)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153)
{noformat}

main thread:
{noformat}
"main" #1 prio=5 os_prio=0 tid=0x7f4f40009800 nid=0x12da waiting on 
condition [0x7f4f4617d000]
   java.lang.Thread.State: WAITI

[jira] [Commented] (SUREFIRE-1430) Parallel parameterized JUnit test hangs on Linux

2018-06-11 Thread Tibor Digana (JIRA)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-1430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16508671#comment-16508671
 ] 

Tibor Digana commented on SUREFIRE-1430:


[~christian.beikov]
I have local changes and wanted to include this fix in today's release (version 
2.22.0) but I uncovered more and more issues. I do not want to make a mistake 
so I segregated this issue from current list and created an extra version 
2.22.1. The current version 2.22.0 would not be postponed.

> Parallel parameterized JUnit test hangs on Linux
> 
>
> Key: SUREFIRE-1430
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1430
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Junit 4.7+ (parallel) support
>Affects Versions: 2.18, 2.18.1, 2.19, 2.19.1, 2.20, 2.20.1
> Environment: Linux/Ubuntu
>Reporter: Christian Beikov
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.22.1
>
>
> This is a follow up of SUREFIRE-1264. The test case is here: 
> https://github.com/beikov/surefire-test
> The problem is, that a simple parameterized JUnit test hangs when running in 
> parallel mode on Linux.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SUREFIRE-1430) Parallel parameterized JUnit test hangs on Linux

2018-06-10 Thread Christian Beikov (JIRA)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-1430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16507698#comment-16507698
 ] 

Christian Beikov commented on SUREFIRE-1430:


Great that you figured this out! Thanks for staying on top of this :)

> Parallel parameterized JUnit test hangs on Linux
> 
>
> Key: SUREFIRE-1430
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1430
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Junit 4.7+ (parallel) support
>Affects Versions: 2.18, 2.18.1, 2.19, 2.19.1, 2.20, 2.20.1
> Environment: Linux/Ubuntu
>Reporter: Christian Beikov
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.22.1
>
>
> This is a follow up of SUREFIRE-1264. The test case is here: 
> https://github.com/beikov/surefire-test
> The problem is, that a simple parameterized JUnit test hangs when running in 
> parallel mode on Linux.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SUREFIRE-1430) Parallel parameterized JUnit test hangs on Linux

2018-04-04 Thread Tibor Digana (JIRA)

[ 
https://issues.apache.org/jira/browse/SUREFIRE-1430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16426487#comment-16426487
 ] 

Tibor Digana commented on SUREFIRE-1430:


[~christian.beikov]
After investigating this issue I found out that it is not related to Linux. It 
was reproduced on Linux only because the number of virtual CPU is 1. So I 
turned the configuration from
{code:xml}
1
true
{code}
to
{code:xml}
3
false
{code}
which caused hanging the plugin finally on both Linux and Windows.
If you set {{threadCount}} to 4 all tests pass on both platforms.
It means that we have a bug in parallel computer or dissipation of threads to 
suites/classes/methods.
I will develop a unit test and isolate the problem only to 
ParallelComputerBuilder.

> Parallel parameterized JUnit test hangs on Linux
> 
>
> Key: SUREFIRE-1430
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1430
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Junit 4.7+ (parallel) support
>Affects Versions: 2.18, 2.18.1, 2.19, 2.19.1, 2.20, 2.20.1
> Environment: Linux/Ubuntu
>Reporter: Christian Beikov
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 3.0.0-M1
>
>
> This is a follow up of SUREFIRE-1264. The test case is here: 
> https://github.com/beikov/surefire-test
> The problem is, that a simple parameterized JUnit test hangs when running in 
> parallel mode on Linux.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SUREFIRE-1430) Parallel parameterized JUnit test hangs on Linux

2017-12-04 Thread Christian Beikov (JIRA)

[ 
https://issues.apache.org/jira/browse/SUREFIRE-1430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16277460#comment-16277460
 ] 

Christian Beikov commented on SUREFIRE-1430:


As I wrote before, the problem is specifically on Linux. It works without 
problems on Windows.

> Parallel parameterized JUnit test hangs on Linux
> 
>
> Key: SUREFIRE-1430
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1430
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Junit 4.7+ (parallel) support
>Affects Versions: 2.18, 2.18.1, 2.19, 2.19.1, 2.20, 2.20.1
> Environment: Linux/Ubuntu
>Reporter: Christian Beikov
>Assignee: Tibor Digana
> Fix For: 2.21.1
>
>
> This is a follow up of SUREFIRE-1264. The test case is here: 
> https://github.com/beikov/surefire-test
> The problem is, that a simple parameterized JUnit test hangs when running in 
> parallel mode on Linux.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1430) Parallel parameterized JUnit test hangs on Linux

2017-12-03 Thread Tibor Digana (JIRA)

[ 
https://issues.apache.org/jira/browse/SUREFIRE-1430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16275924#comment-16275924
 ] 

Tibor Digana commented on SUREFIRE-1430:


[~cbeikov]
[~christian.beikov]
I tried on Windows, it is ok. Can you check it out as well, or it is only my 
platform problem that it does not hang?
I will try on Ubuntu  16.04.

> Parallel parameterized JUnit test hangs on Linux
> 
>
> Key: SUREFIRE-1430
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1430
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Junit 4.7+ (parallel) support
>Affects Versions: 2.18, 2.18.1, 2.19, 2.19.1, 2.20, 2.20.1
> Environment: Linux/Ubuntu
>Reporter: Christian Beikov
>Assignee: Tibor Digana
> Fix For: 2.21.1
>
>
> This is a follow up of SUREFIRE-1264. The test case is here: 
> https://github.com/beikov/surefire-test
> The problem is, that a simple parameterized JUnit test hangs when running in 
> parallel mode on Linux.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)