Skip to content

runtime: tests fail with "unexpected signal during runtime execution" when building on solaris #7860

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

Closed
calmh opened this issue Apr 24, 2014 · 25 comments
Labels
FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.

Comments

@calmh
Copy link
Contributor

calmh commented Apr 24, 2014

go version devel +f8b50ad4cac4 Mon Apr 21 17:00:27 2014 -0700 solaris/amd64
(a.k.a 1.3 beta 1)

jb@zlogin3:~/go/src $ uname -a
SunOS zlogin3 5.11 joyent_20140418T031241Z i86pc i386 i86pc Solaris
jb@zlogin3:~/go/src $ ./all.bash
...
ok      os/user 0.017s
ok      path    0.011s
ok      path/filepath   0.025s
ok      reflect 0.097s
ok      regexp  0.142s
ok      regexp/syntax   0.721s
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0x0 pc=0x40961d]

runtime stack:
runtime.throw(0x7f261e)
        /home/jb/go/src/pkg/runtime/panic.c:520 +0x69 fp=0xfffffd7ffc9ffb20
runtime.sigpanic()
        /home/jb/go/src/pkg/runtime/os_solaris.c:213 +0x3d fp=0xfffffd7ffc9ffb38
scanblock(0x0, 0x31300000001)
        /home/jb/go/src/pkg/runtime/mgc0.c:987 +0xc7d fp=0xfffffd7ffc9ffe60
gc(0xfffffd7ffe767db0)
        /home/jb/go/src/pkg/runtime/mgc0.c:2388 +0x1ec fp=0xfffffd7ffc9fff90
mgc(0xc208131680)
        /home/jb/go/src/pkg/runtime/mgc0.c:2329 +0x2e fp=0xfffffd7ffc9fffa0
runtime.mcall(0x4307cd)
        /home/jb/go/src/pkg/runtime/asm_amd64.s:181 +0x54 fp=0xfffffd7ffc9fffb0

goroutine 77150 [garbage collection]:
runtime.gc(0xfffffd7f00000000)
        /home/jb/go/src/pkg/runtime/mgc0.c:2309 +0x1b2 fp=0xfffffd7ffe767dc0
runtime.mallocgc(0x20, 0x6729e0, 0x0)
        /home/jb/go/src/pkg/runtime/malloc.goc:204 +0x1d6 fp=0xfffffd7ffe767e28
runtime.new(0x6729e0, 0x0)
        /home/jb/go/src/pkg/runtime/malloc.goc:825 +0x3b fp=0xfffffd7ffe767e48
reflect.Value.MapIndex(0x5f4280, 0xc208210090, 0x0, 0x150, 0x5f5d40, 0x0, 0x13c, 0x20,
0x5f5d40, 0x0, ...)
        /home/jb/go/src/pkg/reflect/value.go:1184 +0x33 fp=0xfffffd7ffe767ef0
runtime_test.func·044()
        /home/jb/go/src/pkg/runtime/map_test.go:272 +0x14b fp=0xfffffd7ffe767fa8
runtime.goexit()
        /home/jb/go/src/pkg/runtime/proc.c:1430 fp=0xfffffd7ffe767fb0
created by runtime_test.testConcurrentReadsAfterGrowth
        /home/jb/go/src/pkg/runtime/map_test.go:274 +0x26d

goroutine 16 [chan receive]:
runtime.park(0x416190, 0xc20809a290, 0x7f220d)
        /home/jb/go/src/pkg/runtime/proc.c:1354 +0x89 fp=0xc2081ffc38
runtime.parkunlock(0xc20809a290, 0x7f220d)
        /home/jb/go/src/pkg/runtime/proc.c:1370 +0x3b fp=0xc2081ffc58
chanrecv(0x5cfaa0, 0xc20809a240, 0xc2081ffe00, 0x440001, 0x0)
        /home/jb/go/src/pkg/runtime/chan.goc:268 +0x4e8 fp=0xc2081ffcb8
runtime.chanrecv1(0x5cfaa0, 0xc20809a240, 0xc2081ffe00)
        /home/jb/go/src/pkg/runtime/chan.goc:352 +0x38 fp=0xc2081ffce8
testing.RunTests(0x6f8fe8, 0x7f4a20, 0x5b, 0x5b, 0x5f5d01)
        /home/jb/go/src/pkg/testing/testing.go:504 +0x917 fp=0xc2081ffe70
testing.Main(0x6f8fe8, 0x7f4a20, 0x5b, 0x5b, 0x7f7000, 0xb6, 0xb6, 0x8017c0, 0x0, 0x0)
        /home/jb/go/src/pkg/testing/testing.go:435 +0x87 fp=0xc2081ffef8
main.main()
        runtime/_test/_testmain.go:591 +0x9c fp=0xc2081fff50
runtime.main()
        /home/jb/go/src/pkg/runtime/proc.c:247 +0x11a fp=0xc2081fffa8
runtime.goexit()
        /home/jb/go/src/pkg/runtime/proc.c:1430 fp=0xc2081fffb0
created by _rt0_go
        /home/jb/go/src/pkg/runtime/asm_amd64.s:97 +0x132

