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

runtime: netpollblock hang #13049

Closed
guotie opened this issue Oct 26, 2015 · 6 comments
Closed

runtime: netpollblock hang #13049

guotie opened this issue Oct 26, 2015 · 6 comments
Milestone

Comments

@guotie
Copy link

guotie commented Oct 26, 2015

goroutine 85 [IO wait, 84 minutes]:
net.runtime_pollWait(0x2aaaaaab0368, 0x77, 0xc82000a1a0)
/usr/local/go/src/runtime/netpoll.go:157 +0x60
net.(_pollDesc).Wait(0xc8201600d0, 0x77, 0x0, 0x0)
/usr/local/go/src/net/fd_poll_runtime.go:73 +0x3a
net.(_pollDesc).WaitWrite(0xc8201600d0, 0x0, 0x0)
/usr/local/go/src/net/fd_poll_runtime.go:82 +0x36
net.(_netFD).Write(0xc820160070, 0xc928a98000, 0x156, 0x1000, 0x27, 0x2aaaaaaab050, 0xc82000a1a0)
/usr/local/go/src/net/fd_unix.go:318 +0x414
net.(_conn).Write(0xc820034028, 0xc928a98000, 0x156, 0x1000, 0x0, 0x0, 0x0)
/usr/local/go/src/net/net.go:184 +0xe4
bufio.(_Writer).flush(0xc9294c4240, 0x0, 0x0)
/usr/local/go/src/bufio/bufio.go:562 +0xe0
bufio.(_Writer).Flush(0xc9294c4240, 0x0, 0x0)
/usr/local/go/src/bufio/bufio.go:551 +0x2d
github.com/guotie/stomp.(*Writer).Write(0xc8200340a8, 0xc924bd5ec0, 0x0, 0x0)
/root/go/src/github.com/guotie/stomp/writer.go:100 +0xb4
github.com/guotie/stomp.processLoop(0xc8201600e0, 0xc8200340a8)
/root/go/src/github.com/guotie/stomp/conn.go:553 +0x1520
created by github.com/guotie/stomp.Connect
/root/go/src/github.com/guotie/stomp/conn.go:210 +0xd6d

@guotie
Copy link
Author

guotie commented Oct 26, 2015

goroutine 87 [IO wait]:
net.runtime_pollWait(0x2aaaaaab02a8, 0x72, 0xc82000a1a0)
/usr/local/go/src/runtime/netpoll.go:157 +0x60
net.(_pollDesc).Wait(0xc820161950, 0x72, 0x0, 0x0)
/usr/local/go/src/net/fd_poll_runtime.go:73 +0x3a
net.(_pollDesc).WaitRead(0xc820161950, 0x0, 0x0)
/usr/local/go/src/net/fd_poll_runtime.go:78 +0x36
net.(_netFD).Read(0xc8201618f0, 0xc92b57e000, 0x1000, 0x1000, 0x0, 0x2aaaaaaab050, 0xc82000a1a0)
/usr/local/go/src/net/fd_unix.go:232 +0x23a
net.(_conn).Read(0xc820035270, 0xc92b57e000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/go/src/net/net.go:172 +0xe4
bufio.(_Reader).fill(0xc92b58b4a0)
/usr/local/go/src/bufio/bufio.go:97 +0x1e9
bufio.(_Reader).ReadSlice(0xc92b58b4a0, 0xc92b57e10a, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/bufio/bufio.go:328 +0x21a
bufio.(_Reader).ReadBytes(0xc92b58b4a0, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/bufio/bufio.go:406 +0xa9
github.com/guotie/stomp.(_Reader).readLine(0xc820035278, 0x0, 0x0, 0x0, 0x0, 0x0)
/root/go/src/github.com/guotie/stomp/reader.go:135 +0x4e
github.com/guotie/stomp.(*Reader).Read(0xc820035278, 0xc92b58b7a0, 0x0, 0x0)
/root/go/src/github.com/guotie/stomp/reader.go:43 +0x45
github.com/guotie/stomp.readLoop(0xc820161a40, 0xc820035278)
/root/go/src/github.com/guotie/stomp/conn.go:250 +0x51
created by github.com/guotie/stomp.Connect
/root/go/src/github.com/guotie/stomp/conn.go:208 +0xd3e

@ianlancetaylor ianlancetaylor changed the title netpollblock hanged runtime: netpollblock hang Oct 26, 2015
@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Oct 26, 2015
@ianlancetaylor
Copy link
Member

What program are you running? What operating system? What version of Go? Is this easy to reproduce?

Are you sure this is a bug? If there is no network activity, then it is normal for this goroutine to wait.

@guotie
Copy link
Author

guotie commented Oct 26, 2015

OS: Linux; CentOS 6.4 x64
Go: 1.5.1
This is not easy to reproduce.

I use stomp to connect activeMQ, I'm sure the network is Ok and there should be data to send/recv, but the program hangs.

I use the net lib is always ok, but the stomp lib has hangs several times, I'm not sure if it is a golang's bug, but the stack shows it hangs at golang libary.

@guotie
Copy link
Author

guotie commented Oct 26, 2015

stomp: https://github.com/guotie/stomp

@ianlancetaylor
Copy link
Member

In order to fix any possible bug, we need more information. It is entirely normal for a goroutine reading from a descriptor to hang at that point waiting for more data on the socket.

For example, please set the environment variable GOTRACEBACK=2 and show us the entire stack dump of the program when it is hanging. It might also help to see the output of strace -f for a few minutes before the hang.

@guotie
Copy link
Author

guotie commented Oct 27, 2015

I reviewed activemq call stack, I think this should be activemq bug.

@guotie guotie closed this as completed Oct 27, 2015
@golang golang locked and limited conversation to collaborators Oct 26, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants