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

Submitter:  Mohammad Akhlaghi <makhlaghi>
Submitted:  Sat 10 Sep 2016 10:07:48 AM UTC
   
 
Category:  All Gnuastro Severity:  4 - Important
Item Group:  Crash Status:  Fixed
Privacy:  Public Assigned to:  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>
Group administrator
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>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    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.14-3b9d.
    Corresponding source code