Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test flaky failure observed #1296

Open
java-codehunger opened this issue Jan 22, 2023 · 0 comments
Open

Test flaky failure observed #1296

java-codehunger opened this issue Jan 22, 2023 · 0 comments

Comments

@java-codehunger
Copy link

java-codehunger commented Jan 22, 2023

Describe the bug
I ran this test for many many times in normal settings and got the following failures for many times.

Debug log
Running org.java_websocket.issues.Issue580Test
WebSocketConnectReadThread-41
at java.base@11.0.17/java.net.SocketInputStream.socketRead0(Native Method)
at java.base@11.0.17/java.net.SocketInputStream.socketRead(SocketInputStream.java:115)
at java.base@11.0.17/java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.base@11.0.17/java.net.SocketInputStream.read(SocketInputStream.java:140)
at java.base@11.0.17/java.net.SocketInputStream.read(SocketInputStream.java:126)
at app//org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:515)
at java.base@11.0.17/java.lang.Thread.run(Thread.java:829)

WebSocketWriteThread-42
at java.base@11.0.17/jdk.internal.misc.Unsafe.park(Native Method)
at java.base@11.0.17/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
at java.base@11.0.17/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
at java.base@11.0.17/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:433)
at app//org.java_websocket.client.WebSocketClient$WebsocketWriteThread.runWriteData(WebSocketClient.java:816)
at app//org.java_websocket.client.WebSocketClient$WebsocketWriteThread.run(WebSocketClient.java:799)
at java.base@11.0.17/java.lang.Thread.run(Thread.java:829)

connectionLostChecker-1
at java.base@11.0.17/jdk.internal.misc.Unsafe.park(Native Method)
at java.base@11.0.17/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
at java.base@11.0.17/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123)
at java.base@11.0.17/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182)
at java.base@11.0.17/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
at java.base@11.0.17/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
at java.base@11.0.17/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
at java.base@11.0.17/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base@11.0.17/java.lang.Thread.run(Thread.java:829)
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.48 s <<< FAILURE! - in org.java_websocket.issues.Issue580Test
[ERROR] runNoCloseBlockingTestScenario7 Time elapsed: 1.44 s <<< FAILURE!
java.lang.AssertionError: Found 3 zombie thread(s)

[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] Issue580Test.runNoCloseBlockingTestScenario[7] Found 3 zombie thread(s)
[INFO]
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0

Steps to reproduce the behavior:
I run the following command many times without modifying anything.

mvn test -Dtest=org.java_websocket.issues.Issue580Test#runNoCloseBlockingTestScenario[7]

This test is also possible to make consistently fail if we inject 100ms delay before the line 496 of the Draft_6455.java

Expected behavior:
Test failure should not occur

Environment(please complete the following information):
I ran the test on an Ubuntu 20.04 LTS machine using OpenJDK 1.8.0_312.

@Alisha-0321 Alisha-0321 mentioned this issue Jan 22, 2023
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant