panic: epoll_ctl: bad file descriptor

696 views
Skip to first unread message

Jackie Li

unread,
Dec 7, 2012, 7:42:21 AM12/7/12
to golang-nuts
Hello everyone,

I was trying to install go on this RHEL 5 (Tikanga) machine. and got this epoll_ctl: bad file descriptor error.

I did some googling but nothing promising... does anyone have idea on which part went wrong?

is it my libc is wrong? or is it bug in go?

$ uname -a
Linux r5000 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:14 EST 2007 x86_64 x86_64 x86_64 GNU/Linux
$ go version
go version devel +a5efcd1675eb Thu Dec 06 09:47:12 2012 -0800


$ go test net/http
panic: epoll_ctl: bad file descriptor [recovered]
        panic: epoll_ctl: bad file descriptor

goroutine 29 [running]:
testing.func·003(0x2aaaaab10fa8, 0x2aaaaab10100)
        /home/pbank/xs_env/xs_go/go/src/pkg/testing/testing.go:296 +0xc3
----- stack segment boundary -----
net.startServer(0x0, 0xc200114ca2)
        /home/pbank/xs_env/xs_go/go/src/pkg/net/fd_unix.go:276 +0x5b
net.func·019(0xc2000aa038, 0x4c87fb)
        /home/pbank/xs_env/xs_go/go/src/pkg/net/fd_unix.go:269 +0x28
sync.(*Once).Do(0xc20008b2a0, 0xc200114c80, 0xc2000aa038, 0xc200114c80)
        /home/pbank/xs_env/xs_go/go/src/pkg/sync/once.go:40 +0x7b
net.func·020(0xc2000aa040, 0xc2000aa038, 0x542bb5, 0x0)
        /home/pbank/xs_env/xs_go/go/src/pkg/net/dial.go:0 +0x53
net.server(0x5, 0x1, 0xc2000e10e0, 0x0)
        /home/pbank/xs_env/xs_go/go/src/pkg/net/fd_unix.go:287 +0x75
net.newFD(0x5, 0x2, 0x1, 0x727730, 0x3, ...)
        /home/pbank/xs_env/xs_go/go/src/pkg/net/fd_unix.go:303 +0x101
net.socket(0x727730, 0x3, 0x2, 0x1, 0x0, ...)
        /home/pbank/xs_env/xs_go/go/src/pkg/net/sock_posix.go:53 +0x2ea
net.internetSocket(0x727730, 0x3, 0xc200001870, 0xc20035dd80, 0x0, ...)
        /home/pbank/xs_env/xs_go/go/src/pkg/net/ipsock_posix.go:146 +0x425
net.ListenTCP(0x727730, 0x3, 0xc20035dd80, 0xc20035dd80, 0xffffffffffffff01, ...)
        /home/pbank/xs_env/xs_go/go/src/pkg/net/tcpsock_posix.go:293 +0x1a9
net.Listen(0x727730, 0x3, 0x72b8d0, 0xb, 0xc200000000, ...)
        /home/pbank/xs_env/xs_go/go/src/pkg/net/dial.go:204 +0x1fb
net/http/httptest.newLocalListener(0x40a4b5, 0x902a78)
        /home/pbank/xs_env/xs_go/go/src/pkg/net/http/httptest/server.go:61 +0x20e
net/http/httptest.NewUnstartedServer(0xc200000c30, 0x48f620, 0x30, 0x902a78, 0x46342c, ...)
        /home/pbank/xs_env/xs_go/go/src/pkg/net/http/httptest/server.go:92 +0x1c
net/http/httptest.NewServer(0xc200000c30, 0x48f620, 0xc200000d20, 0x40394b, 0x2aaaaaaac040, ...)
        /home/pbank/xs_env/xs_go/go/src/pkg/net/http/httptest/server.go:79 +0x2f
net/http_test.TestClient(0xc2000a93f0, 0x31300a8)
        /home/pbank/xs_env/xs_go/go/src/pkg/net/http/client_test.go:57 +0x4c
testing.tRunner(0xc2000a93f0, 0x8ffea8, 0x0, 0x0)
        /home/pbank/xs_env/xs_go/go/src/pkg/testing/testing.go:301 +0x6c
created by testing.RunTests
        /home/pbank/xs_env/xs_go/go/src/pkg/testing/testing.go:377 +0x86e

goroutine 1 [chan receive]:
testing.RunTests(0x400c00, 0x8ffc38, 0x85, 0x85, 0x2aaaaab0ef01, ...)
        /home/pbank/xs_env/xs_go/go/src/pkg/testing/testing.go:378 +0x891
testing.Main(0x400c00, 0x8ffc38, 0x85, 0x85, 0x8f7e00, ...)
        /home/pbank/xs_env/xs_go/go/src/pkg/testing/testing.go:313 +0x8a
main.main()
        net/http/_test/_testmain.go:319 +0x9a

goroutine 2 [syscall]:
created by runtime.main
        /home/pbank/xs_env/xs_go/go/src/pkg/runtime/proc.c:225
FAIL    net/http        0.426s


--
Jackie

Dave Cheney

unread,
Dec 7, 2012, 7:46:41 AM12/7/12
to Jackie Li, golang-nuts

This panic has since been converted to be an error. Please try compiling tip from source.

Please note that rhel5s 2.6.18 kernel is too old to run all the tests properly, but most folks report few problems in practice.

Dave

--
 
 

Jackie Li

unread,
Dec 7, 2012, 7:52:37 AM12/7/12
to Dave Cheney, golang-nuts
Hi Dave,

Thanks for your reply,

I did compile go from source, you can see my `go version` output:
$ go version
go version devel +a5efcd1675eb Thu Dec 06 09:47:12 2012 -0800
$ hg parent
changeset:   15062:a5efcd1675eb
tag:         tip
user:        Robert Griesemer <g...@golang.org>
date:        Thu Dec 06 09:47:12 2012 -0800
summary:     fix build: remove a flaky test for now


On Fri, Dec 7, 2012 at 12:46 PM, Dave Cheney <da...@cheney.net> wrote:

This panic has since been converted to be an error. Please try compiling tip from source.

Please note that rhel5s 2.6.18 kernel is too old to run all the tests properly, but most folks report few problems in practice.




--
Jackie

Dave Cheney

unread,
Dec 7, 2012, 7:55:03 AM12/7/12
to Jackie Li, golang-nuts

Interesting. Looking at the panic again it failed during startup trying to open the epoll file descriptor.

Jackie Li

unread,
Dec 7, 2012, 9:08:48 AM12/7/12
to Dave Cheney, golang-nuts
Update,

just tried:
$ export GOARCH="386" ./all.bash

although I see lots of tests fail, but I managed to build my program and it ran.

but still don't understand why it's platform x86_64 but works when build as x86.

is it that the /lib64/libc* is this incorrect version?
--
Jackie

Dave Cheney

unread,
Dec 7, 2012, 4:03:21 PM12/7/12
to Jackie Li, golang-nuts
hmm, Go does not use libc so that is unlikely to be the problem. Can
you please rebuild under amd64 and strace your program and grep for
epoll. Although RHEL5 is not a supported kernel, it would be nice to
fix this if this is a simple fix.
Reply all
Reply to author
Forward
0 new messages