Is there an existing issue for this?
- I have searched the existing issues
Current behaviour
On RPC v1 connection, after the block sync and mempool read is complete, a crash happens (see logs). I used mempool fork of electrs indexer which did an RPC request.
Original report can be found here: #31039 (comment)
Expected behaviour
No crash is expected
Steps to reproduce
Run Bitcoin Core (I used machine with 8 cores, and 4GB or 8GB of memory)
Relevant log output
0Oct 06 17:54:18 core bitcoind[16532]: 2024-10-06T17:54:18Z initload thread exit
1Oct 06 17:55:43 core systemd[1]: bitcoind.service: A process of this unit has been killed by the OOM killer.
2░░ Subject: A process of bitcoind.service unit has been killed by the OOM killer.
3░░ Defined-By: systemd
4░░ Support: https://www.debian.org/support
5░░
6░░ A process of unit [@UNIT](/bitcoin-bitcoin/contributor/unit/) has been killed by the Linux kernel out-of-memory (OOM)
7░░ killer logic. This usually indicates that the system is low on memory and that
8░░ memory needed to be freed. A process associated with bitcoind.service has been determined
9░░ as the best process to terminate and has been forcibly terminated by the
10░░ kernel.
11░░
12░░ Note that the memory pressure might or might not have been caused by bitcoind.service.
13Oct 06 17:55:43 core systemd[1]: bitcoind.service: Main process exited, code=killed, status=9/KILL
14░░ Subject: Unit process exited
15░░ Defined-By: systemd
16░░ Support: https://www.debian.org/support
17░░
18░░ An ExecStart= process belonging to unit bitcoind.service has exited.
19░░
20░░ The process' exit code is 'killed' and its exit status is 9.
21Oct 06 17:55:43 core systemd[1]: bitcoind.service: Failed with result 'oom-kill'.
22░░ Subject: Unit failed
23░░ Defined-By: systemd
24░░ Support: https://www.debian.org/support
25░░
26░░ The unit bitcoind.service has entered the 'failed' state with result 'oom-kill'.
27Oct 06 17:55:43 core systemd[1]: bitcoind.service: Consumed 3min 18.749s CPU time.
28░░ Subject: Resources consumed by unit runtime
29░░ Defined-By: systemd
30░░ Support: https://www.debian.org/support
31░░
32░░ The unit bitcoind.service completed and consumed the indicated resources.
33Oct 06 17:55:43 core systemd[1]: bitcoind.service: Scheduled restart job, restart counter is at 1.
34░░ Subject: Automatic restarting of a unit has been scheduled
35░░ Defined-By: systemd
36░░ Support: https://www.debian.org/support
37░░
38░░ Automatic restarting of the unit bitcoind.service has been scheduled, as the result for
How did you obtain Bitcoin Core
Compiled from source
What version of Bitcoin Core are you using?
v28.0.0
Operating system and version
Debian Bookworm
Machine specifications
8 CPUs; 4GB RAM