6.x: random crashes in multi-threaded application
Posted by Alexander Alexeev on 30 June 2010 08:54
I'm using EurekaLog in multi-threaded application and sometimes see random access violations or range check errors or other exceptions.
You're calling some EurekaLog routines, which works with global resources. For example, building call stack mean accessing debug information - which is a global resource. These routines are not thread-safe - i.e. there is no lock inside.
We can't set a critical section on our side, since if code crashes while holding critical section - then EurekaLog may be not be able to gain access to protected resource, when generating a report.
The solution is to wrap calls to such EurekaLog routines into critical section on your side. When crashing while holding your critical section, EurekaLog will not aquire your critical section for building report.
Checked EL version: 6.0.24
Ticket ID: 2282