goroutine 17 [syscall]:
runtime.notetsleepg(0xfffffd7ffefaff68, 0xdf8475800)
        /home/jb/go/src/pkg/runtime/lock_sema.c:263 +0x71 fp=0xfffffd7ffefaff40
runtime.MHeap_Scavenger()
        /home/jb/go/src/pkg/runtime/mheap.c:531 +0xa3 fp=0xfffffd7ffefaffa8
runtime.goexit()
        /home/jb/go/src/pkg/runtime/proc.c:1430 fp=0xfffffd7ffefaffb0
created by runtime.main
        /home/jb/go/src/pkg/runtime/proc.c:207

goroutine 18 [GC sweep wait]:
runtime.park(0x416190, 0x7f81f0, 0x7f4700)
        /home/jb/go/src/pkg/runtime/proc.c:1354 +0x89 fp=0xfffffd7ffefaef70
runtime.parkunlock(0x7f81f0, 0x7f4700)
        /home/jb/go/src/pkg/runtime/proc.c:1370 +0x3b fp=0xfffffd7ffefaef90
bgsweep()
        /home/jb/go/src/pkg/runtime/mgc0.c:1977 +0x9a fp=0xfffffd7ffefaefa8
runtime.goexit()
        /home/jb/go/src/pkg/runtime/proc.c:1430 fp=0xfffffd7ffefaefb0
created by runtime.gc
        /home/jb/go/src/pkg/runtime/mgc0.c:2249

goroutine 19 [finalizer wait]:
runtime.park(0x416190, 0x7f81c8, 0x7f48e9)
        /home/jb/go/src/pkg/runtime/proc.c:1354 +0x89 fp=0xfffffd7ffefa0f18
runtime.parkunlock(0x7f81c8, 0x7f48e9)
        /home/jb/go/src/pkg/runtime/proc.c:1370 +0x3b fp=0xfffffd7ffefa0f38
runfinq()
        /home/jb/go/src/pkg/runtime/mgc0.c:2624 +0xcf fp=0xfffffd7ffefa0fa8
runtime.goexit()
        /home/jb/go/src/pkg/runtime/proc.c:1430 fp=0xfffffd7ffefa0fb0
created by runtime.gc
        /home/jb/go/src/pkg/runtime/mgc0.c:2249

goroutine 20 [syscall]:
runtime.notetsleepg(0x7f9118, 0x1be86c82e5)
        /home/jb/go/src/pkg/runtime/lock_sema.c:263 +0x71 fp=0xfffffd7ffefadf58
timerproc()
        /home/jb/go/src/pkg/runtime/time.goc:250 +0xda fp=0xfffffd7ffefadfa8
runtime.goexit()
        /home/jb/go/src/pkg/runtime/proc.c:1430 fp=0xfffffd7ffefadfb0
created by addtimer
        /home/jb/go/src/pkg/runtime/time.goc:103

goroutine 31931 [semacquire]:
runtime.park(0x416190, 0x8044e0, 0x7f0be0)
        /home/jb/go/src/pkg/runtime/proc.c:1354 +0x89 fp=0xfffffd7ffeface10
runtime.parkunlock(0x8044e0, 0x7f0be0)
        /home/jb/go/src/pkg/runtime/proc.c:1370 +0x3b fp=0xfffffd7ffeface30
runtime.semacquire(0xc208000260, 0x1)
        /home/jb/go/src/pkg/runtime/sema.goc:140 +0x10e fp=0xfffffd7ffeface90
sync.runtime_Semacquire(0xc208000260)
        /home/jb/go/src/pkg/runtime/sema.goc:199 +0x30 fp=0xfffffd7ffefacea8
sync.(*WaitGroup).Wait(0xc208104120)
        /home/jb/go/src/pkg/sync/waitgroup.go:129 +0x14b fp=0xfffffd7ffefaced0
runtime_test.testConcurrentReadsAfterGrowth(0xc2080a7290, 0x1)
        /home/jb/go/src/pkg/runtime/map_test.go:277 +0x298 fp=0xfffffd7ffefacf50
runtime_test.TestConcurrentReadsAfterGrowthReflect(0xc2080a7290)
        /home/jb/go/src/pkg/runtime/map_test.go:287 +0x2c fp=0xfffffd7ffefacf68
testing.tRunner(0xc2080a7290, 0x7f4e70)
        /home/jb/go/src/pkg/testing/testing.go:422 +0x8b fp=0xfffffd7ffefacf98
runtime.goexit()
        /home/jb/go/src/pkg/runtime/proc.c:1430 fp=0xfffffd7ffefacfa0
created by testing.RunTests
        /home/jb/go/src/pkg/testing/testing.go:503 +0x8cf

goroutine 77159 [runnable]:
runtime.gc(0xfffffd7f00000000)
        /home/jb/go/src/pkg/runtime/mgc0.c:2249 fp=0xfffffd7ffe3acdc0
runtime.mallocgc(0x20, 0x6729e0, 0x0)
        /home/jb/go/src/pkg/runtime/malloc.goc:204 +0x1d6 fp=0xfffffd7ffe3ace28
