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

x/net/ipv4: SetICMPFilter panic in 1.9 #22557

arthur-xie opened this issue Nov 3, 2017 · 5 comments

x/net/ipv4: SetICMPFilter panic in 1.9 #22557

arthur-xie opened this issue Nov 3, 2017 · 5 comments


Copy link

@arthur-xie arthur-xie commented Nov 3, 2017

Suddenly, the tested(under OS X 10.11) functions (IPPing and TraceRoute diagnostics) fail to work any more.

The panic stack trace:

2017/12/03 14:42:22 [trace_route.go:259][E] 000000000001: Trace route panic: reflect: call of reflect.Value.Int on zero Value
2017/12/03 14:42:22 [trace_route.go:260][E] 000000000001: goroutine 71 [running]:
runtime/debug.Stack(0xc42023aff0, 0xc42003faa0, 0x2)
	/usr/local/Cellar/go/1.9/libexec/src/runtime/debug/stack.go:24 +0xa7*traceRoute).test.func1(0xc420158b40, 0xc42003ff18)
	/Users/arthur/WorkSpace/golang/src/ +0xcd
panic(0x462e620, 0xc420206120)
	/usr/local/Cellar/go/1.9/libexec/src/runtime/panic.go:491 +0x283
reflect.Value.Int(0x0, 0x0, 0x0, 0x46e4ff7)
	/usr/local/Cellar/go/1.9/libexec/src/reflect/value.go:908 +0x141, 0xc420418008, 0xc420418008, 0x4a285c0, 0xc420418008)
	/Users/arthur/WorkSpace/golang/src/ +0x196, 0xc420418008, 0xc42003fc98, 0xc42003fca0, 0x4045b27)
	/Users/arthur/WorkSpace/golang/src/ +0x7d*dgramOpt).SetICMPFilter(0xc4200801a0, 0xc42003fce0, 0xc420206060, 0x7)
	/Users/arthur/WorkSpace/golang/src/ +0x51*traceRoute).trace(0xc420414000, 0xc420158b40, 0x0, 0x0)
	/Users/arthur/WorkSpace/golang/src/ +0x1d0*traceRoute).test(0xc420414000, 0xc420158b40, 0x0, 0x0)
	/Users/arthur/WorkSpace/golang/src/ +0x7f, 0xc4203da660)
	/Users/arthur/WorkSpace/golang/src/ +0x96
created by
	/Users/arthur/WorkSpace/golang/src/ +0x67

Project code snippet:

var filter ipv4.ICMPFilter

After switch back to 1.8.1, everything works fine.

@gbbr gbbr changed the title golang 1.9 SetICMPFilter panic x/net/ipv4: SetICMPFilter panic in 1.9 Nov 3, 2017
@gopherbot gopherbot added this to the Unreleased milestone Nov 3, 2017
Copy link

@bradfitz bradfitz commented Nov 3, 2017

What git revision of x/net are you using?

Copy link

@arthur-xie arthur-xie commented Nov 4, 2017

Golang was installed through homebrew, I don't know how to check the git reversion. When try to upgrade, homebrew download it from After this upgrade and updating GOROOT environment variable , the panic problem still exist.

Copy link

@arthur-xie arthur-xie commented Nov 4, 2017

Sorry, I made a mistake. The x/net is not under the $GOROOT but $GOPATH/src/ The git info is:

$ git log -1
commit daba796358cd2742b75aae05761f1b898c9f6a5c
Author: Mikio Hara <>
Date:   Thu Oct 20 12:26:43 2016 +0900

    ipv6: remove unnecessary control message marshaling
    The encoded data is just for debugging at kernel side and has
    remained in normal code path until now, oops.
    Change-Id: I3581bf73a6e6c9ec4b6228a670b6d8338f13ee14
    Run-TryBot: Mikio Hara <>
    TryBot-Result: Gobot Gobot <>
    Reviewed-by: Ian Lance Taylor <>

After upgrading to

$ git log -1
commit 01c190206fbdffa42f334f4b2bf2220f50e64920
Author: Tom Bergan <>
Date:   Thu Nov 2 11:53:09 2017 -0700

    http2: fix transport data race on reused *http.Request objects
    Based on golang/go#19653, it should be possible to reuse an http.Request
    object after the outstanding request has completed. This CL fixes a race
    in the http/2 library that occurs when a caller tries to reuse an
    http.Request just after the request completed.
    The new test failed with -race before this CL and passes after this CL.
    Verified with -count 10000.
    Updates golang/go#21316
    Change-Id: I014cf9cefd0dd21f6f41763ba554d23ddc7fca40
    Reviewed-by: Brad Fitzpatrick <>
    Run-TryBot: Brad Fitzpatrick <>
    TryBot-Result: Gobot Gobot <>

The panic problem disappeared.

Copy link

@bradfitz bradfitz commented Nov 4, 2017

Thanks for confirming. I'd thought this sounded familiar. I'm going to close as already fixed in the past year. Somebody else can search/bisect to figure out the dup bug and the fix if they're curious.

@bradfitz bradfitz closed this as completed Nov 4, 2017
Copy link

@mikioh mikioh commented Jan 15, 2018

Dup of #19209.

@golang golang locked and limited conversation to collaborators Jan 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

4 participants