Possible issues with shared threads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I've found some issues with memory accounting and I've written a patch [1] 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 dynamic memory.

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.

Xavi

[1] https://review.gluster.org/c/glusterfs/+/22554
_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
https://lists.gluster.org/mailman/listinfo/gluster-devel

[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux