Hi,

I am one such masochist that Rony was referring to 😊

It seems that in InterpreterInstance::terminate() there can be situations where 
the kernel lock ends up being taken twice. It is only ever released once and 
this means that when it has been locked twice the thread leaves the function 
owning the kernel lock and can go on happily locking and releasing it but any 
other thread trying to access it is immediately and forever locked.

I spent quite some time trying to figure out and code for the individual cases 
(I think there may be at least two) to ensure the acquires and releases are 
always balanced but in the end I gave up and as a hack added an extra call to 
ActivityManager::releaseAccess() at the end of this function. This seems to 
have done the trick and the program runs ok with this in place.

The reasons for the additional kernel locks may be easy to identify or they may 
a symptom of problems elsewhere that could be very subtle or nasty but 
hopefully this provides a starting point

Dom



-----Original Message-----
From: Rony G. Flatscher <rony.flatsc...@wu.ac.at> 
Sent: 17 August 2025 09:30
To: oorexx-devel@lists.sourceforge.net
Subject: Re: [Oorexx-devel] Some more information, and a random run (Re: 
Question ad a hang situation

Hi Michael,

On 17.08.2025 03:47, Michael Lueck wrote:
> W O W ! ! ! Bravo!!! A most impressive success milestone!

but not solved yet. It looks as it is somehow linked to terminating interpreter 
instances right before the callback from Java into ooRexx. The change I made 
was a debug output statement from the Java garbage collector run (collecting 
the peer Java RexxEngines) right before the ooRexx instance gets terminated 
from the Java side, as if this little time span makes the difference (at least 
on my
machine) and allows the Java callback into ooRexx to not block.

---rony




_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel



_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to