Bug 6769 - ProfilerStart is not threadsafe
Summary: ProfilerStart is not threadsafe
Status: RESOLVED NEXTRELEASE
Alias: None
Product: MAL/M5
Classification: Unclassified
Component: all (show other bugs)
Version: 11.33.11 (Apr2019-SP1)
Hardware: Other Mac OS X
: Normal minor
Assignee: MonetDB5 devs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-06 09:49 CEST by Martin Kersten
Modified: 2019-10-06 14:23 CEST (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Kersten cwiconfidential 2019-10-06 09:49:08 CEST
User-Agent:       Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:69.0) Gecko/20100101 Firefox/69.0
Build Identifier: 

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.

Reproducible: Always
Comment 1 Martin Kersten cwiconfidential 2019-10-06 14:23:07 CEST
Added explicit locks around the global variable to fix it at the cost of few calls.