FAQ
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

--

Search Discussions

  • Dave Cheney at Dec 7, 2012 at 12:46 pm
    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
    On 7 Dec 2012 23:42, "Jackie Li" wrote:

    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

    --

    --
  • Jackie Li at Dec 7, 2012 at 12:53 pm
    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 <gri@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 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 at Dec 7, 2012 at 1:02 pm
    Interesting. Looking at the panic again it failed during startup trying to
    open the epoll file descriptor.
    On 7 Dec 2012 23:52, "Jackie Li" wrote:

    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 <gri@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 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
    --
  • Jackie Li at Dec 7, 2012 at 2:09 pm
    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?

    On Fri, Dec 7, 2012 at 12:55 PM, Dave Cheney wrote:

    Interesting. Looking at the panic again it failed during startup trying to
    open the epoll file descriptor.
    On 7 Dec 2012 23:52, "Jackie Li" wrote:

    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 <gri@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 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

    --
    Jackie

    --
  • Dave Cheney at Dec 7, 2012 at 9:03 pm
    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.
    On Sat, Dec 8, 2012 at 1:08 AM, Jackie Li wrote:
    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?

    On Fri, Dec 7, 2012 at 12:55 PM, Dave Cheney wrote:

    Interesting. Looking at the panic again it failed during startup trying to
    open the epoll file descriptor.
    On 7 Dec 2012 23:52, "Jackie Li" wrote:

    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 <gri@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 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



    --
    Jackie
    --

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedDec 7, '12 at 12:42p
activeDec 7, '12 at 9:03p
posts6
users2
websitegolang.org

2 users in discussion

Dave Cheney: 3 posts Jackie Li: 3 posts

People

Translate

site design / logo © 2021 Grokbase