Skip to content

geth crashes on protocolVersion command and tab-expansion #26505

@msooseth

Description

@msooseth

System information

I compiled geth from ae42148, which is latest as of now.

Geth version: geth version

./geth version
Geth
Version: 1.11.0-unstable
Git Commit: ae42148093fdfd72749ff3dda2b986cef543510f
Git Commit Date: 20221115
Architecture: amd64
Go Version: go1.19.3
Operating System: linux
GOPATH=
GOROOT=

CL client & version: ./geth attach
OS & Version: Arch Linux

uname -a
Linux athena 6.1.1-1-MANJARO #1 SMP PREEMPT_DYNAMIC Wed Dec 21 23:21:50 UTC 2022 x86_64 GNU/Linux
$ go version  
go version go1.19.4 linux/amd64

Commit hash : ae42148

Expected behaviour

Run

./geth attach

Then type: eth.protocolVersion and press TAB (to auto-complete). It should not do anything because that command has been removed (:cry: )

Actual behaviour

It crashes:

./geth attach
Welcome to the Geth JavaScript console!

instance: Geth/v1.11.0-unstable-ae421480-20221115/linux-amd64/go1.19.3
coinbase: 0xe0d37502a3bc682ef7b34abce8acd88ae4fed486
at block: 1 (Mon Jan 16 2023 16:22:39 GMT+0100 (CET))
 datadir: 
 modules: admin:1.0 clique:1.0 debug:1.0 engine:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0

To exit, press ctrl-d or type exit
> eth.protocolVersionpanic: Error: the method eth_protocolVersion does not exist/is not available at web3.js:6365:9(45)

goroutine 28 [running]:
github.com/dop251/goja._throw.exec({}, 0xc00041c400)
        github.com/dop251/[email protected]/vm.go:3663 +0x13a
github.com/dop251/goja.(*vm).run(0xc00041c400)
        github.com/dop251/[email protected]/vm.go:408 +0x8b
github.com/dop251/goja.(*baseJsFuncObject)._call(0xc00015aa50, {{0x188f458, 0xc0007f0810}, {0x0, 0x0, 0x0}}, {0x0?, 0x0}, {0x188f458, 0xc0007f0810})
        github.com/dop251/[email protected]/func.go:193 +0x41f
github.com/dop251/goja.(*baseJsFuncObject).call(...)
        github.com/dop251/[email protected]/func.go:203
github.com/dop251/goja.(*baseJsFuncObject).Call(0x13c3440?, {{0x188f458, 0xc0007f0810}, {0x0, 0x0, 0x0}})
        github.com/dop251/[email protected]/func.go:156 +0xc7
github.com/dop251/goja.(*valueProperty).get(0x134bde0?, {0x188f458, 0xc0007f0810})
        github.com/dop251/[email protected]/value.go:512 +0xbb
github.com/dop251/goja.(*baseObject).getStr(0xc000f17bc0, {0xc0002442a4, 0xf}, {0x0?, 0x0})
        github.com/dop251/[email protected]/object.go:353 +0x125
github.com/dop251/goja.(*Object).Get(0xc0007f0810, {0xc0002442a4?, 0xc0006a3dc8?})
        github.com/dop251/[email protected]/value.go:792 +0x52
github.com/ethereum/go-ethereum/internal/jsre.getCompletions(0xc000185880, {0xc0002442a0, 0x13})
        github.com/ethereum/go-ethereum/internal/jsre/completion.go:70 +0x2a5
github.com/ethereum/go-ethereum/internal/jsre.(*JSRE).CompleteKeywords.func1(0xc0006a3f20?)
        github.com/ethereum/go-ethereum/internal/jsre/completion.go:31 +0x2a
github.com/ethereum/go-ethereum/internal/jsre.(*JSRE).runEventLoop(0xc0002a5e80)
        github.com/ethereum/go-ethereum/internal/jsre/jsre.go:205 +0x4ed
created by github.com/ethereum/go-ethereum/internal/jsre.New
        github.com/ethereum/go-ethereum/internal/jsre/jsre.go:80 +0x190

Steps to reproduce the behaviour

As per above.

Backtrace

As above:

goroutine 28 [running]:
github.com/dop251/goja._throw.exec({}, 0xc00041c400)
        github.com/dop251/[email protected]/vm.go:3663 +0x13a
github.com/dop251/goja.(*vm).run(0xc00041c400)
        github.com/dop251/[email protected]/vm.go:408 +0x8b
github.com/dop251/goja.(*baseJsFuncObject)._call(0xc00015aa50, {{0x188f458, 0xc0007f0810}, {0x0, 0x0, 0x0}}, {0x0?, 0x0}, {0x188f458, 0xc0007f0810})
        github.com/dop251/[email protected]/func.go:193 +0x41f
github.com/dop251/goja.(*baseJsFuncObject).call(...)
        github.com/dop251/[email protected]/func.go:203
github.com/dop251/goja.(*baseJsFuncObject).Call(0x13c3440?, {{0x188f458, 0xc0007f0810}, {0x0, 0x0, 0x0}})
        github.com/dop251/[email protected]/func.go:156 +0xc7
github.com/dop251/goja.(*valueProperty).get(0x134bde0?, {0x188f458, 0xc0007f0810})
        github.com/dop251/[email protected]/value.go:512 +0xbb
github.com/dop251/goja.(*baseObject).getStr(0xc000f17bc0, {0xc0002442a4, 0xf}, {0x0?, 0x0})
        github.com/dop251/[email protected]/object.go:353 +0x125
github.com/dop251/goja.(*Object).Get(0xc0007f0810, {0xc0002442a4?, 0xc0006a3dc8?})
        github.com/dop251/[email protected]/value.go:792 +0x52
github.com/ethereum/go-ethereum/internal/jsre.getCompletions(0xc000185880, {0xc0002442a0, 0x13})
        github.com/ethereum/go-ethereum/internal/jsre/completion.go:70 +0x2a5
github.com/ethereum/go-ethereum/internal/jsre.(*JSRE).CompleteKeywords.func1(0xc0006a3f20?)
        github.com/ethereum/go-ethereum/internal/jsre/completion.go:31 +0x2a
github.com/ethereum/go-ethereum/internal/jsre.(*JSRE).runEventLoop(0xc0002a5e80)
        github.com/ethereum/go-ethereum/internal/jsre/jsre.go:205 +0x4ed
created by github.com/ethereum/go-ethereum/internal/jsre.New
        github.com/ethereum/go-ethereum/internal/jsre/jsre.go:80 +0x190
```

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions