bugGNU Astronomy Utilities - Bugs: bug #49049, pthread_barrier_t not immediately...


You are not allowed to post comments on this tracker with your current authentication level.

bug #49049: pthread_barrier_t not immediately reusable after destroy

Submitted by:  Mohammad Akhlaghi <makhlaghi>
Submitted on:  Sat 10 Sep 2016 10:07:48 AM UTC  
Category:  All Gnuastro Severity:  4 - Important
Item Group:  Crash Status:  Fixed
Privacy:  Public Assigned to:  Mohammad Akhlaghi <makhlaghi>
Open/Closed:  Closed

Sat 10 Sep 2016 12:35:42 PM UTC, comment #1: 

The bug was fixed and tested on a system with no `pthread_barrier'. The fix has been [git.savannah.gnu.org/cgit/gnuastro.git/commit/?id=ad704286459 pushed] to master, please see the commit message for details. There might be better solutions, and if there are we will certainly implement them, but for the time being this solves the problem, so I am marking this bug as fixed here.

Mohammad Akhlaghi <makhlaghi>
Project AdministratorIn charge of this item.
Sat 10 Sep 2016 10:07:48 AM UTC, original submission:  

Most OSs have the `pthread_barrier' class of functions. But on those that don't have this optional Pthreads class, we have included our own implementation in `libs/threads.c'.

Our implementation can still need the `pthread_barrier' structure after `pthread_barrier_destroy' is called: the `pthread_cond_wait' loop in the `pthread_barrier_wait' can finish after `pthread_barrier_destroy'.

So when the next function needs to run on threads and re-initializes the structure, there will be conflicts whuch will cause hangs and crashes.

I am most greatful to Alan Lefor who patiently tested Gnuastro on his system many times until we were able to find the cause of the crash.

Mohammad Akhlaghi <makhlaghi>
Project AdministratorIn charge of this item.


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by makhlaghi (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-09-10 makhlaghi StatusIn Progress => Fixed
        Open/ClosedOpen => Closed

    Back to the top

    Powered by Savane 3.5