Skip to content

shh_post RPC crashes geth: invalid memory address or nil pointer reference #1861

@tinybike

Description

@tinybike

The specific RPC command sequence was shh_newFilter, shh_newIdentity, shh_post, which caused the following error in geth:

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x618adb]

goroutine 72 [running]:
github.com/ethereum/go-ethereum/xeth.(*whisperFilter).insert(0x0, 0xc82003ebb8, 0x1, 0x1)
    /home/jack/src/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/xeth/whisper_filter.go:72 +0x32b
github.com/ethereum/go-ethereum/xeth.(*XEth).NewWhisperFilter.func1(0xc8213b2180, 0xc820174400, 0x3d6, 0xc82154c1e0, 0x3, 0xc8219c02d0, 0x84, 0x560b8daa, 0x600, 0xc820d60280, ...)
    /home/jack/src/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/xeth/xeth.go:663 +0x161
github.com/ethereum/go-ethereum/xeth.(*Whisper).Watch.func1(0xc8213b2180)
    /home/jack/src/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/xeth/whisper.go:107 +0x5e
github.com/ethereum/go-ethereum/whisper.(*Whisper).Watch.func1(0xdc19c0, 0xc8213b2180)
    /home/jack/src/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/whisper/whisper.go:142 +0x3d
github.com/ethereum/go-ethereum/whisper.filterer.Trigger(0x0, 0x0, 0x0, 0x0, 0xc821812600, 0xc8217e9900, 0xdc19c0, 0xc8213b2180)
    /home/jack/src/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/whisper/filter.go:131 +0x30
github.com/ethereum/go-ethereum/whisper.(*filterer).Trigger(0xc821416a80, 0xdc19c0, 0xc8213b2180)
    <autogenerated>:2 +0xaa
github.com/ethereum/go-ethereum/event/filter.(*Filters).loop(0xc8206986e0)
    /home/jack/src/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/event/filter/filter.go:81 +0x42d
created by github.com/ethereum/go-ethereum/event/filter.(*Filters).Start
    /home/jack/src/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/event/filter/filter.go:49 +0x35

geth continued vomiting after this; the full post-mortem is at https://gist.github.com/tinybike/6846e87c033b065b2221.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions