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
What steps will reproduce the problem?
1. build the code, sometimes the websocket test hangs
2. if it doesn't, cd src/pkg/websocket/
make test
<watch>
usually only a few attempts is needed for me; f.e.:
cw@lysdexia:~/wk/go/go.hg/src/pkg/websocket$ for t in {1..100} ; do ./6.out ; done
[...]
hangs within a few iterations
this never hangs:
cw@lysdexia:~/wk/go/go.hg/src/pkg/websocket$ for t in {1..100} ; do GOMAXPROCS=2 ./6.out ; done
[...]
What is your $GOOS? $GOARCH?
linux amd64
Which revision are you using? (hg identify)
6ccdfb494664+ tip
FWIW, the hang is inside "ws.Close();" at the end of websocket_test.go though
it's not clear why
to be looking at this. The hang is not in the main thread of execution as you can see:
write(7, "\0hello, world\n\377"..., 15) = 15
read(7, "\0hello, world\n\377"..., 4096) = 15
fcntl(7, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl(7, F_SETFL, O_RDWR) = 0
write(5, "\0"..., 1) = 1
close(7) = 0
futex(0x4aae48, FUTEX_WAIT, 3, {1073741824, 0}
and another (OS) thread is burning all the CPU. That thread is not making any system
calls (I
thought perhaps the socket close was causing some goroutine to spin on an error, but
that would
show up tracing the thread that's consuming all the CPU cycles).
The text was updated successfully, but these errors were encountered:
This may be the same error I am having - darwin/amd64
When I ctrl-C it, this pops up
--- cd ../test
^C0a1,151
>
> == ./
>
> =========== ./cmp2.go
> comparing uncomparable type []int
> throw: interface compare
(more output)
So, perhaps something in cmp1.go?
Looks like there is some confusion where err is shadowed so the return codes aren't
working entirely as expected.
http://golang.org/cl/163055 is an initial fix I did after dho pointed out the
return values didn't appear to be coming out right.
A better fix will come a bit later after some more testing.
mikioh
changed the title
websocket test hangs (sometimes) with GOMAXPROCS=1 ; spins eating CPOU
x/net/websocket: test hangs (sometimes) with GOMAXPROCS=1 ; spins eating CPU
Jul 30, 2015
by cw@f00f.org:
The text was updated successfully, but these errors were encountered: