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

syscall: O_CLOEXEC ineffective on CentOS 5.5 #3780

Closed
gopherbot opened this issue Jun 26, 2012 · 1 comment
Closed

syscall: O_CLOEXEC ineffective on CentOS 5.5 #3780

gopherbot opened this issue Jun 26, 2012 · 1 comment

Comments

@gopherbot
Copy link

by toeoso:

go 1.0.2 INSTALL OK , TEST ERROR:

ok      net/url 0.023s
ok      os      0.059s
--- FAIL: TestExtraFiles-4 (0.29 seconds)
        exec_test.go:158: Something already leaked - closed fd 3
        exec_test.go:199: CombinedOutput: exit status 1; output "leaked parent file. fd = 13; want 10\nCOMMAND     PID USER   FD   TYPE DEVICE    SIZE      NODE NAME\nexec.test 25280 root  cwd    DIR  253,3    4096    239723 /usr/local/go/src/pkg/os/exec\nexec.test 25280 root  rtd    DIR  253,0    4096         2 /\nexec.test 25280 root  txt    REG   0,18 4530152 154648013 /tmp/go-build052533059/os/exec/_test/exec.test\nexec.test 25280 root  mem    REG  253,0  139416    655684 /lib64/ld-2.5.so\nexec.test 25280 root  mem    REG  253,0 1718120    655685 /lib64/libc-2.5.so\nexec.test 25280 root  mem    REG  253,0  145824    655686 /lib64/libpthread-2.5.so\nexec.test 25280 root    0r   CHR    1,3              1135 /dev/null\nexec.test 25280 root    1w  FIFO    0,6         154648251 pipe\nexec.test 25280 root    2w  FIFO    0,6         154648251 pipe\nexec.test 25280 root    3u   REG   0,18      12 154648250 /tmp/879913196\nexec.test 25280 root    4r   REG   0,18 4530152 154648013 /tmp/go-build052533059/os/exec/_test/exec.test\nexec.test 25280 root    5r   REG   0,18 4530152 154648013 /tmp/go-build052533059/os/exec/_test/exec.test\nexec.test 25280 root    6r   REG   0,18 4530152 154648013 /tmp/go-build052533059/os/exec/_test/exec.test\nexec.test 25280 root    7r   REG   0,18 4530152 154648013 /tmp/go-build052533059/os/exec/_test/exec.test\nexec.test 25280 root    8r   REG   0,18 4530152 154648013 /tmp/go-build052533059/os/exec/_test/exec.test\nexec.test 25280 root    9r   REG   0,18 4530152 154648013 /tmp/go-build052533059/os/exec/_test/exec.test\nexec.test 25280 root   10r   CHR    1,9               594 /dev/urandom\nexec.test 25280 root   11u   REG   0,18      12 154648250 /tmp/879913196\nexec.test 25280 root   12r   CHR    1,3              1135 /dev/null\nexec.test 25280 root   13r   REG   0,18 4530152 154648013 /tmp/go-build052533059/os/exec/_test/exec.test\nexec.test 25280 root   15r  FIFO    0,6         154648253 pipe\n"
FAIL
FAIL    os/exec 0.454s
ok      os/signal       0.007s
ok      os/user 0.014s
ok      path    0.008s
@rsc
Copy link
Contributor

rsc commented Jun 26, 2012

Comment 1:

This happens because centos 5.5 does not support O_CLOEXEC. One workaround is to use a
newer version of Linux. Another is to edit the files in src/pkg/syscall:
zerrors_linux_386.go:625:   O_CLOEXEC                        = 0x80000
zerrors_linux_amd64.go:625:     O_CLOEXEC                        = 0x80000
zerrors_linux_arm.go:621:   O_CLOEXEC                        = 0x80000
Pick the one for your architecture (or all three) and change the constant to 0 so that
the libraries know O_CLOEXEC is unsupported.

Status changed to Unfortunate.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
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

2 participants