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 GnuastroSeverity: 4 - Important
Item Group: CrashStatus: Fixed
Privacy: PublicAssigned 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
  • -unavailable- added by makhlaghi (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 10 Sep 2016 12:35:42 PM UTCmakhlaghiStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1