runtime.new(0x6729e0, 0x0)
        /home/jb/go/src/pkg/runtime/malloc.goc:825 +0x3b fp=0xfffffd7ffe3ace48
reflect.Value.MapIndex(0x5f4280, 0xc208210090, 0x0, 0x150, 0x5f5d40, 0x0, 0x3f, 0x20,
0x5f5d40, 0x0, ...)
        /home/jb/go/src/pkg/reflect/value.go:1184 +0x33 fp=0xfffffd7ffe3acef0
runtime_test.func·044()
        /home/jb/go/src/pkg/runtime/map_test.go:272 +0x14b fp=0xfffffd7ffe3acfa8
runtime.goexit()
        /home/jb/go/src/pkg/runtime/proc.c:1430 fp=0xfffffd7ffe3acfb0
created by runtime_test.testConcurrentReadsAfterGrowth
        /home/jb/go/src/pkg/runtime/map_test.go:274 +0x26d

goroutine 77162 [semacquire]:
runtime.park(0x416190, 0x806320, 0x7f0be0)
        /home/jb/go/src/pkg/runtime/proc.c:1354 +0x89 fp=0xfffffd7ffdf47d18
runtime.parkunlock(0x806320, 0x7f0be0)
        /home/jb/go/src/pkg/runtime/proc.c:1370 +0x3b fp=0xfffffd7ffdf47d38
runtime.semacquire(0x7ec8cc, 0x0)
        /home/jb/go/src/pkg/runtime/sema.goc:140 +0x10e fp=0xfffffd7ffdf47d98
runtime.gc(0xfffffd7f00000000)
        /home/jb/go/src/pkg/runtime/mgc0.c:2282 +0xfc fp=0xfffffd7ffdf47dc0
runtime.mallocgc(0x20, 0x6729e0, 0x0)
        /home/jb/go/src/pkg/runtime/malloc.goc:204 +0x1d6 fp=0xfffffd7ffdf47e28
runtime.new(0x6729e0, 0x0)
        /home/jb/go/src/pkg/runtime/malloc.goc:825 +0x3b fp=0xfffffd7ffdf47e48
reflect.Value.MapIndex(0x5f4280, 0xc208210090, 0x0, 0x150, 0x5f5d40, 0x0, 0xd2, 0x20,
0x5f5d40, 0x0, ...)
        /home/jb/go/src/pkg/reflect/value.go:1184 +0x33 fp=0xfffffd7ffdf47ef0
runtime_test.func·044()
        /home/jb/go/src/pkg/runtime/map_test.go:272 +0x14b fp=0xfffffd7ffdf47fa8
runtime.goexit()
        /home/jb/go/src/pkg/runtime/proc.c:1430 fp=0xfffffd7ffdf47fb0
created by runtime_test.testConcurrentReadsAfterGrowth
        /home/jb/go/src/pkg/runtime/map_test.go:274 +0x26d
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0x0 pc=0x40961d]

runtime stack:
runtime.throw(0x7f261e)
        /home/jb/go/src/pkg/runtime/panic.c:520 +0x69 fp=0xfffffd7ffbdffbb0
runtime.sigpanic()
        /home/jb/go/src/pkg/runtime/os_solaris.c:213 +0x3d fp=0xfffffd7ffbdffbc8
scanblock(0x0, 0x1)
        /home/jb/go/src/pkg/runtime/mgc0.c:987 +0xc7d fp=0xfffffd7ffbdffef0
runtime.gchelper()
        /home/jb/go/src/pkg/runtime/mgc0.c:2105 +0x55 fp=0xfffffd7ffbdfff10
stopm()
        /home/jb/go/src/pkg/runtime/proc.c:942 +0x111 fp=0xfffffd7ffbdfff28
findrunnable()
        /home/jb/go/src/pkg/runtime/proc.c:1247 +0x445 fp=0xfffffd7ffbdfff60
schedule()
        /home/jb/go/src/pkg/runtime/proc.c:1330 +0xe3 fp=0xfffffd7ffbdfff88
goexit0(0xc20811cea0)
        /home/jb/go/src/pkg/runtime/proc.c:1456 +0x109 fp=0xfffffd7ffbdfffa0
runtime.mcall(0x4307cd)
        /home/jb/go/src/pkg/runtime/asm_amd64.s:181 +0x54 fp=0xfffffd7ffbdfffb0
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0x0 pc=0x40961d]

runtime stack:
runtime.throw(0x7f261e)
        /home/jb/go/src/pkg/runtime/panic.c:520 +0x69 fp=0xfffffd7ffadffbb0
runtime.sigpanic()
        /home/jb/go/src/pkg/runtime/os_solaris.c:213 +0x3d fp=0xfffffd7ffadffbc8
scanblock(0x0, 0x1)
        /home/jb/go/src/pkg/runtime/mgc0.c:987 +0xc7d fp=0xfffffd7ffadffef0
runtime.gchelper()
        /home/jb/go/src/pkg/runtime/mgc0.c:2105 +0x55 fp=0xfffffd7ffadfff10
stopm()
        /home/jb/go/src/pkg/runtime/proc.c:942 +0x111 fp=0xfffffd7ffadfff28
findrunnable()
        /home/jb/go/src/pkg/runtime/proc.c:1247 +0x445 fp=0xfffffd7ffadfff60
