alexander-bauer / cjdngo

A Go package to wrap cjdns and its files
7 stars 0 forks source link

[admin] runtime error when the admin interface stops responding #4

Open alexander-bauer opened 11 years ago

alexander-bauer commented 11 years ago

One of the refactored tests encountered this again. When run a second time, however, it dealt with the issue sanely. Could this be avoidable by triggering a ping after connection, or otherwise, to test the connection?

=== RUN TestConnect
--- PASS: TestConnect (0.00 seconds)
=== RUN TestDumpTable
--- PASS: TestDumpTable (0.00 seconds)
panic: interface conversion: interface is nil, not []interface {} [recovered]
    panic: interface conversion: interface is nil, not []interface {}

goroutine 5 [running]:
testing._func_003(0xafffd4, 0xaff100, 0xafffdc)
    /usr/lib/go/src/pkg/testing/testing.go:268 +0x11f
----- stack segment boundary -----
github.com/SashaCrofter/cjdngo/admin.(*CJDNS).DumpTable(0x1872fcc0, 0x0, 0x82268e4, 0x0)
    /home/sasha/dev/go/src/github.com/SashaCrofter/cjdngo/admin/admin.go:240 +0x1c3
github.com/SashaCrofter/cjdngo/admin.TestDumpTable(0x18761540, 0xe)
    /home/sasha/dev/go/src/github.com/SashaCrofter/cjdngo/admin/admin_test.go:38 +0x9d
testing.tRunner(0x18761540, 0x82237ac, 0x0)
    /usr/lib/go/src/pkg/testing/testing.go:273 +0x71
created by testing.RunTests
    /usr/lib/go/src/pkg/testing/testing.go:349 +0x697

goroutine 1 [chan receive]:
testing.RunTests(0x8048c00, 0x82237a0, 0x3, 0x3, 0xafdf01, ...)
    /usr/lib/go/src/pkg/testing/testing.go:350 +0x6b7
testing.Main(0x8048c00, 0x82237a0, 0x3, 0x3, 0x82267a0, ...)
    /usr/lib/go/src/pkg/testing/testing.go:285 +0x5d
main.main()
    /tmp/go-build421328582/github.com/SashaCrofter/cjdngo/admin/_test/_testmain.go:47 +0x51

goroutine 2 [syscall]:
created by runtime.main
    /build/buildd/golang-1/src/pkg/runtime/proc.c:221

goroutine 4 [syscall]:
syscall.Syscall6()
    /build/buildd/golang-1/src/pkg/syscall/asm_linux_386.s:38 +0x5
syscall.EpollWait(0x6, 0x187440a8, 0xa, 0xa, 0xffffffff, ...)
    /usr/lib/go/src/pkg/syscall/zerrors_linux_386.go:1780 +0x7d
net.(*pollster).WaitFD(0x187440a0, 0x18701ab0, 0x0, 0x0, 0x0, ...)
    /usr/lib/go/src/pkg/net/fd_linux.go:146 +0x12b
net.(*pollServer).Run(0x18701ab0, 0x8136900)
    /usr/lib/go/src/pkg/net/fd.go:236 +0xdf
created by net.newPollServer
    /usr/lib/go/src/pkg/net/newpollserver.go:35 +0x308
exit status 2
FAIL    github.com/SashaCrofter/cjdngo/admin    0.014s