tango-controls / cppTango

Moved to gitlab
http://tango-controls.org
41 stars 34 forks source link

Calls to asynchronous methods not thread-safe when several CORBA system exceptions are thrown at the same time #234

Closed tango-controls-bot closed 7 years ago

tango-controls-bot commented 8 years ago

Hi,

A thread-safety issue has been identified on the asynchronous calls API. In a multithreaded environment, if several threads are doing asynchronous calls in parallel and some CORBA system exceptions need to be rethrown at the same time, they share the same static variable for a short period of time for the description of the system exception. And this is not protected by a lock. The problem is due to the fact that Tango::Except::print_CORBA_SystemException is returning a pointer to a static variable. This could lead to a segmentation fault. A reentrant version of Tango::Except::print_CORBA_SystemException() could be implemented to fix the problem.

A fix has been tested sucessfully and will be commited in the coming days.

Cheers, Reynald

Reported by: bourtemb

Original Ticket: tango-cs/bugs/792

tango-controls-bot commented 8 years ago

Original comment by: taurel

tango-controls-bot commented 8 years ago

Change bug category from Archiving to C++ API

Original comment by: taurel

tango-controls-bot commented 8 years ago

Fixed in Tango 9.2.2 patch available here: http://www.tango-controls.org/downloads/patches

Original comment by: bourtemb