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

[WebSocket] Echo sample malfunctions with Tyrus WebSocket Client #3049

Closed
irunika opened this issue Jul 24, 2017 · 1 comment
Closed

[WebSocket] Echo sample malfunctions with Tyrus WebSocket Client #3049

irunika opened this issue Jul 24, 2017 · 1 comment
Assignees

Comments

@irunika
Copy link
Contributor

irunika commented Jul 24, 2017

When sending messages frequently using Tyrus WebSocket client suddenly messages receiving get stopped.

Here is the Thread dump of Ballerina when the issue is reproduced.

"nioEventLoopGroup-8-1" #22 prio=10 os_prio=2 tid=0x0000000016e83800 nid=0x1e4c
runnable [0x000000001924e000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.j
ava:296)
at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(WindowsSelector
Impl.java:278)
at sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:159)

    at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
    - locked <0x00000000eec65048> (a io.netty.channel.nio.SelectedSelectionK

eySet)
- locked <0x00000000eec677c0> (a java.util.Collections$UnmodifiableSet)
- locked <0x00000000eeb10180> (a sun.nio.ch.WindowsSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
at io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:746)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:391)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThread
EventExecutor.java:858)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorato
r.run(DefaultThreadFactory.java:144)
at java.lang.Thread.run(Thread.java:745)

"DestroyJavaVM" #21 prio=5 os_prio=0 tid=0x0000000002052800 nid=0xb08 waiting on
condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"Thread-4" #20 prio=5 os_prio=0 tid=0x0000000016d2a800 nid=0xb70 in Object.wait(
) [0x000000001914e000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000eec67500> (a io.netty.channel.AbstractChannel$Cl
oseFuture)
at java.lang.Object.wait(Object.java:502)
at io.netty.util.concurrent.DefaultPromise.await(DefaultPromise.java:232
)
- locked <0x00000000eec67500> (a io.netty.channel.AbstractChannel$CloseF
uture)
at io.netty.channel.DefaultChannelPromise.await(DefaultChannelPromise.ja
va:129)
at io.netty.channel.DefaultChannelPromise.await(DefaultChannelPromise.ja
va:28)
at io.netty.util.concurrent.DefaultPromise.sync(DefaultPromise.java:333)

    at io.netty.channel.DefaultChannelPromise.sync(DefaultChannelPromise.jav

a:117)
at io.netty.channel.DefaultChannelPromise.sync(DefaultChannelPromise.jav
a:28)
at org.ballerinalang.composer.service.workspace.langserver.LangServer.st
artListening(LangServer.java:84)
at org.ballerinalang.composer.service.workspace.langserver.LangServer.ac
cess$000(LangServer.java:35)
at org.ballerinalang.composer.service.workspace.langserver.LangServer$1.
run(LangServer.java:64)
at java.lang.Thread.run(Thread.java:745)

"nioEventLoopGroup-6-1" #19 prio=10 os_prio=2 tid=0x0000000016e82000 nid=0x2230
runnable [0x000000001904e000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.j
ava:296)
at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(WindowsSelector
Impl.java:278)
at sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:159)

    at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
    - locked <0x00000000eeb03920> (a io.netty.channel.nio.SelectedSelectionK

eySet)
- locked <0x00000000eeb03940> (a java.util.Collections$UnmodifiableSet)
- locked <0x00000000eeb038a0> (a sun.nio.ch.WindowsSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
at io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:746)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:391)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThread
EventExecutor.java:858)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorato
r.run(DefaultThreadFactory.java:144)
at java.lang.Thread.run(Thread.java:745)

"Thread-3" #18 prio=5 os_prio=0 tid=0x0000000016d2d000 nid=0x25cc in Object.wait
() [0x0000000018f4e000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000eeb18178> (a io.netty.channel.AbstractChannel$Cl
oseFuture)
at java.lang.Object.wait(Object.java:502)
at io.netty.util.concurrent.DefaultPromise.await(DefaultPromise.java:232
)
- locked <0x00000000eeb18178> (a io.netty.channel.AbstractChannel$CloseF
uture)
at io.netty.channel.DefaultChannelPromise.await(DefaultChannelPromise.ja
va:129)
at io.netty.channel.DefaultChannelPromise.await(DefaultChannelPromise.ja
va:28)
at io.netty.util.concurrent.DefaultPromise.sync(DefaultPromise.java:333)

    at io.netty.channel.DefaultChannelPromise.sync(DefaultChannelPromise.jav

a:117)
at io.netty.channel.DefaultChannelPromise.sync(DefaultChannelPromise.jav
a:28)
at org.ballerinalang.composer.service.workspace.launcher.LaunchServer.st
artListning(LaunchServer.java:82)
at org.ballerinalang.composer.service.workspace.launcher.LaunchServer.ac
cess$000(LaunchServer.java:38)
at org.ballerinalang.composer.service.workspace.launcher.LaunchServer$1.
run(LaunchServer.java:64)
at java.lang.Thread.run(Thread.java:745)

"nioEventLoopGroup-4-1" #17 prio=10 os_prio=2 tid=0x0000000016d33800 nid=0x202c
runnable [0x0000000018e4f000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.j
ava:296)
at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(WindowsSelector
Impl.java:278)
at sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:159)

    at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
    - locked <0x00000000eeb1b508> (a io.netty.channel.nio.SelectedSelectionK

eySet)
- locked <0x00000000eeb1b528> (a java.util.Collections$UnmodifiableSet)
- locked <0x00000000eeb1b488> (a sun.nio.ch.WindowsSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
at io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:746)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:391)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThread
EventExecutor.java:858)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorato
r.run(DefaultThreadFactory.java:144)
at java.lang.Thread.run(Thread.java:745)

