layters / testshop

Decentralized P2P marketplace for Monero users (proof of concept)
https://matrix.to/#/#neroshop:matrix.org
GNU General Public License v3.0
44 stars 8 forks source link

Thread safety issue #277

Open layters opened 5 months ago

layters commented 5 months ago
Details

So the code for the backend (neroshop daemon) is not thread safe and sometimes random segment faults occur and I'd often get deadlocks when using mutexes. I have no knowledge in threads or thread-safety practices so I need someone far more knowledgeable than me who can help make this as thread-safe as possible.

There are countless threads being used and many threads are within other threads which probably makes the issue much worse I think.

Files to focus on

src/daemon/main.cpp src/core/protocol/node.cpp src/core/protocol/routing_table.cpp src/core/protocol/key_mapper.cpp