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

runtime: TestGoroutineParallelism2 fails with "invalid memory address or nil pointer dereference" on brillo #14486

Closed
rakyll opened this issue Feb 24, 2016 · 2 comments
Milestone

Comments

@rakyll
Copy link
Contributor

rakyll commented Feb 24, 2016

Reproducible on Qualcomm Dragonboard 410c, Brillo image built with BDK 7.5.4.

go_android_exec: adb push /var/folders/00/1b8h8000h01000cxqpysvccm005d21/T/go-build559449628/runtime/_test/runtime.test /mnt/media_rw/tmp/runtime.test-55607/runtime.test-55607-tmp
1484 KB/s (5098700 bytes in 3.353s)
go_android_exec: adb shell cp '/mnt/media_rw/tmp/runtime.test-55607/runtime.test-55607-tmp' '/mnt/media_rw/tmp/runtime.test-55607/runtime.test-55607'
go_android_exec: adb shell rm '/mnt/media_rw/tmp/runtime.test-55607/runtime.test-55607-tmp'
go_android_exec: adb shell export TMPDIR="/mnt/media_rw/tmp/runtime.test-55607"; export GOROOT="/mnt/media_rw/goroot/"; export GOPATH="/mnt/media_rw/gopath/"; cd "/mnt/media_rw/goroot/src/runtime"; '/mnt/media_rw/tmp/runtime.test-55607/runtime.test-55607' -test.short=true -test.timeout=6m0s; echo -n exitcode=$?
--- FAIL: TestGoroutineParallelism2 (0.05s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
    panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0xb6dc1f30]

goroutine 102631 [running]:
panic(0xb6f9c4e0, 0x9691e030)
    /Users/jbd/go/src/runtime/panic.go:483 +0x37c fp=0x9692be24 sp=0x9692bde0
testing.tRunner.func1(0x9695e000)
    /Users/jbd/go/src/testing/testing.go:467 +0x16c fp=0x9692be80 sp=0x9692be24
runtime.call16(0x0, 0xb7017854, 0x9719c05c, 0x4, 0x4)
    /Users/jbd/go/src/runtime/asm_arm.s:429 +0x68 fp=0x9692be94 sp=0x9692be80
panic(0xb6f9c4e0, 0x9691e030)
    /Users/jbd/go/src/runtime/panic.go:441 +0x49c fp=0x9692bed8 sp=0x9692be94
runtime.panicmem()
    /Users/jbd/go/src/runtime/panic.go:45 +0x50 fp=0x9692beec sp=0x9692bed8
runtime.sigpanic()
    /Users/jbd/go/src/runtime/sigpanic_unix.go:24 +0x2b4 fp=0x9692bf18 sp=0x9692beec
runtime_test.testGoroutineParallelism2(0x9695e000, 0x1530100)
    /Users/jbd/go/src/runtime/proc_test.go:183 +0x2fc fp=0x9692bf9c sp=0x9692bf1c
runtime_test.TestGoroutineParallelism2(0x9695e000)
    /Users/jbd/go/src/runtime/proc_test.go:141 +0x48 fp=0x9692bfa8 sp=0x9692bf9c
testing.tRunner(0x9695e000, 0xb70c5c1c)
    /Users/jbd/go/src/testing/testing.go:473 +0xb0 fp=0x9692bfcc sp=0x9692bfa8
runtime.goexit()
    /Users/jbd/go/src/runtime/asm_arm.s:993 +0x4 fp=0x9692bfcc sp=0x9692bfcc
created by testing.RunTests
    /Users/jbd/go/src/testing/testing.go:582 +0x688

goroutine 1 [chan receive, locked to thread]:
runtime.gopark(0xb7016dd4, 0x97736030, 0xb6fe36f0, 0xc, 0xb70d6717, 0x3)
    /Users/jbd/go/src/runtime/proc.go:262 +0x15c fp=0x96931d58 sp=0x96931d44
runtime.goparkunlock(0x97736030, 0xb6fe36f0, 0xc, 0xb6d06617, 0x3)
    /Users/jbd/go/src/runtime/proc.go:268 +0x48 fp=0x96931d74 sp=0x96931d58
runtime.chanrecv(0xb6f66658, 0x97736000, 0x96931e70, 0x96931d01, 0xb6d80000)
    /Users/jbd/go/src/runtime/chan.go:470 +0x538 fp=0x96931dbc sp=0x96931d74
runtime.chanrecv1(0xb6f66658, 0x97736000, 0x96931e70)
    /Users/jbd/go/src/runtime/chan.go:355 +0x28 fp=0x96931dd4 sp=0x96931dbc
testing.RunTests(0xb7016ad0, 0xb70c5640, 0xb2, 0xb2, 0x96972001)
    /Users/jbd/go/src/testing/testing.go:583 +0x6b8 fp=0x96931ea4 sp=0x96931dd4
testing.(*M).Run(0x96931f7c, 0xb6dca6a8)
    /Users/jbd/go/src/testing/testing.go:515 +0x94 fp=0x96931eec sp=0x96931ea4
runtime_test.TestMain(0x96931f7c)
    /Users/jbd/go/src/runtime/crash_test.go:24 +0x1c fp=0x96931f2c sp=0x96931eec
main.main()
    runtime/_test/_testmain.go:996 +0x140 fp=0x96931fa4 sp=0x96931f2c
runtime.main()
    /Users/jbd/go/src/runtime/proc.go:188 +0x328 fp=0x96931fcc sp=0x96931fa4
runtime.goexit()
    /Users/jbd/go/src/runtime/asm_arm.s:993 +0x4 fp=0x96931fcc sp=0x96931fcc

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /Users/jbd/go/src/runtime/asm_arm.s:993 +0x4 fp=0x9692efd8 sp=0x9692efd8

goroutine 2 [force gc (idle)]:
runtime.gopark(0xb7016dd4, 0xb70d6020, 0xb6fe7900, 0xf, 0x14, 0x1)
    /Users/jbd/go/src/runtime/proc.go:262 +0x15c fp=0x9691a7a8 sp=0x9691a794
runtime.goparkunlock(0xb70d6020, 0xb6fe7900, 0xf, 0x14, 0x1)
    /Users/jbd/go/src/runtime/proc.go:268 +0x48 fp=0x9691a7c4 sp=0x9691a7a8
runtime.forcegchelper()
    /Users/jbd/go/src/runtime/proc.go:229 +0xc8 fp=0x9691a7dc sp=0x9691a7c4
runtime.goexit()
    /Users/jbd/go/src/runtime/asm_arm.s:993 +0x4 fp=0x9691a7dc sp=0x9691a7dc
created by runtime.init.4
    /Users/jbd/go/src/runtime/proc.go:218 +0x28

goroutine 3 [GC sweep wait]:
runtime.gopark(0xb7016dd4, 0xb70d6178, 0xb6fe4800, 0xd, 0xb6d68914, 0x1)
    /Users/jbd/go/src/runtime/proc.go:262 +0x15c fp=0x9691af9c sp=0x9691af88
runtime.goparkunlock(0xb70d6178, 0xb6fe4800, 0xd, 0x14, 0x1)
    /Users/jbd/go/src/runtime/proc.go:268 +0x48 fp=0x9691afb8 sp=0x9691af9c
runtime.bgsweep(0x9690c080)
    /Users/jbd/go/src/runtime/mgcsweep.go:79 +0x178 fp=0x9691afd4 sp=0x9691afb8
runtime.goexit()
    /Users/jbd/go/src/runtime/asm_arm.s:993 +0x4 fp=0x9691afd4 sp=0x9691afd4
created by runtime.gcenable
    /Users/jbd/go/src/runtime/mgc.go:191 +0x54

goroutine 4 [finalizer wait]:
runtime.gopark(0xb7016dd4, 0xb70e421c, 0xb6fe6340, 0xe, 0x14, 0x1)
    /Users/jbd/go/src/runtime/proc.go:262 +0x15c fp=0x9691b788 sp=0x9691b774
runtime.goparkunlock(0xb70e421c, 0xb6fe6340, 0xe, 0x14, 0x1)
    /Users/jbd/go/src/runtime/proc.go:268 +0x48 fp=0x9691b7a4 sp=0x9691b788
runtime.runfinq()
    /Users/jbd/go/src/runtime/mfinal.go:158 +0xc4 fp=0x9691b7dc sp=0x9691b7a4
runtime.goexit()
    /Users/jbd/go/src/runtime/asm_arm.s:993 +0x4 fp=0x9691b7dc sp=0x9691b7dc
created by runtime.createfing
    /Users/jbd/go/src/runtime/mfinal.go:139 +0x68

goroutine 5 [GC worker (idle)]:
runtime.gopark(0x9790e014, 0x9691bfcc, 0xb6fe8b88, 0x10, 0x14, 0x0)
    /Users/jbd/go/src/runtime/proc.go:262 +0x15c fp=0x9691bf90 sp=0x9691bf7c
runtime.gcBgMarkWorker(0x96912000)
    /Users/jbd/go/src/runtime/mgc.go:1402 +0xd4 fp=0x9691bfd4 sp=0x9691bf90
runtime.goexit()
    /Users/jbd/go/src/runtime/asm_arm.s:993 +0x4 fp=0x9691bfd4 sp=0x9691bfd4
created by runtime.gcBgMarkStartWorkers
    /Users/jbd/go/src/runtime/mgc.go:1329 +0x8c

goroutine 7 [syscall]:
runtime.notetsleepg(0xb70d6224, 0xe6502c86, 0x0, 0x0)
    /Users/jbd/go/src/runtime/lock_futex.go:205 +0x50 fp=0x9691cf88 sp=0x9691cf70
runtime.timerproc()
    /Users/jbd/go/src/runtime/time.go:209 +0x148 fp=0x9691cfdc sp=0x9691cf88
runtime.goexit()
    /Users/jbd/go/src/runtime/asm_arm.s:993 +0x4 fp=0x9691cfdc sp=0x9691cfdc
created by runtime.addtimerLocked
    /Users/jbd/go/src/runtime/time.go:116 +0x210
exitcode=2go_android_exec: adb shell rm -rf /mnt/media_rw/tmp/runtime.test-55607
FAIL    runtime 22.155s
@rakyll rakyll self-assigned this Feb 24, 2016
@rakyll rakyll added this to the Unplanned milestone Feb 24, 2016
@rakyll rakyll modified the milestones: Go1.7, Unplanned Mar 3, 2016
@gopherbot
Copy link

CL https://golang.org/cl/20340 mentions this issue.

@mdcnz
Copy link

mdcnz commented Oct 9, 2016

Encountered this issue when compiling Go on linux amd64 because localhost was pointing to IP address in a docker network. Docker is not running, it just happens to be installed on my machine.

Fixed by reverting localhost to 127.0.0.1

environment: ubuntu linux 4.4.0-38-generic x86_64

localhost: 172.17.0.2

ifconfig shows: docker0 inet addr:172.17.0.1 Bcast:0.0.0.0 Mask:255.255.0.0

go/src: master commit 9b6ced9, Sat Oct 8 07:24:45 2016

go/src$ ./all.bash
...
ok regexp/syntax 0.955s
--- FAIL: TestGoroutineParallelism2 (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference

@golang golang locked and limited conversation to collaborators Oct 9, 2017
@rsc rsc unassigned rakyll Jun 23, 2022
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

3 participants