User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:69.0) Gecko/20100101 Firefox/69.0
The idea behind the stethoscope is to hook it up at any time to inspect what is going on in the server. For this we keep the instructions being executed in the client record. When the stethoscope starts, it inspects all client records and issues START events of those already in progress,
However, the underlying data structure clients->inprogress is not protected against updates. This may lead to invalid pointers while preparing the profiler event string.
Added explicit locks around the global variable to fix it at the cost of few calls.