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: fatal error: addspecial on invalid pointer #20082

Open
fjl opened this issue Apr 22, 2017 · 3 comments
Open

runtime: fatal error: addspecial on invalid pointer #20082

fjl opened this issue Apr 22, 2017 · 3 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. help wanted mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Android
Milestone

Comments

@fjl
Copy link

fjl commented Apr 22, 2017

A user of our library, github.com/ethereum/go-ethereum/mobile, has submitted the crash report below. The JNI library that crashed was built using gomobile and go1.8.1 android/arm64 and ran on a Galaxy Note 4. We don't have more details, sorry.

04-22 20:42:32.717 11258 11351 E Go      : fatal error: addspecial on invalid pointer
04-22 20:42:32.717 11258 11352 E GoLog   : fatal error: addspecial on invalid pointer
04-22 20:42:32.717 11258 11351 E Go      : runtime stack:
04-22 20:42:32.717 11258 11351 E Go      : runtime.throw(0x9f1ef649, 0x1d)
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/build/ethereum/go-ethereum/go/src/runtime/panic.go:596 +0x78
04-22 20:42:32.717 11258 11351 E Go      : runtime.addspecial(0x9e7d3600, 0x7d785190, 0x0)
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/build/ethereum/go-ethereum/go/src/runtime/mheap.go:1131 +0x1bc
04-22 20:42:32.717 11258 11351 E Go      : runtime.setprofilebucket(0x9e7d3600, 0x7d2a33d0)
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/build/ethereum/go-ethereum/go/src/runtime/mheap.go:1292 +0x70
04-22 20:42:32.717 11258 11351 E Go      : runtime.mProf_Malloc.func1()
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/build/ethereum/go-ethereum/go/src/runtime/mprof.go:258 +0x24
04-22 20:42:32.717 11258 11351 E Go      : runtime.systemstack(0x8e7ee000)
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/build/ethereum/go-ethereum/go/src/runtime/asm_arm.s:264 +0x8c
04-22 20:42:32.717 11258 11351 E Go      : runtime.mstart()
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/build/ethereum/go-ethereum/go/src/runtime/proc.go:1132
04-22 20:42:32.717 11258 11351 E Go      : goroutine 30422 [running]:
04-22 20:42:32.717 11258 11351 E Go      : runtime.systemstack_switch()
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/build/ethereum/go-ethereum/go/src/runtime/asm_arm.s:209 +0x4 fp=0x9bd9c6e4 sp=0x9bd9c6e0
04-22 20:42:32.717 11258 11351 E Go      : runtime.mProf_Malloc(0x9e7d3600, 0x100)
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/build/ethereum/go-ethereum/go/src/runtime/mprof.go:259 +0x104 fp=0x9bd9c798 sp=0x9bd9c6e4
04-22 20:42:32.717 11258 11351 E Go      : runtime.profilealloc(0x8e7fa780, 0x9e7d3600, 0x100)
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/build/ethereum/go-ethereum/go/src/runtime/malloc.go:831 +0x38 fp=0x9bd9c7a4 sp=0x9bd9c798
04-22 20:42:32.717 11258 11351 E Go      : runtime.mallocgc(0x100, 0x9f5e9798, 0x9ea67501, 0x9f9c3798)
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/build/ethereum/go-ethereum/go/src/runtime/malloc.go:761 +0x554 fp=0x9bd9c7fc sp=0x9bd9c7a4
04-22 20:42:32.717 11258 11351 E Go      : runtime.newobject(0x9f5e9798, 0x9f5e9798)
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/build/ethereum/go-ethereum/go/src/runtime/malloc.go:808 +0x2c fp=0x9bd9c810 sp=0x9bd9c7fc
04-22 20:42:32.717 11258 11351 E Go      : reflect.unsafe_New(0x9f5e9798, 0x9bd9c860)
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/build/ethereum/go-ethereum/go/src/runtime/malloc.go:813 +0x1c fp=0x9bd9c81c sp=0x9bd9c810
04-22 20:42:32.717 11258 11351 E Go      : reflect.New(0x9f9c3798, 0x9f5e9798, 0x91, 0x9f9c3798, 0x9f5e9798)
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/build/ethereum/go-ethereum/go/src/reflect/value.go:2138 +0x40 fp=0x9bd9c83c sp=0x9bd9c81c
04-22 20:42:32.717 11258 11351 E Go      : github.com/ethereum/go-ethereum/rlp.writeByteArray(0x9f5e9798, 0x9e7d3500, 0x91, 0x9cfe8930, 0x0, 0x0)
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/go/src/github.com/ethereum/go-ethereum/rlp/encode.go:451 +0xec fp=0x9bd9c86c sp=0x9bd9c83c
04-22 20:42:32.717 11258 11351 E Go      : github.com/ethereum/go-ethereum/rlp.writeInterface(0x9f572728, 0x9e6e68b0, 0x194, 0x9cfe8930, 0x9f572728, 0x9e6e68b0)
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/go/src/github.com/ethereum/go-ethereum/rlp/encode.go:506 +0x1c8 fp=0x9bd9c8a4 sp=0x9bd9c86c
04-22 20:42:32.717 11258 11351 E Go      : github.com/ethereum/go-ethereum/rlp.makeSliceWriter.func1(0x9f54a100, 0x5e634090, 0x97, 0x9cfe8930, 0x0, 0x0)
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/go/src/github.com/ethereum/go-ethereum/rlp/encode.go:520 +0xb4 fp=0x9bd9c8d0 sp=0x9bd9c8a4
04-22 20:42:32.717 11258 11351 E Go      : github.com/ethereum/go-ethereum/rlp.(*encbuf).encode(0x9cfe8930, 0x9f54a100, 0x5e634090, 0x9f60f420, 0x9cfe8930)
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/go/src/github.com/ethereum/go-ethereum/rlp/encode.go:188 +0xdc fp=0x9bd9c8f8 sp=0x9bd9c8d0
04-22 20:42:32.717 11258 11351 E Go      : github.com/ethereum/go-ethereum/rlp.Encode(0x7e23c040, 0x5e630d00, 0x9f54a100, 0x5e634090, 0x0, 0x0)
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/go/src/github.com/ethereum/go-ethereum/rlp/encode.go:89 +0xe8 fp=0x9bd9c914 sp=0x9bd9c8f8
04-22 20:42:32.717 11258 11351 E Go      : github.com/ethereum/go-ethereum/consensus/clique.sigHash(0x90f8d400, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/go/src/github.com/ethereum/go-ethereum/consensus/clique/clique.go:159 +0x4bc fp=0x9bd9c960 sp=0x9bd9c914
04-22 20:42:32.717 11258 11351 E Go      : github.com/ethereum/go-ethereum/consensus/clique.ecrecover(0x90f8d400, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2ad872e6, 0x42c78412)
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/go/src/github.com/ethereum/go-ethereum/consensus/clique/clique.go:173 +0x9c fp=0x9bd9c9c4 sp=0x9bd9c960
04-22 20:42:32.717 11258 11351 E Go      : github.com/ethereum/go-ethereum/consensus/clique.(*Snapshot).apply(0x9e6d6af0, 0x9b7994e8, 0x1, 0x2, 0x9e6d6af0, 0x9b799401, 0x0)
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/go/src/github.com/ethereum/go-ethereum/consensus/clique/snapshot.go:193 +0x334 fp=0x9bd9cc5c sp=0x9bd9c9c4
04-22 20:42:32.717 11258 11351 E Go      : github.com/ethereum/go-ethereum/consensus/clique.(*Clique).snapshot(0x8eb30690, 0x9f9c0a80, 0x8eb306e0, 0xb8dd, 0x0, 0x65866e97, 0x523021a8, 0xbc9da3e9, 0xb536bc67, 0xaf345ce9, ...)
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/go/src/github.com/ethereum/go-ethereum/consensus/clique/clique.go:418 +0x770 fp=0x9bd9ce14 sp=0x9bd9cc5c
04-22 20:42:32.717 11258 11351 E Go      : github.com/ethereum/go-ethereum/consensus/clique.(*Clique).verifyCascadingFields(0x8eb30690, 0x9f9c0a80, 0x8eb306e0, 0x90f8d600, 0x8f83e500, 0x7b6, 0x32c0, 0x2, 0x0)
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/go/src/github.com/ethereum/go-ethereum/consensus/clique/clique.go:338 +0x24c fp=0x9bd9cedc sp=0x9bd9ce14
04-22 20:42:32.717 11258 11351 E Go      : github.com/ethereum/go-ethereum/consensus/clique.(*Clique).verifyHeader(0x8eb30690, 0x9f9c0a80, 0x8eb306e0, 0x90f8d600, 0x8f83e500, 0x7b6, 0x32c0, 0x0, 0x0)
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/go/src/github.com/ethereum/go-ethereum/consensus/clique/clique.go:311 +0x2fc fp=0x9bd9cf48 sp=0x9bd9cedc
04-22 20:42:32.717 11258 11351 E Go      : github.com/ethereum/go-ethereum/consensus/clique.(*Clique).VerifyHeaders.func1(0x8f83e500, 0x800, 0x32c0, 0x8eb30690, 0x9f9c0a80, 0x8eb306e0, 0x9b839780, 0x9b8397c0)
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/go/src/github.com/ethereum/go-ethereum/consensus/clique/clique.go:243 +0x70 fp=0x9bd9cfcc sp=0x9bd9cf48
04-22 20:42:32.717 11258 11351 E Go      : runtime.goexit()
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/build/ethereum/go-ethereum/go/src/runtime/asm_arm.s:1017 +0x4 fp=0x9bd9cfcc sp=0x9bd9cfcc
04-22 20:42:32.717 11258 11351 E Go      : created by github.com/ethereum/go-ethereum/consensus/clique.(*Clique).VerifyHeaders
04-22 20:42:32.717 11258 11351 E Go      : 	/home/travis/go/src/github.com/ethereum/go-ethereum/consensus/clique/clique.go:251 +0xb4
... other stacks elided, see linked issue for more ...
@ligi
Copy link

ligi commented Apr 22, 2017

I am this user - please let me know how I can help getting to the root of this. Unfortunately it is not reproducable and rare (only happened once so far)

@karalabe
Copy link
Contributor

I think this was with android/arm, not android/arm64. At least according to the stats page entry we have. @ligi Could you confirm?

@ligi
Copy link

ligi commented Apr 24, 2017 via email

@andybons andybons added mobile Android, iOS, and x/mobile OS-Android labels Apr 11, 2018
@andybons andybons added this to the Unplanned milestone Apr 11, 2018
@andybons andybons added help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Apr 11, 2018
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. help wanted mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Android
Projects
None yet
Development

No branches or pull requests

5 participants