Ignition 8.1.46 has been removed from our website and will be replaced with 8.1.47 soon.
A change was made to fix issues with scripts being accidentally loaded multiple times during initialization, but in certain edge cases that fix can cause a deadlock. At this time we have decided to revert the changes and attempt another fix for the original issue.
Awww!
Curious how closely the broken fix followed my advice...
lol, it was absolutely our attempt to fix your scripting bug that caused this. We've reverted it for 8.1.47.
Right, I know that. In my bug report, I provided a suggested solution. I obviously don't know if my suggestion was followed, or found to be flawed.
I recommended serializing/synchronizing/locking on the project script manager. If that wasn't done, it would almost certainly deadlock in some cases. If it was done, and there is still a deadlock possibility, I'm really interested in how that happens.
In my initial, detailed, report, I mentioned a "naïve" solution. That solution would seem to solve the problem for my equally naïve reproducer.
It wasn't your exact suggestion, but it was a reentrant lock held by the script manager around most operations in ScriptModule
, so broadly similar and should've achieved the same end result. So far we've only had one customer report issues, so it seems to be a pretty marginal edge case, but it's bad enough and unknown enough that pulling it was the right move.
So, could be deadlock between a script init and some other operation?
A little birdie showed me the deadlock details.
My suggested solution didn't account for the fact that python/jython aggressively locks around any use of the import
keyword, using its own lock.
Sigh. Busted.
Fortunately, using Jython's own lock for project script auto-loading is likely the right solution. Probably. Hopefully.