schedule()
        /home/jb/go/src/pkg/runtime/proc.c:1330 +0xe3 fp=0xfffffd7ffadfff88
goexit0(0xc2081a9560)
        /home/jb/go/src/pkg/runtime/proc.c:1456 +0x109 fp=0xfffffd7ffadfffa0
runtime.mcall(0x4307cd)
        /home/jb/go/src/pkg/runtime/asm_amd64.s:181 +0x54 fp=0xfffffd7ffadfffb0
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0x0 pc=0x40961d]

runtime stack:
runtime.throw(0x7f261e)
        /home/jb/go/src/pkg/runtime/panic.c:520 +0x69 fp=0xfffffd7ffe1ffa90
runtime.sigpanic()
        /home/jb/go/src/pkg/runtime/os_solaris.c:213 +0x3d fp=0xfffffd7ffe1ffaa8
scanblock(0x0, 0x1)
        /home/jb/go/src/pkg/runtime/mgc0.c:987 +0xc7d fp=0xfffffd7ffe1ffdd0
runtime.gchelper()
        /home/jb/go/src/pkg/runtime/mgc0.c:2105 +0x55 fp=0xfffffd7ffe1ffdf0
stopm()
        /home/jb/go/src/pkg/runtime/proc.c:942 +0x111 fp=0xfffffd7ffe1ffe08
gcstopm()
        /home/jb/go/src/pkg/runtime/proc.c:1107 +0xc4 fp=0xfffffd7ffe1ffe28
schedule()
        /home/jb/go/src/pkg/runtime/proc.c:1306 +0x4a fp=0xfffffd7ffe1ffe50
runtime.gosched0(0xc2080fe480)
        /home/jb/go/src/pkg/runtime/proc.c:1421 +0x9e fp=0xfffffd7ffe1ffe60
runtime.newstack()
        /home/jb/go/src/pkg/runtime/stack.c:738 +0x3a8 fp=0xfffffd7ffe1fffa8
runtime.morestack()
        /home/jb/go/src/pkg/runtime/asm_amd64.s:228 +0x6a fp=0xfffffd7ffe1fffb0
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0x0 pc=0x40961d]

runtime stack:
runtime.throw(0x7f261e)
        /home/jb/go/src/pkg/runtime/panic.c:520 +0x69 fp=0xfffffd7ffb9ffbb0
runtime.sigpanic()
        /home/jb/go/src/pkg/runtime/os_solaris.c:213 +0x3d fp=0xfffffd7ffb9ffbc8
scanblock(0x0, 0x1)
        /home/jb/go/src/pkg/runtime/mgc0.c:987 +0xc7d fp=0xfffffd7ffb9ffef0
runtime.gchelper()
        /home/jb/go/src/pkg/runtime/mgc0.c:2105 +0x55 fp=0xfffffd7ffb9fff10
stopm()
        /home/jb/go/src/pkg/runtime/proc.c:942 +0x111 fp=0xfffffd7ffb9fff28
findrunnable()
        /home/jb/go/src/pkg/runtime/proc.c:1247 +0x445 fp=0xfffffd7ffb9fff60
schedule()
        /home/jb/go/src/pkg/runtime/proc.c:1330 +0xe3 fp=0xfffffd7ffb9fff88
goexit0(0xc2080bfc20)
        /home/jb/go/src/pkg/runtime/proc.c:1456 +0x109 fp=0xfffffd7ffb9fffa0
runtime.mcall(0x4307cd)
        /home/jb/go/src/pkg/runtime/asm_amd64.s:181 +0x54 fp=0xfffffd7ffb9fffb0
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0x0 pc=0x40961d]

runtime stack:
runtime.throw(0x7f261e)
        /home/jb/go/src/pkg/runtime/panic.c:520 +0x69 fp=0xfffffd7ffa9ffbb0
runtime.sigpanic()
        /home/jb/go/src/pkg/runtime/os_solaris.c:213 +0x3d fp=0xfffffd7ffa9ffbc8
scanblock(0x0, 0x1)
        /home/jb/go/src/pkg/runtime/mgc0.c:987 +0xc7d fp=0xfffffd7ffa9ffef0
runtime.gchelper()
        /home/jb/go/src/pkg/runtime/mgc0.c:2105 +0x55 fp=0xfffffd7ffa9fff10
stopm()
        /home/jb/go/src/pkg/runtime/proc.c:942 +0x111 fp=0xfffffd7ffa9fff28
findrunnable()
        /home/jb/go/src/pkg/runtime/proc.c:1247 +0x445 fp=0xfffffd7ffa9fff60
schedule()
        /home/jb/go/src/pkg/runtime/proc.c:1330 +0xe3 fp=0xfffffd7ffa9fff88
goexit0(0xc2082c59e0)
        /home/jb/go/src/pkg/runtime/proc.c:1456 +0x109 fp=0xfffffd7ffa9fffa0
runtime.mcall(0x4307cd)
        /home/jb/go/src/pkg/runtime/asm_amd64.s:181 +0x54 fp=0xfffffd7ffa9fffb0
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0x0 pc=0x40961d]

