I created new folders ~/.bitcoin2 and ~/.bitcoin3, then ran bitcoin-qt using both of them as data directories.
The first one ran fine:
qt/bitcoin-qt -datadir=/home/chris/.bitcoin2
I left the first one running. The second one crashed in various ways:
$ qt/bitcoin-qt -datadir=/home/chris/.bitcoin3
Error: Unable to bind to 0.0.0.0:8333 on this computer. Bitcoin Core is probably already running.
Error: Failed to listen on any port. Use -listen=0 if you want this.
Segmentation fault
$ qt/bitcoin-qt -datadir=/home/chris/.bitcoin3
Error: Unable to bind to 0.0.0.0:8333 on this computer. Bitcoin Core is probably already running.
Error: Failed to listen on any port. Use -listen=0 if you want this.
free(): double free detected in tcache 2
Aborted
$ qt/bitcoin-qt -datadir=/home/chris/.bitcoin3
Error: Unable to bind to 0.0.0.0:8333 on this computer. Bitcoin Core is probably already running.
Error: Failed to listen on any port. Use -listen=0 if you want this.
corrupted size vs. prev_size in fastbins
Aborted
I would expect it to complain about the unavailable port, but not to crash in such random ways.
This is bitcoin built against git tag v24.0rc2
.