[Gluster-devel] Possible issues with shared threads
xhernandez at redhat.com
Fri Apr 12 12:34:54 UTC 2019
I've found some issues with memory accounting and I've written a patch 
to fix them. However during the tests I've found another problem:
In a brick-multiplexed environment, posix tries to start a single janitor
thread shared by all posix xlator instances, however there are two issues:
1. The creation is not atomic and it could happen that more than one
janitor thread is started (unless xlator init is serialized in some way)
2. Even though the thread is global, it's using information from a single
instance (through 'this'). This means that once the first instance of posix
xlator is stopped, 'this' can be destroyed, but the janitor will continue
using it. From the memory accounting point of view, it means that whatever
this thread does, is not tracked anymore.
Note that we only need to write a log message to access 'this' and use
I detected this problem in the posix xlator, but since there are other
threads that have been made global, maybe something similar could happen. I
think this need to be checked and fixed.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gluster-devel