"pool-3-thread-1" #15 prio=5 os_prio=0 tid=0x0000000016b77800 nid=0x280c waiting
on condition [0x0000000018d4f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000eeb08958> (a java.util.concurrent.lock
s.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215
)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject
.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.tak
e(ScheduledThreadPoolExecutor.java:1093)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.tak
e(ScheduledThreadPoolExecutor.java:809)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.ja
va:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:617)
at java.lang.Thread.run(Thread.java:745)

"nioEventLoopGroup-2-1" #14 prio=10 os_prio=2 tid=0x0000000016fce800 nid=0x2ac0
runnable [0x0000000018c4f000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.j
ava:296)
at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(WindowsSelector
Impl.java:278)
at sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:159)

    at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
    - locked <0x00000000eeb0bda8> (a io.netty.channel.nio.SelectedSelectionK

eySet)
- locked <0x00000000eeb0bdc8> (a java.util.Collections$UnmodifiableSet)
- locked <0x00000000eeb0bd28> (a sun.nio.ch.WindowsSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
at io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:746)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:391)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThread
EventExecutor.java:858)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorato
r.run(DefaultThreadFactory.java:144)
at java.lang.Thread.run(Thread.java:745)

"pool-1-thread-1" #12 prio=5 os_prio=0 tid=0x0000000016e22000 nid=0x2334 waiting
on condition [0x000000001777e000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000eeb10578> (a java.util.concurrent.lock
s.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215
)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject
.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.tak
e(ScheduledThreadPoolExecutor.java:1093)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.tak
e(ScheduledThreadPoolExecutor.java:809)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.ja
va:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:617)
at java.lang.Thread.run(Thread.java:745)

"RMI TCP Accept-0" #11 daemon prio=5 os_prio=0 tid=0x00000000163c5800 nid=0x1c2c
runnable [0x000000001677e000]
java.lang.Thread.State: RUNNABLE
at java.net.DualStackPlainSocketImpl.accept0(Native Method)
at java.net.DualStackPlainSocketImpl.socketAccept(DualStackPlainSocketIm
pl.java:131)
at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:
404)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:199)
- locked <0x00000000eeb10c88> (a java.net.SocksSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:545)
at java.net.ServerSocket.accept(ServerSocket.java:513)
at sun.management.jmxremote.LocalRMIServerSocketFactory$1.accept(LocalRM
IServerSocketFactory.java:52)
at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTr
ansport.java:389)
at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:3
61)
at java.lang.Thread.run(Thread.java:745)

"Service Thread" #9 daemon prio=9 os_prio=0 tid=0x0000000014826800 nid=0x4f4 run
nable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"C1 CompilerThread2" #8 daemon prio=9 os_prio=2 tid=0x0000000014824800 nid=0x112
0 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" #7 daemon prio=9 os_prio=2 tid=0x0000000014823000 nid=0x22c
4 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #6 daemon prio=9 os_prio=2 tid=0x000000001481b800 nid=0x291
0 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"Attach Listener" #5 daemon prio=5 os_prio=2 tid=0x000000001482b000 nid=0x1d64 w
aiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" #4 daemon prio=9 os_prio=2 tid=0x000000001482a000 nid=0x169c
runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"Finalizer" #3 daemon prio=8 os_prio=1 tid=0x0000000002148000 nid=0xe44 in Objec
t.wait() [0x0000000015b7e000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000eeb11e90> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:142)
- locked <0x00000000eeb11e90> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:158)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)

"Reference Handler" #2 daemon prio=10 os_prio=2 tid=0x000000000213e000 nid=0x26e
4 in Object.wait() [0x0000000015a7f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000eeb120a8> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:502)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:157)
- locked <0x00000000eeb120a8> (a java.lang.ref.Reference$Lock)

"VM Thread" os_prio=2 tid=0x00000000147e5000 nid=0x2838 runnable

"GC task thread#0 (ParallelGC)" os_prio=0 tid=0x0000000002067000 nid=0x20c4 runn
able

"GC task thread#1 (ParallelGC)" os_prio=0 tid=0x0000000002068800 nid=0x14c8 runn
able

"GC task thread#2 (ParallelGC)" os_prio=0 tid=0x000000000206a000 nid=0x18bc runn
able

"GC task thread#3 (ParallelGC)" os_prio=0 tid=0x000000000206b800 nid=0x1e0c runn
able

"VM Periodic Task Thread" os_prio=2 tid=0x0000000016266000 nid=0xe70 waiting on
condition

JNI global references: 294

@irunika
Copy link
Contributor Author

irunika commented Oct 18, 2017

This was mentioned by a participant in the first Ballerina hackathon and we tried to reproduce this error and it worked fine with all the tests we did for this.

@irunika irunika closed this as completed Oct 18, 2017
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