don't destroy synchro in a simcall, this drives the JVM nuts
The destroy is called from the GC thread when running in the JVM. And
that thread is obviously not a simix thread, so the simcall mechanism
won't work properly.
I tried to make it a simix thread when I see it (ie, when
JavaThreadFactory::self() is about to return NULL), but it leads to
further complications, such as the following error message:
Can't extend stack to 0x22f35958 during signal delivery for thread 9:
no stack segment
Oha. That hurts. I've no idea of why that thread has no stack, and I
think I don't want to know. Actually, it makes no sense to delete the
synchronization objects from a simcall only. Why would this need to be
linearized in a reproductible way? So, delete these objects directly,
and everything works well.
That bug was reported in:
https://gforge.inria.fr/tracker/index.php?func=detail&aid=19893&group_id=12&atid=165