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

concurrent map read and map write #30139

Closed
GDdark opened this issue Jul 11, 2024 · 3 comments · Fixed by #30142
Closed

concurrent map read and map write #30139

GDdark opened this issue Jul 11, 2024 · 3 comments · Fixed by #30142
Labels

Comments

@GDdark
Copy link
Contributor

GDdark commented Jul 11, 2024

System information

Geth version: v1.14.6-stable
OS & Version: Linux

fatal error: concurrent map writes

goroutine 1970042 [running]:
github.com/ethereum/go-ethereum/core/state.(*StateDB).setStateObject(...)
        github.com/ethereum/go-ethereum/core/state/statedb.go:642
github.com/ethereum/go-ethereum/core/state.(*StateDB).getStateObject(0xc0030076c0, {0x67, 0x31, 0xcf, 0xee, 0xe3, 0x30, 0x4d, 0x74, 0x7c, ...})
        github.com/ethereum/go-ethereum/core/state/statedb.go:637 +0x6c9
github.com/ethereum/go-ethereum/core/state.(*StateDB).GetNonce(...)
        github.com/ethereum/go-ethereum/core/state/statedb.go:343
github.com/ethereum/go-ethereum/core/txpool/blobpool.(*BlobPool).Nonce(0xc000c409c0, {0x67, 0x31, 0xcf, 0xee, 0xe3, 0x30, 0x4d, 0x74, 0x7c, ...})
        github.com/ethereum/go-ethereum/core/txpool/blobpool/blobpool.go:1607 +0x105
github.com/ethereum/go-ethereum/core/txpool.(*TxPool).Nonce(0x1?, {0x67, 0x31, 0xcf, 0xee, 0xe3, 0x30, 0x4d, 0x74, 0x7c, ...})
        github.com/ethereum/go-ethereum/core/txpool/txpool.go:387 +0x48
github.com/ethereum/go-ethereum/eth.(*EthAPIBackend).GetPoolNonce(0x10?, {0xc00051a008?, 0xc00080c170?}, {0x67, 0x31, 0xcf, 0xee, 0xe3, 0x30, 0x4d, ...})
        github.com/ethereum/go-ethereum/eth/api_backend.go:329 +0x2e
github.com/ethereum/go-ethereum/internal/ethapi.(*TransactionAPI).GetTransactionCount(0xc000dcdc50, {0x2030650, 0xc00106c140}, {0x67, 0x31, 0xcf, 0xee, 0xe3, 0x30, 0x4d, ...}, ...)
        github.com/ethereum/go-ethereum/internal/ethapi/api.go:1629 +0xb6
reflect.Value.call({0xc0003b80e0?, 0xc000c74c18?, 0x60?}, {0x1a9f565, 0x4}, {0xc000cc2060, 0x4, 0xc000cc2090?})
        reflect/value.go:596 +0xca6
reflect.Value.Call({0xc0003b80e0?, 0xc000c74c18?, 0x2?}, {0xc000cc2060?, 0x16?, 0x16?})
        reflect/value.go:380 +0xb9
github.com/ethereum/go-ethereum/rpc.(*callback).call(0xc000e33e60, {0x2030650, 0xc00106c140}, {0xc004358000, 0x17}, {0xc000ff6390, 0x2, 0x4e10cf?})
        github.com/ethereum/go-ethereum/rpc/service.go:205 +0x36d
github.com/ethereum/go-ethereum/rpc.(*handler).runMethod(0xc002a1c180?, {0x2030650?, 0xc00106c140?}, 0xc0003f42a0, 0x2?, {0xc000ff6390?, 0xc001437dc0?, 0x41e6d8?})
        github.com/ethereum/go-ethereum/rpc/handler.go:568 +0x3c
github.com/ethereum/go-ethereum/rpc.(*handler).handleCall(0xc005f160a0, 0xc000ff60f0, 0xc0003f42a0)
        github.com/ethereum/go-ethereum/rpc/handler.go:515 +0x22f
github.com/ethereum/go-ethereum/rpc.(*handler).handleCallMsg(0xc005f160a0, 0xc000ff60f0, 0xc0003f42a0)
        github.com/ethereum/go-ethereum/rpc/handler.go:473 +0x22d
github.com/ethereum/go-ethereum/rpc.(*handler).handleNonBatchCall(0xc005f160a0, 0xc000ff60f0, 0xc0003f42a0)
        github.com/ethereum/go-ethereum/rpc/handler.go:299 +0x18a
github.com/ethereum/go-ethereum/rpc.(*handler).handleMsg.func1.1(0x2030650?)
        github.com/ethereum/go-ethereum/rpc/handler.go:272 +0x25
github.com/ethereum/go-ethereum/rpc.(*handler).startCallProc.func1()
        github.com/ethereum/go-ethereum/rpc/handler.go:390 +0xbe
created by github.com/ethereum/go-ethereum/rpc.(*handler).startCallProc in goroutine 1970055
        github.com/ethereum/go-ethereum/rpc/handler.go:386 +0x79
@rjl493456442
Copy link
Member

Can you share a bit more logs at panic place? It will be very helpful if we can find the information of "another map write".

@rjl493456442
Copy link
Member

We have found the issue, thanks for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@rjl493456442 @GDdark and others