Skip to content

Instantly share code, notes, and snippets.

@nindalf
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nindalf/9582451 to your computer and use it in GitHub Desktop.
Save nindalf/9582451 to your computer and use it in GitHub Desktop.
Error while developing gotop
Some thoughts about this. I ran the coverprofile on this test and found that process.go never reached the case <- done: where the function is supposed to return, and close its channels in the cleanup function. I don't know if process_test.go closed the channel correctly. I will return to this when I deal with the process memory issue.
Sysname: Linux
Nodename: thinkpad-x230
Release: 3.11.0-17-generic
Version: #31-Ubuntu SMP Mon Feb 3 21:52:43 UTC 2014
Machine: x86_64
Model: Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz
CPU cores: 4
Total memory: 6.49GB
fatal error: all goroutines are asleep - deadlock!
goroutine 1 [chan receive]:
testing.RunTests(0x581718, 0x697d00, 0xa, 0xa, 0x688a01)
/usr/local/go/src/pkg/testing/testing.go:472 +0x8d5
testing.Main(0x581718, 0x697d00, 0xa, 0xa, 0x69bf80, ...)
/usr/local/go/src/pkg/testing/testing.go:403 +0x84
main.main()
github.com/nindalf/gotop/_test/_testmain.go:121 +0x11b
goroutine 13 [chan receive]:
github.com/nindalf/gotop.func·015()
/home/nindalf/Programming/go/src/github.com/nindalf/gotop/process_test.go:22 +0x4c
github.com/nindalf/gotop.TestProcessInfo(0xc210050ea0)
/home/nindalf/Programming/go/src/github.com/nindalf/gotop/process_test.go:44 +0x100
testing.tRunner(0xc210050ea0, 0x697d78)
/usr/local/go/src/pkg/testing/testing.go:391 +0x8b
created by testing.RunTests
/usr/local/go/src/pkg/testing/testing.go:471 +0x8b2
goroutine 15 [chan send]:
github.com/nindalf/gotop.func·007()
github.com/nindalf/gotop/_test/process.go:187 +0x58
github.com/nindalf/gotop.func·008()
github.com/nindalf/gotop/_test/process.go:225 +0x8a
created by github.com/nindalf/gotop.processMems
github.com/nindalf/gotop/_test/process.go:225 +0x16c
goroutine 16 [chan receive]:
github.com/nindalf/gotop.func·010()
github.com/nindalf/gotop/_test/process.go:265 +0x105
created by github.com/nindalf/gotop.GetProcessInfo
github.com/nindalf/gotop/_test/process.go:288 +0x25f
goroutine 17 [finalizer wait]:
runtime.park(0x40bef0, 0x69c040, 0x69a6e8)
/usr/local/go/src/pkg/runtime/proc.c:1342 +0x66
runfinq()
/usr/local/go/src/pkg/runtime/mgc0.c:2276 +0x84
runtime.goexit()
/usr/local/go/src/pkg/runtime/proc.c:1394
exit status 2
FAIL github.com/nindalf/gotop 4.040s
fatal error: all goroutines are asleep - deadlock!
goroutine 1 [chan receive]:
testing.RunTests(0x57ba68, 0x68d280, 0xa, 0xa, 0x1)
/usr/local/go/src/pkg/testing/testing.go:472 +0x8d5
testing.Main(0x57ba68, 0x68d280, 0xa, 0xa, 0x691500, ...)
/usr/local/go/src/pkg/testing/testing.go:403 +0x84
main.main()
github.com/nindalf/gotop/_test/_testmain.go:65 +0x9c
goroutine 13 [select]:
github.com/nindalf/gotop.TestProcessData(0xc2100701b0)
/home/nindalf/Programming/go/src/github.com/nindalf/gotop/process_test.go:19 +0x312
testing.tRunner(0xc2100701b0, 0x68d2f8)
/usr/local/go/src/pkg/testing/testing.go:391 +0x8b
created by testing.RunTests
/usr/local/go/src/pkg/testing/testing.go:471 +0x8b2
goroutine 14 [chan send]:
github.com/nindalf/gotop.func·005()
/home/nindalf/Programming/go/src/github.com/nindalf/gotop/process.go:89 +0x4d
github.com/nindalf/gotop.func·006()
/home/nindalf/Programming/go/src/github.com/nindalf/gotop/process.go:130 +0x97
created by github.com/nindalf/gotop.processStats
/home/nindalf/Programming/go/src/github.com/nindalf/gotop/process.go:130 +0x17e
goroutine 15 [select]:
github.com/nindalf/gotop.func·008()
/home/nindalf/Programming/go/src/github.com/nindalf/gotop/process.go:164 +0x1aa
created by github.com/nindalf/gotop.processMems
/home/nindalf/Programming/go/src/github.com/nindalf/gotop/process.go:170 +0x156
goroutine 16 [chan receive]:
github.com/nindalf/gotop.func·010()
/home/nindalf/Programming/go/src/github.com/nindalf/gotop/process.go:203 +0x1f2
created by github.com/nindalf/gotop.GetProcessInfo
/home/nindalf/Programming/go/src/github.com/nindalf/gotop/process.go:217 +0x249
goroutine 17 [finalizer wait]:
runtime.park(0x40b280, 0x6915c0, 0x68fc68)
/usr/local/go/src/pkg/runtime/proc.c:1342 +0x66
runfinq()
/usr/local/go/src/pkg/runtime/mgc0.c:2276 +0x84
runtime.goexit()
/usr/local/go/src/pkg/runtime/proc.c:1394
exit status 2
FAIL github.com/nindalf/gotop 5.012s
fatal error: all goroutines are asleep - deadlock!
goroutine 1 [chan receive]:
testing.RunTests(0x57bae8, 0x68d280, 0xa, 0xa, 0x1)
/usr/local/go/src/pkg/testing/testing.go:472 +0x8d5
testing.Main(0x57bae8, 0x68d280, 0xa, 0xa, 0x691500, ...)
/usr/local/go/src/pkg/testing/testing.go:403 +0x84
main.main()
github.com/nindalf/gotop/_test/_testmain.go:65 +0x9c
goroutine 13 [select]:
github.com/nindalf/gotop.TestProcessInfo(0xc21004c120)
/home/nindalf/Programming/go/src/github.com/nindalf/gotop/process_test.go:19 +0x312
testing.tRunner(0xc21004c120, 0x68d2f8)
/usr/local/go/src/pkg/testing/testing.go:391 +0x8b
created by testing.RunTests
/usr/local/go/src/pkg/testing/testing.go:471 +0x8b2
goroutine 15 [chan send]:
github.com/nindalf/gotop.func·007()
/home/nindalf/Programming/go/src/github.com/nindalf/gotop/process.go:149 +0x4d
github.com/nindalf/gotop.func·008()
/home/nindalf/Programming/go/src/github.com/nindalf/gotop/process.go:176 +0x74
created by github.com/nindalf/gotop.processMems
/home/nindalf/Programming/go/src/github.com/nindalf/gotop/process.go:176 +0x156
goroutine 16 [chan receive]:
github.com/nindalf/gotop.func·010()
/home/nindalf/Programming/go/src/github.com/nindalf/gotop/process.go:206 +0xe4
created by github.com/nindalf/gotop.GetProcessInfo
/home/nindalf/Programming/go/src/github.com/nindalf/gotop/process.go:223 +0x249
goroutine 17 [finalizer wait]:
runtime.park(0x40b280, 0x6915c0, 0x68fc68)
/usr/local/go/src/pkg/runtime/proc.c:1342 +0x66
runfinq()
/usr/local/go/src/pkg/runtime/mgc0.c:2276 +0x84
runtime.goexit()
/usr/local/go/src/pkg/runtime/proc.c:1394
exit status 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment