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

Intermittent exception: java.net.SocketException: Bad file descriptor #107

Open
hohonuuli opened this issue Jun 23, 2020 · 2 comments
Open
Labels
bug Something isn't working

Comments

@hohonuuli
Copy link

When I run seed commands, they all seem to run and complete just fine but about every once in a while I get the following exception at the end of the command's execution:

Jun 22, 2020 6:44:04 PM org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor run
SEVERE: java.net.SocketException: Bad file descriptor
org.eclipse.lsp4j.jsonrpc.JsonRpcException: java.net.SocketException: Bad file descriptor
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:120)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:99)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.net.SocketException: Bad file descriptor
	at org.newsclub.net.unix.NativeUnixSocket.read(Native Method)
	at org.newsclub.net.unix.AFUNIXSocketImpl$AFUNIXInputStream.read(AFUNIXSocketImpl.java:312)
	at org.newsclub.net.unix.AFUNIXSocketImpl$AFUNIXInputStream.read(AFUNIXSocketImpl.java:319)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:79)
	... 6 more

I'm running on macOS 10.15.5

@tindzk
Copy link
Owner

tindzk commented Jun 27, 2020

I remember having seen similar stack traces in the past.

It looks as if the BSP server terminates prematurely without Seed expecting it. I have just tested a couple of commands (run --watch, run, link etc.), but could not reproduce the bug on Linux with Bloop 1.4.2.

@tindzk tindzk added the bug Something isn't working label Dec 8, 2020
@tindzk
Copy link
Owner

tindzk commented Dec 10, 2020

I can reproduce this bug locally and in Drone CI by running BloopIntegrationSpec. It still occurs even after upgrading to the latest Bloop version.

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