runtime stack:
runtime.throw(0x7f261e)
        /home/jb/go/src/pkg/runtime/panic.c:520 +0x69 fp=0xfffffd7ffc1ffbb0
runtime.sigpanic()
        /home/jb/go/src/pkg/runtime/os_solaris.c:213 +0x3d fp=0xfffffd7ffc1ffbc8
scanblock(0x0, 0x1)
        /home/jb/go/src/pkg/runtime/mgc0.c:987 +0xc7d fp=0xfffffd7ffc1ffef0
runtime.gchelper()
        /home/jb/go/src/pkg/runtime/mgc0.c:2105 +0x55 fp=0xfffffd7ffc1fff10
stopm()
        /home/jb/go/src/pkg/runtime/proc.c:942 +0x111 fp=0xfffffd7ffc1fff28
findrunnable()
        /home/jb/go/src/pkg/runtime/proc.c:1247 +0x445 fp=0xfffffd7ffc1fff60
schedule()
        /home/jb/go/src/pkg/runtime/proc.c:1330 +0xe3 fp=0xfffffd7ffc1fff88
goexit0(0xc208130120)
        /home/jb/go/src/pkg/runtime/proc.c:1456 +0x109 fp=0xfffffd7ffc1fffa0
runtime.mcall(0x4307cd)
        /home/jb/go/src/pkg/runtime/asm_amd64.s:181 +0x54 fp=0xfffffd7ffc1fffb0
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0x0 pc=0x40961d]

runtime stack:
runtime.throw(0x7f261e)
        /home/jb/go/src/pkg/runtime/panic.c:520 +0x69 fp=0xfffffd7ffcdffbc0
runtime.sigpanic()
        /home/jb/go/src/pkg/runtime/os_solaris.c:213 +0x3d fp=0xfffffd7ffcdffbd8
scanblock(0x0, 0x1)
        /home/jb/go/src/pkg/runtime/mgc0.c:987 +0xc7d fp=0xfffffd7ffcdfff00
runtime.gchelper()
        /home/jb/go/src/pkg/runtime/mgc0.c:2105 +0x55 fp=0xfffffd7ffcdfff20
stopm()
        /home/jb/go/src/pkg/runtime/proc.c:942 +0x111 fp=0xfffffd7ffcdfff38
gcstopm()
        /home/jb/go/src/pkg/runtime/proc.c:1107 +0xc4 fp=0xfffffd7ffcdfff58
schedule()
        /home/jb/go/src/pkg/runtime/proc.c:1306 +0x4a fp=0xfffffd7ffcdfff80
park0(0xc2082750e0)
        /home/jb/go/src/pkg/runtime/proc.c:1395 +0xfe fp=0xfffffd7ffcdfffa0
runtime.mcall(0x4307cd)
        /home/jb/go/src/pkg/runtime/asm_amd64.s:181 +0x54 fp=0xfffffd7ffcdfffb0
FAIL    runtime 3.373s
ok      runtime/debug   0.014s
ok      runtime/pprof   7.714s
?       runtime/race    [no test files]
ok      sort    0.113s
ok      strconv 0.540s
ok      strings 0.144s
ok      sync    0.103s
ok      sync/atomic     0.063s
ok      syscall 0.013s
ok      testing 1.499s
?       testing/iotest  [no test files]
ok      testing/quick   0.054s
ok      text/scanner    0.021s
ok      text/tabwriter  0.011s
ok      text/template   0.045s
ok      text/template/parse     0.017s
ok      time    2.619s
ok      unicode 0.021s
ok      unicode/utf16   0.010s
ok      unicode/utf8    0.014s
?       unsafe  [no test files]
...
@ianlancetaylor
Copy link
Member

Comment 1:

Labels changed: added repo-main, release-go1.3maybe, os-solaris.

@calmh
Copy link
Contributor Author

calmh commented Apr 25, 2014

Comment 2:

This also happens "in production" in a project I really would like to run on Solaris so
let me know if/when there's anything I can do in terms of testing, gathering more info,
donating a build zone, etc.

@4ad
Copy link
Member

4ad commented Apr 25, 2014

Comment 4:

SmartOS is pretty much the primary development and test platform. I don't see this.
What's the instance size? How much CPUs and memory?

@4ad
Copy link
Member

4ad commented Apr 29, 2014

Comment 5:

I can't fix it unless you give me more information.

@calmh
Copy link
Contributor Author

calmh commented Apr 30, 2014

Comment 6:

Hi, sorry, I missed that comment/mail. This on box of my own, not on Joyents cloud, so
if compared to them I guess one difference would be a newer platform image. The zone is
a 13.4.1 image with 2GB RAM and no CPU restrictions, single Xeon X3440 on a Supermicro
box. I got the same error on an older zone running the 13.1.0 image, but I would anyway
guess that if it's something in the OS that differs relevantly that would be the base
image.

@calmh
Copy link
Contributor Author

calmh commented Apr 30, 2014

Comment 7:

