go: net: unexpected nils from (*UnixConn).LocalAddr on solaris-amd64-oraclerel builder
https://build.golang.org/log/d9ed52fecef0637337eaaef8194b90b06ba098aa contains a curious puzzle:
solaris-amd64-oraclerel at 739bf6b929b66ac1715268e269da01c8199f034b
[…]
--- FAIL: TestUnixAndUnixpacketServer (10.01s)
server_test.go:144: skipping unix @nettest/go/unix test
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x5bf460]
goroutine 3285 [running]:
testing.tRunner.func1(0xc00012ae00)
/tmp/workdir-host-solaris-oracle-amd64-oraclerel/go/src/testing/testing.go:874 +0x3a3
panic(0x647400, 0x849ee0)
/tmp/workdir-host-solaris-oracle-amd64-oraclerel/go/src/runtime/panic.go:679 +0x1b2
net.TestUnixAndUnixpacketServer(0xc00012ae00)
/tmp/workdir-host-solaris-oracle-amd64-oraclerel/go/src/net/server_test.go:189 +0x670
testing.tRunner(0xc00012ae00, 0x696098)
/tmp/workdir-host-solaris-oracle-amd64-oraclerel/go/src/testing/testing.go:909 +0xc9
created by testing.(*T).Run
/tmp/workdir-host-solaris-oracle-amd64-oraclerel/go/src/testing/testing.go:960 +0x351
FAIL net 17.374s
The skipping message suggests that the panic occurred on the test after @nettest/go/unix. The test after is {"unixpacket", testUnixAddr()}.
It’s hard to tell from the backtrace, but this seems to suggest that either net.Dial returned a nil pointer (of a concrete connection type), or returned a non-nil pointer whose LocalAddr method returned a nil pointer (of a concrete Addr implementation type).
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 24 (13 by maintainers)
Commits related to this issue
- net: diagnose unexpected nils in TestUnixAndUnixpacketServer For #34611 Change-Id: I31894d58498b2c290ecceccfc004bc817f8969c9 Reviewed-on: https://go-review.googlesource.com/c/go/+/366114 Trust: Brya... — committed to golang/go by bcmills 3 years ago
- log/syslog: create unix sockets in unique directories startServer was invoking os.Remove on the temporary file for a unix socket after creating it. Since the files were created in the global temp dir... — committed to golang/go by bcmills 3 years ago
- net: clarify that conn.LocalAddr and conn.RemoteAddr might not be known For #34611 Change-Id: I9a1357f53124c98ad017b58774696d0377dbea27 Reviewed-on: https://go-review.googlesource.com/c/go/+/369160 ... — committed to golang/go by bcmills 3 years ago
- net: pass a testing.TB to newLocal* helpers Passing in an explicit testing.TB gives two benefits: 1. It allows the helper to fail the test itself, instead of returning an error to the caller. A n... — committed to golang/go by bcmills 3 years ago
- net: create unix sockets in unique directories This change applies the same transformation as in CL 366774, but to the net package. testUnixAddr was using os.CreateTemp to obtain a unique socket pat... — committed to golang/go by bcmills 3 years ago
“Bryan C. Mills” notifications@github.com writes:
It’s dual-stack, but only with a link-local v6 address.