bug-hurd
[Top][All Lists]
Advanced

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

Re: race condition destroying condition variables


From: Brent W. Baccala
Subject: Re: race condition destroying condition variables
Date: Tue, 26 Dec 2017 23:06:13 -0500


Well, I've tried both Samuel's (swap space) and Svante's (nocheck) suggestions and have found that both allow me to successfully build the glibc packages!

The problem that I've got now is that I've changed the size of the condition variables by adding an extra field, an integer that tracks the number of waiting threads.  This means that I have to recompile anything that depends on the size of a condition variable, which is potentially everything on the system.

First, I'd like to build the packages using the same scripts used to build the Debian distribution packages.  Is this available somewhere?

Next, how will modifying the memory layout of condition variables affect our packaging?  I figure that we'll have to bump libc0.3 to libc0.4, and that should pretty much do the trick, right?

Finally, I'm wondering if we need to change this at all.  The "__data" field in struct __pthread_cond seems unused, at least in the libpthreads directory.  Is there any use for this pointer?  Or can I use those bits?

Also, the Linux source code in nptl/ includes the following comment:

  /* If there are waiters which have been already signalled or
     broadcasted, but still are using the pthread_cond_t structure,
     pthread_cond_destroy needs to wait for them.  */

...which is the conclusion I've come to as well.

    agape
    brent
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]