For what it's worth, I spun up a zone on another machine. Platform image
joyent_20140307T223339Z, base64 13.4.2 zone, 8 GB, Xeon E-1230.
Clean install, pkgin in build-essential mercurial, create a user, clone the repo, hg
update default (824f981dd4b7) and ./all.bash.
On this setup it's not 100% reproducible. If I just run ./all.bash repeatedly I get the
above panic about half the time, the other half the test passes.
Sorry for the obviously vague info, not sure what more I can provide. :/

@4ad
Copy link
Member

4ad commented Apr 30, 2014

Comment 8:

Please post the output of these commands on the 2GB image:
    /bin/prctl -n zone.max-swap $$
    /bin/prctl -n zone.max-physical-memory $$
    /bin/prctl -n zone.max-locked-memory $$
    /bin/prctl -n zone.cpu-shares $$
    /bin/prctl -n zone.cpu-cap $$
    /bin/prctl -n zone.max-lwps $$
    /bin/prctl -n process.max-data-size $$
    /bin/prctl -n process.max-address-space $$
    /bin/prctl -n process.max-cpu-time $$

@calmh
Copy link
Contributor Author

calmh commented Apr 30, 2014

Comment 9:

jb@zlogin3:~ $ /bin/prctl -n zone.max-swap $$
process: 14393: -bash
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
zone.max-swap
        usage           40.5MB   
        privileged      2.00GB      -   deny                                 -
        system          16.0EB    max   deny                                 -
jb@zlogin3:~ $ /bin/prctl -n zone.max-physical-memory $$
process: 14393: -bash
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
zone.max-physical-memory
        usage           41.9MB   
        privileged      2.00GB      -   deny                                 -
        system          16.0EB    max   deny                                 -
jb@zlogin3:~ $     /bin/prctl -n zone.max-locked-memory $$
process: 14393: -bash
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
zone.max-locked-memory
        usage               0B   
        privileged      2.00GB      -   deny                                 -
        system          16.0EB    max   deny                                 -
jb@zlogin3:~ $     /bin/prctl -n zone.cpu-shares $$
process: 14393: -bash
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
zone.cpu-shares
        usage             100    
        privileged        100       -   none                                 -
        system          65.5K     max   none                                 -
jb@zlogin3:~ $     /bin/prctl -n zone.cpu-cap $$
process: 14393: -bash
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
zone.cpu-cap
        usage               0    
        system          4.29G     inf   deny                                 -
jb@zlogin3:~ $     /bin/prctl -n zone.max-lwps $$
process: 14393: -bash
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
zone.max-lwps
        usage              59    
        privileged      2.00K       -   deny                                 -
        system          2.15G     max   deny                                 -
jb@zlogin3:~ $     /bin/prctl -n process.max-data-size $$
process: 14393: -bash
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
process.max-data-size
        privileged      16.0EB    max   deny                                 -
        system          16.0EB    max   deny                                 -
jb@zlogin3:~ $     /bin/prctl -n process.max-address-space $$
process: 14393: -bash
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
process.max-address-space
        privileged      16.0EB    max   deny                                 -
        system          16.0EB    max   deny                                 -
jb@zlogin3:~ $     /bin/prctl -n process.max-cpu-time $$
process: 14393: -bash
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
process.max-cpu-time
        privileged      18.4Es    inf   signal=XCPU                          -
        system          18.4Es    inf   none                                 -
jb@zlogin3:~ $

@4ad
Copy link
Member

4ad commented Apr 30, 2014

Comment 10:

This is possibly related to issue #7554. It seems to be caused by resource exhaustion,
but we haven't yet figured exactly what happens. If you say this this happens in
production I will dedicate more time in fixing this. In the meantime, a core dump would
be helpful.

@4ad
Copy link
Member

4ad commented Apr 30, 2014

Comment 11:

This is possibly related to issue #7554. It seems to be caused by resource exhaustion,
but we haven't yet figured exactly what happens. If you say this this happens in
production I will dedicate more time in fixing this. In the meantime, a core dump would
be helpful.

@calmh
Copy link
Contributor Author

calmh commented Apr 30, 2014

Comment 12:

Yes, looks like that could be it - the stack trace is always in GC when the crash
happens. It's not "in production" as in any money riding on it, just a personal project
that I'd rather run directly on SmartOS than on KVM.
How do I create such a core dump (as opposed to the usual stack print)?

@4ad
Copy link
Member

4ad commented Apr 30, 2014

Comment 13:

Run it with GOTRACEBACK=crash.

@calmh
Copy link
Contributor Author

calmh commented Apr 30, 2014

Comment 14:

Hm. Sorry, but I can't get that to work. I can get coredumps from non-Go processes by
sending them a SIGABRT (so my coreadm settings etc are OK) but Go binaries don't
generate a core dump even with GOTRACEBACK=crash. I've tried with both this "real" crash
and manually sending SIGABRT and SIGQUIT to no avail.
jb@zlogin3:~ $ ls -l /var/cores
total 0
jb@zlogin3:~ $ coreadm
     global core file pattern: /var/cores/%f.%n.%p.%t.core
     global core file content: default
       init core file pattern: /%Z/cores/core.%f.%p
       init core file content: default
            global core dumps: enabled
       per-process core dumps: disabled
      global setid core dumps: enabled
 per-process setid core dumps: disabled
     global core dump logging: enabled
jb@zlogin3:~ $ ulimit -a
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
open files                      (-n) 65536
pipe size            (512 bytes, -p) 10
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 32725
virtual memory          (kbytes, -v) unlimited
jb@zlogin3:~ $ sleep 100 &
[2] 35014
jb@zlogin3:~ $ kill -ABRT %
jb@zlogin3:~ $ 
[2]+  Abort                   (core dumped) sleep 100
jb@zlogin3:~ $ ls -l /var/cores/
total 2569
-rw------- 1 root root 5527218 Apr 30 17:56 gsleep.zlogin3.35014.1398873368.core
jb@zlogin3:~ $ cat sleep.go 
package main
import "time"
func main() {
    for {
        time.Sleep(1*time.Second)
    }
}
jb@zlogin3:~ $ go build sleep.go
jb@zlogin3:~ $ GOTRACEBACK=crash ./sleep &
[2] 35032
jb@zlogin3:~ $ kill -ABRT %
SIGABRT: used by abort, replace SIGIOT in the future
PC=0xfffffd7fff2bf5e7
goroutine 0 [idle]:
goroutine 17 [syscall]:
runtime.notetsleepg(0xfffffd7ffefaff68, 0xdf8475800)
    /home/jb/go/src/pkg/runtime/lock_sema.c:263 +0x71 fp=0xfffffd7ffefaff40
runtime.MHeap_Scavenger()
    /home/jb/go/src/pkg/runtime/mheap.c:531 +0xa3 fp=0xfffffd7ffefaffa8
runtime.goexit()
    /home/jb/go/src/pkg/runtime/proc.c:1430 fp=0xfffffd7ffefaffb0
created by runtime.main
    /home/jb/go/src/pkg/runtime/proc.c:207
goroutine 16 [sleep]:
time.Sleep(0x3b9aca00)
    /home/jb/go/src/pkg/runtime/time.goc:39 +0x31
main.main()
    /home/jb/sleep.go:7 +0x26
rax     0x5b
rbx     0xfffffd7fff182a40
rcx     0xfffffd7ffef96000
rdx     0x0
rdi     0x0
rsi     0xfffffd7fffdff970
rbp     0xfffffd7fffdff960
rsp     0xfffffd7fffdff8f8
r8      0xfffffd7ffef88a40
r9      0x76
r10     0xfffffd7ffef96000
r11     0xfffffffffbc05648
r12     0x494700
r13     0xfffffd7fff337a00
r14     0x0
r15     0xfffffd7fffdff970
rip     0xfffffd7fff2bf5e7
rflags  0x247
cs      0x53
fs      0x0
gs      0x0
[2]+  Exit 2                  GOTRACEBACK=crash ./sleep
jb@zlogin3:~ $ ls -l /var/cores/
total 2569
-rw------- 1 root root 5527218 Apr 30 17:56 gsleep.zlogin3.35014.1398873368.core
jb@zlogin3:~ $

@4ad
Copy link
Member

4ad commented Apr 30, 2014

Comment 15:

I'm confused, your paste indicates the existence of a core file.
04757c51-b5c2-4d23-9a69-1e9e305bc4da:2$ cat panic.go 
package main
func main() {
        panic("test")
}
04757c51-b5c2-4d23-9a69-1e9e305bc4da:2$ go build -o panic panic.go 
04757c51-b5c2-4d23-9a69-1e9e305bc4da:2$ ls
panic*  panic.go
04757c51-b5c2-4d23-9a69-1e9e305bc4da:2$ ./panic 
panic: test
goroutine 16 [running]:
runtime.panic(0x424d60, 0xc208000010)
        /home/aram/go/src/pkg/runtime/panic.c:279 +0xf5
main.main()
        /tmp/2/panic.go:4 +0x73
goroutine 17 [runnable]:
runtime.MHeap_Scavenger()
        /home/aram/go/src/pkg/runtime/mheap.c:507
runtime.goexit()
        /home/aram/go/src/pkg/runtime/proc.c:1446
goroutine 18 [runnable]:
bgsweep()
        /home/aram/go/src/pkg/runtime/mgc0.c:1891
runtime.goexit()
        /home/aram/go/src/pkg/runtime/proc.c:1446
04757c51-b5c2-4d23-9a69-1e9e305bc4da:2$ ls
panic*  panic.go
04757c51-b5c2-4d23-9a69-1e9e305bc4da:2$ GOTRACEBACK=crash ./panic
panic: test
goroutine 16 [running]:
runtime.panic(0x424d60, 0xc208000010)
        /home/aram/go/src/pkg/runtime/panic.c:279 +0xf5
main.main()
        /tmp/2/panic.go:4 +0x73
runtime.main()
        /home/aram/go/src/pkg/runtime/proc.c:243 +0x11a
runtime.goexit()
        /home/aram/go/src/pkg/runtime/proc.c:1446
created by _rt0_go
        /home/aram/go/src/pkg/runtime/asm_amd64.s:97 +0x132
goroutine 17 [runnable]:
runtime.MHeap_Scavenger()
        /home/aram/go/src/pkg/runtime/mheap.c:507
runtime.goexit()
        /home/aram/go/src/pkg/runtime/proc.c:1446
