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

cmd/cgo: TestParallelSleep fails in NetBSD #3964

Closed
gopherbot opened this issue Aug 16, 2012 · 11 comments

Comments

@gopherbot
Copy link

commented Aug 16, 2012

by raul.san@sent.com:

Fail at compiling Go in NetBSD 6.0 beta2 (amd64)
go version weekly.2012-03-27 +9a3c164b3231

* * *

# ../misc/cgo/stdio

# ../misc/cgo/life

# ../misc/cgo/test
--- FAIL: TestParallelSleep (2.00 seconds)
_cgo_gotypes.go:727:    parallel 1-second sleeps slept for 2.001244 seconds
FAIL

* * *
I also saw that test for time took too time:

ok      time    89.827s
@4a6f656c

This comment has been minimized.

Copy link
Contributor

commented Aug 22, 2012

Comment 1:

On the machines that I have, the test works correctly on both NetBSD 6.0 BETA2 amd64 and
i386. Unfortunately there is insufficient information in this bug report to know
anything about your environment, however there is a good chance it is related to a
timecounter issue or the process being starved of CPU time. If I had to guess, I'd say
that you're probably running on a (badly?) virtualised platform.
Is this 100% repeatable?
Is this on a virtualised or physical machine? If virtualised, what platform?
Is this a single or multiprocessor machine?

Status changed to WaitingForReply.

@gopherbot

This comment has been minimized.

Copy link
Author

commented Aug 22, 2012

Comment 2 by raul.san@sent.com:

I just compile it again, and it was ok, so it is not 100 repeatable; but you have in
mind that, the another date, when I was compiling  Go in several VMs (once at time), the
only OS that shows that error was NetBSD.
Now, the time test took:
ok      time    26.393s
The only error that I have now is:
run        nilptr.go           : incorrect output
fork/exec /tmp/go-build767292044/command-line-arguments/_obj/a.out: cannot allocate
memory
I've to change ulimit -d
* * *
This is into a VM; VirtualBox 4.1.12 over Ubuntu 12.04. The VM has RAM 256M limited to 1
processor with execution capacity of until 95%.
Note that I've used the same VM configuration for systems FreeBSD, NetBSD and OpenBSD;
and the only difference is that NetBSD uses 256M RAM while Free/Open BSD have 192M RAM.
The host CPU (not VM) is:
CPU0: Intel(R) Core(TM) i3-2100 CPU @ 3.10GHz stepping 07
@gopherbot

This comment has been minimized.

Copy link
Author

commented Sep 2, 2012

Comment 3 by raul.san@sent.com:

I just install the last Go devel version, 2012-08-16, in the last NetBSD release, 6.0
RC1, and it works ok.
Using ulimit -n256, ulimit -d 524288, like it is indicated here[1]
[1] http://code.google.com/p/go-wiki/wiki/NetBSD
@gopherbot

This comment has been minimized.

Copy link
Author

commented Sep 2, 2012

Comment 4 by raul.san@sent.com:

The Go verions is to 2012-09-02 date.
@gopherbot

This comment has been minimized.

Copy link
Author

commented Sep 2, 2012

Comment 5 by raul.san@sent.com:

I don't understand the why, but I've re-compiled Go after of restart NetBSD and it fails
in exp/types
*** Test killed: ran too long.
FAIL    exp/types       180.006s
@davecheney

This comment has been minimized.

Copy link
Contributor

commented Sep 2, 2012

Comment 6:

Does this issue only occur when you run NetBSD inside VirtualBox ?
@minux

This comment has been minimized.

Copy link
Member

commented Sep 3, 2012

Comment 7:

I also run NetBSD inside vbox, and all.bash could pass.
@gopherbot

This comment has been minimized.

Copy link
Author

commented Sep 3, 2012

Comment 8 by raul.san@sent.com:

I've been doing some tests in BSD systems from VirtualBox.
Re-compiling in systems FreeBSD and Darwin is Ok, but it fails in systems where there is
to change the ulimits (it could be a coincidence):
+ OpenBSD (ulimit -n 256)
# GOMAXPROCS=2 runtime -cpu=1,2,4
*** Test killed: ran too long.
FAIL    runtime 326.996s
+ NetBSD (ulimit -n 256; ulimit -d 524288)
*** Test killed: ran too long.
FAIL    exp/types       180.695s
So, I removed the Go source directory and untar it to compile from a "new directory",
and the issue is fixed in NetBSD, so it is not issue related to VirtualBox, I think.
In change, the OpenBSD issue is not solved removing the Go source directory.
Note: NetBSD called my attention since it is the only system that shows a line with
"scatter"
# ../misc/cgo/test
scatter = 0x42a3bc
PASS
ok      _/home/neo/go-src/misc/cgo/test 1.663s
@rsc

This comment has been minimized.

Copy link
Contributor

commented Sep 12, 2012

Comment 9:

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@gopherbot

This comment has been minimized.

Copy link
Author

commented May 6, 2013

Comment 10 by raul.san@sent.com:

Solved in Go 1.1rc1 and tested with hte lasts BSD* distros.
@davecheney

This comment has been minimized.

Copy link
Contributor

commented May 6, 2013

Comment 11:

Thanks for confirming.

Status changed to Fixed.

@gopherbot gopherbot added fixed labels May 6, 2013

@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
5 participants
You can’t perform that action at this time.