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

IngressImpl run() threw ClosedChannelException: null #10

Open
StrongestNumber9 opened this issue Jul 1, 2024 · 1 comment
Open

IngressImpl run() threw ClosedChannelException: null #10

StrongestNumber9 opened this issue Jul 1, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@StrongestNumber9
Copy link
Contributor

StrongestNumber9 commented Jul 1, 2024

Describe the bug

Hitting ^C while running tcpflood towards https://github.com/kortemik/cfe_35/tree/to-9

+11:05:11.747 [pool-2-thread-1] ERROR com.teragrep.net_01.channel.context.IngressImpl - run() threw
java.net.SocketException: Connection reset
        at sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:401) ~[?:?]
        at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:478) ~[?:?]
        at java.nio.channels.SocketChannel.read(SocketChannel.java:630) ~[?:?]
        at com.teragrep.net_01.channel.socket.PlainSocket.read(PlainSocket.java:65) ~[cfe_35.jar:0.0.1-SNAPSHOT]
        at com.teragrep.net_01.channel.context.IngressImpl.readData(IngressImpl.java:237) ~[cfe_35.jar:0.0.1-SNAPSHOT]
        at com.teragrep.net_01.channel.context.IngressImpl.run(IngressImpl.java:103) ~[cfe_35.jar:0.0.1-SNAPSHOT]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.lang.Thread.run(Thread.java:1583) ~[?:?]
11:05:11.749 [pool-2-thread-1] ERROR com.teragrep.net_01.channel.context.IngressImpl - run() threw
java.nio.channels.ClosedChannelException: null
        at sun.nio.ch.SocketChannelImpl.ensureOpenAndConnected(SocketChannelImpl.java:222) ~[?:?]
        at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:454) ~[?:?]
        at java.nio.channels.SocketChannel.read(SocketChannel.java:630) ~[?:?]
        at com.teragrep.net_01.channel.socket.PlainSocket.read(PlainSocket.java:65) ~[cfe_35.jar:0.0.1-SNAPSHOT]
        at com.teragrep.net_01.channel.context.IngressImpl.readData(IngressImpl.java:237) ~[cfe_35.jar:0.0.1-SNAPSHOT]
        at com.teragrep.net_01.channel.context.IngressImpl.run(IngressImpl.java:103) ~[cfe_35.jar:0.0.1-SNAPSHOT]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.lang.Thread.run(Thread.java:1583) ~[?:?]



11:05:21.202 [pool-2-thread-1] ERROR com.teragrep.net_01.channel.context.IngressImpl - run() threw
java.nio.channels.ClosedChannelException: null
        at sun.nio.ch.SocketChannelImpl.ensureOpenAndConnected(SocketChannelImpl.java:222) ~[?:?]
        at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:454) ~[?:?]
        at java.nio.channels.SocketChannel.read(SocketChannel.java:630) ~[?:?]
        at com.teragrep.net_01.channel.socket.PlainSocket.read(PlainSocket.java:65) ~[cfe_35.jar:0.0.1-SNAPSHOT]
        at com.teragrep.net_01.channel.context.IngressImpl.readData(IngressImpl.java:237) ~[cfe_35.jar:0.0.1-SNAPSHOT]
        at com.teragrep.net_01.channel.context.IngressImpl.run(IngressImpl.java:103) ~[cfe_35.jar:0.0.1-SNAPSHOT]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.lang.Thread.run(Thread.java:1583) ~[?:?]
11:05:26.730 [pool-2-thread-1] ERROR com.teragrep.net_01.channel.context.IngressImpl - run() threw
java.nio.channels.ClosedChannelException: null
        at sun.nio.ch.SocketChannelImpl.ensureOpenAndConnected(SocketChannelImpl.java:222) ~[?:?]
        at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:454) ~[?:?]
        at java.nio.channels.SocketChannel.read(SocketChannel.java:630) ~[?:?]
        at com.teragrep.net_01.channel.socket.PlainSocket.read(PlainSocket.java:65) ~[cfe_35.jar:0.0.1-SNAPSHOT]
        at com.teragrep.net_01.channel.context.IngressImpl.readData(IngressImpl.java:237) ~[cfe_35.jar:0.0.1-SNAPSHOT]
        at com.teragrep.net_01.channel.context.IngressImpl.run(IngressImpl.java:103) ~[cfe_35.jar:0.0.1-SNAPSHOT]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.lang.Thread.run(Thread.java:1583) ~[?:?]

Expected behavior

Graceful disconnection handling

How to reproduce

Run server
java -Dcfe07LookupPath=src/test/resources/cfe_07 -Dcfe16LookupPath=src/test/resources/cfe_16 -Dkin02LookupPath=src/test/resources/kin_02 -DroutingTargetsConfig=src/test/resources/targetsPerformanceTest.json -DlistenPort=4600 -jar target/cfe_35.jar

Run tcpflood and interrupt it with ^C
tcpflood -t 127.0.0.1 -T relp-plain -p 4600 -m 10000000 -M "<14>1 2020-05-15T13:24:03.603Z performance-test-host performance-test-tag - - - hello

Software version

cfe_35
commit 2eba9c65400b1496ca23d4a295378b2c59891d00 (HEAD -> to-9, origin/to-9)
rlp_03 8.0.0

Additional context

@StrongestNumber9 StrongestNumber9 added the bug Something isn't working label Jul 1, 2024
@StrongestNumber9
Copy link
Contributor Author

It is easy to reproduce when using a Consumer<FrameContext> that takes a while to process, like with Thread.sleep(5000); and then just closing the connection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants