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

AbstractRouter internal error on message null from peer null #6088

Closed
fab-10 opened this issue Aug 17, 2022 · 4 comments · Fixed by #6134
Closed

AbstractRouter internal error on message null from peer null #6088

fab-10 opened this issue Aug 17, 2022 · 4 comments · Fixed by #6134

Comments

@fab-10
Copy link

fab-10 commented Aug 17, 2022

Description

Since the update to Teku 22.8.0 yesterday, I have seen a couple of these errors AbstractRouter internal error on message null from peer null, never seen before, stack trace:

 io.libp2p.core.InternalErrorException: [peerHandler] not initialized yet
	at io.libp2p.etc.util.P2PService$StreamHandler.getPeerHandler(P2PService.kt:106)
	at io.libp2p.etc.util.P2PService.streamDisconnected(P2PService.kt:169)
	at io.libp2p.etc.util.P2PService$StreamHandler$channelUnregistered$1.invoke(P2PService.kt:92)
	at io.libp2p.etc.util.P2PService$StreamHandler$channelUnregistered$1.invoke(P2PService.kt:90)
	at io.libp2p.etc.util.P2PService.runOnEventThread$lambda-0(P2PService.kt:234)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)

Steps to Reproduce (Bug)

Run Teku 22.8.0, it is not deterministic, it happened twice in a day

Expected behavior: [What you expect to happen]

Actual behavior: [What actually happens]

Frequency: [How regularly does it occur?]
it happened twice in a day

Versions (Add all that apply)

  • Software version: 22.8.0
  • Java version: Java17
@ajsutton
Copy link
Contributor

Thanks, we'll look into this. FYI @Nashatyrev though you don't necessarily have to look into it. :)

@Nashatyrev
Copy link
Contributor

Yep, the same on my side after the update

@jimmygchen
Copy link
Contributor

jimmygchen commented Aug 18, 2022

Running into the same issue as well, got a bit curious and was wondering if it has anything to do with this recent change in jvm-libp2p:

P2PService.kt
image

I'm not familiar with the code but it looks like stream.getPeerHandler is called even when steam is closed on initialization, which would always throw due to peerHandler not being set, as documented here:
image

I've raised a PR here, but not sure how to reproduce and test - may need some feedback from someone familiar with the code base:
libp2p/jvm-libp2p#254

Nashatyrev pushed a commit to libp2p/jvm-libp2p that referenced this issue Aug 19, 2022
* Fix an issue (Consensys/teku#6088) where `stream.getPeerHandler` is called even when steam is closed on initialization, which would always throw due to `peerHandler` not being set
@Nashatyrev
Copy link
Contributor

The WARN has gone when running with merged libp2p/jvm-libp2p#254, thanks @jimmygchen !
So the issue could be closed when the next libp2p version integrated

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

Successfully merging a pull request may close this issue.

4 participants