You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a node is sent to background (^z + bg) it stops answering pings from other nodes. The issue is also present when the node is a run as a background process using &. I didn't investigate further issues caused by running the node in the background other than not answering pings (for e.g. handling incoming message).
Expected behavior
I expect the node to have similar behavior when run/put in background as when it is running in foreground.
How to reproduce it
This behavior is entirely reproducible using the chat example running on a ubuntu:18.4-based docker image with GNU bash-4.4.20(1)-release.
get the chat example go get -d -v github.com/perlin-network/noise/cmd/chat
run a first instance of the chat example go run github.com/perlin-network/noise/cmd/chat -p 9000
on a separate terminal, run a second instance of the chat example to join the first one go run github.com/perlin-network/noise/cmd/chat -p 9001 127.0.0.1:9000. Both nodes should learn about each other
send the first instance (listening on port 9000) to the background by pressing Ctrl+Z and then executing command bg
run a thrid instance of the chat example with first instance's address as bootstrap node go run github.com/perlin-network/noise/cmd/chat -p 9003 127.0.0.1:9000. This node will shortly report that it cannot ping the bootstrap node.
Suggestions
From jobs output, it seems that the node process doesn't switch to be Running when executing bg after being stopped by Ctrl+Z.
The issue could be related to the input goroutine not having access to stdin, unfortunately I am very new to go and cannot provide suggestions about goroutine interactions with the shell.
The text was updated successfully, but these errors were encountered:
Issue
When a node is sent to background (
^z
+bg
) it stops answering pings from other nodes. The issue is also present when the node is a run as a background process using&
. I didn't investigate further issues caused by running the node in the background other than not answering pings (for e.g. handling incoming message).Expected behavior
I expect the node to have similar behavior when run/put in background as when it is running in foreground.
How to reproduce it
This behavior is entirely reproducible using the chat example running on a
ubuntu:18.4
-based docker image withGNU bash-4.4.20(1)-release
.go get -d -v github.com/perlin-network/noise/cmd/chat
go run github.com/perlin-network/noise/cmd/chat -p 9000
go run github.com/perlin-network/noise/cmd/chat -p 9001 127.0.0.1:9000
. Both nodes should learn about each otherCtrl+Z
and then executing commandbg
go run github.com/perlin-network/noise/cmd/chat -p 9003 127.0.0.1:9000
. This node will shortly report that it cannot ping the bootstrap node.Suggestions
From
jobs
output, it seems that the node process doesn't switch to beRunning
when executingbg
after being stopped byCtrl+Z
.The issue could be related to the input goroutine not having access to stdin, unfortunately I am very new to go and cannot provide suggestions about goroutine interactions with the shell.
The text was updated successfully, but these errors were encountered: