[Halld-offline] danarest Crashes / Freezes Running Multithreaded

David Lawrence davidl at jlab.org
Tue Sep 9 13:44:52 EDT 2014


Hi Paul,

  I found the cause of the problem. There is a call to GetListOfNamepaths() made from one thread while 
another is calling GetCalib(). The latter has a mutex lock around calls to the DataProvider methods while
the former does not. Using the SQLite DB, this leads to a conflict when both try using the same mStatement
member of the SQLiteDataProvider object. (It may well for the MySQL provider too.)

  The fix requires placing calls to mReadMutex->Lock() and mReadMutex->Release() in the 
Calibration::GetListOfNamepaths() method in CCDB. I’ll go ahead and implement the fix and test it.
Mark or Dmitry should probably go ahead and tag a new version once it is done and they’ve checked
out the fix. I’ll send another e-mail once the CCDB trunk is fixed though in case you are eager.

Regards,
-David


On Sep 8, 2014, at 8:08 PM, Paul Mattione <pmatt at jlab.org> wrote:

> Has anyone else noticed crashes & freezes when running the danarest plugin multithreaded on the trunk?  It doesn't always crash or freeze, but when it does it dies early.  Because it's multithreaded it's hard to tell what's causing the problems, but several times now I've seen crashes while threads have been inside:
> 
> ccdb::Calibration::GetAssignment
> ccdb::SQLiteDataProvider::LoadColumns
> ccdb::SQLiteDataProvider::ReadIndex
> 
> etc.  Can someone please look into this?  Thanks.  
> 
> - Paul
> 
> 
> _______________________________________________
> Halld-offline mailing list
> Halld-offline at jlab.org
> https://mailman.jlab.org/mailman/listinfo/halld-offline




More information about the Halld-offline mailing list