`thread apply all bt` and `set scheduler-locking on` are the exact GDB commands engineers reach for when triaging production deadlocks and data races in multithreaded servers, since tools like ThreadSanitizer flag the race but GDB is what confirms the interleaving that caused it. This unprotected shared_counter++ pattern is the textbook race condition every concurrency bug report eventually traces back to.