Skip to content

'slow or dead locked' messages in diagnostics

Justin Parker edited this page Jun 17, 2016 · 2 revisions

Since v2.1, you might get messages like this generated in /diagnostics on start up:

16-02-04 08:18:27 [nodeloneoff_31] [org.nodel.jyhost.PyNode_30_MinidomePower]
The interlocked initialisation sequence of the scripting engines is slow or dead-locked. A new lock has been created to hopefully release any potential dead-lock. 

16-02-04 08:18:38 [nodeloneoff_48] [org.nodel.jyhost.PyNode_47_HaloPower]
The interlocked initialisation sequence of the scripting engines is slow or dead-locked. A new lock has been created to hopefully release any potential dead-lock. 16-02-04 08:18:48 [nodeloneoff_69] [org.nodel.jyhost.PyNode_66_2ndCirculationGallery] The interlocked initialisation sequence of the scripting engines is slow or dead-locked. A new lock has been created to hopefully release any potential dead-lock.

etc.

The Nodel host makes a best effort to spin up nodes in sequential order. This reduces the overhead in resources that are required when creating multiple (Jy)Python interpreter instances at once and results in a tidier, more predicable launch sequence.

Note: spinning up a nodes involves:

(sequentially)

  1. initialising an interpreter instance
  2. injecting the scripting toolkit
  3. parsing / executing the node's script.py file.

(in parallel)

  1. signal, event and parameter injection
  2. calling the node's main() function.

Should some nodes take longer than a few seconds to get to step (4), the Nodel host will push ahead and continue with the rest of the other outstanding nodes, always attempting to do things in sequence where possible. A warning will be generated indicating a node may be dead-locked. If the affected node eventually initialises, no more warnings will be shown. If the node remains dead-locked a warning message will continually be displayed and normally indicates an error in the scripting. Scripting timeout warnings actually apply to all subsequent scripting calls too:

... These function(s) are stuck: 'doStuff' (10 mins ago)