created by runtime.main
        /home/aram/go/src/pkg/runtime/proc.c:203
goroutine 18 [runnable]:
bgsweep()
        /home/aram/go/src/pkg/runtime/mgc0.c:1891
runtime.goexit()
        /home/aram/go/src/pkg/runtime/proc.c:1446
created by runtime.gc
        /home/aram/go/src/pkg/runtime/mgc0.c:2179
Abort (core dumped)
04757c51-b5c2-4d23-9a69-1e9e305bc4da:2$ ls
core  panic*  panic.go
04757c51-b5c2-4d23-9a69-1e9e305bc4da:2$

@calmh
Copy link
Contributor Author

calmh commented Apr 30, 2014

Comment 16:

The corefile that is created is from the regular system /opt/local/bin/sleep just to
make sure the system actually does write core files - it was maybe not the clearest
example in the world to use the same name for my test binary. But panic.go gives me the
same, no "Abort (core dumped)" at the end and no core file. Am I on the wrong Go version?
go version devel +f8b50ad4cac4 Mon Apr 21 17:00:27 2014 -0700 solaris/amd64
jb@zlogin3:~ $ cat>panic.go
package main
func main() {
        panic("test")
}
jb@zlogin3:~ $ go build panic.go
jb@zlogin3:~ $ ./panic 
panic: test
goroutine 16 [running]:
runtime.panic(0x425ba0, 0xc208000010)
    /home/jb/go/src/pkg/runtime/panic.c:279 +0xf5
main.main()
    /home/jb/panic.go:4 +0x61
goroutine 17 [runnable]:
runtime.MHeap_Scavenger()
    /home/jb/go/src/pkg/runtime/mheap.c:507
runtime.goexit()
    /home/jb/go/src/pkg/runtime/proc.c:1430
goroutine 18 [runnable]:
bgsweep()
    /home/jb/go/src/pkg/runtime/mgc0.c:1960
runtime.goexit()
    /home/jb/go/src/pkg/runtime/proc.c:1430
[2]
jb@zlogin3:~ $ GOGCTRACE=crash ./panic 
panic: test
goroutine 16 [running]:
runtime.panic(0x425ba0, 0xc208000010)
    /home/jb/go/src/pkg/runtime/panic.c:279 +0xf5
main.main()
    /home/jb/panic.go:4 +0x61
goroutine 17 [runnable]:
runtime.MHeap_Scavenger()
    /home/jb/go/src/pkg/runtime/mheap.c:507
runtime.goexit()
    /home/jb/go/src/pkg/runtime/proc.c:1430
goroutine 18 [runnable]:
bgsweep()
    /home/jb/go/src/pkg/runtime/mgc0.c:1960
runtime.goexit()
    /home/jb/go/src/pkg/runtime/proc.c:1430
[2]
jb@zlogin3:~ $ ls -l /var/cores/
total 2569
-rw------- 1 root root 5527218 Apr 30 17:56 gsleep.zlogin3.35014.1398873368.core

@calmh
Copy link
Contributor Author

calmh commented Apr 30, 2014

Comment 17:

Eh. GOTRACEBACK=crash ./panic of course, but still no core file. :/

@4ad
Copy link
Member

4ad commented Apr 30, 2014

Comment 18:

It's GOTRACEBACK=crash not GOGCTRACE=crash.

@4ad
Copy link
Member

4ad commented May 2, 2014

Comment 19:

Please update and try again, specifically check out
https://golang.org/cl/97800045/

@calmh
Copy link
Contributor Author

calmh commented May 2, 2014

Comment 20:

Indeed! Here's a core file and the corresponding runtime.test binary, ran as
'runtime.test -test.short -test.cpu 1,2,4".

Attachments:

  1. core.gz (1037142 bytes)
  2. runtime.test.gz (1515183 bytes)

@rsc
Copy link
Contributor

rsc commented May 9, 2014

Comment 21:

Labels changed: added release-none, suggested, removed release-go1.3maybe.

Status changed to Accepted.

@calmh
Copy link
Contributor Author

calmh commented May 10, 2014

Comment 22:

ALL TESTS PASSED
\o/

@4ad
Copy link
Member

4ad commented Sep 7, 2014

Comment 23:

Rewriting the runtime in Go fixed this.

Status changed to Fixed.

@calmh
Copy link
Contributor Author

calmh commented Sep 8, 2014

Comment 24:

That sounds great! Is this code available somewhere? Current e54b1af55910 tip still has
this issue for me.

@calmh
Copy link
Contributor Author

calmh commented Sep 8, 2014

Comment 25:

Actually no, sorry, I was too quick there. It does crash, but with "fatal error:
runtime: mcall called on m->g0 stack", i.e. issue #6193 but I guess in a new context.

@4ad
Copy link
Member

4ad commented Sep 8, 2014

Comment 26:

Ah, glad to hear. I was concerned for a moment.
Please post in issue #6193 the stacktrace you get with GOTRACEBACK=2

@calmh calmh added fixed Suggested Issues that may be good for new contributors looking for work to do. labels Sep 8, 2014
@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Projects
None yet
Development

No branches or pull requests

5 participants