Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-discussion] Multi-threading problem (and solution) in Protege-3.2.1 with Jambalaya

Micheal Hewett mhewett at
Wed Jan 24 11:37:54 PST 2007

I am experiencing random deadlocks while
trying to create a knowledge base
from a program running in a tab widget.

  Protege 3.2.1 full (all plugins installed), frame mode
  Java JDK 1.5.0_09
  Windows XP Pro
  Dell dual-core Intel hardware

Protege setup:
  tabs enabled: defaults + Algernon + my own

  My plugin reads an XML file and imports the data into
  Protege by creating classes, slots and slot values.

  The plugin randomly hangs in the middle of the import,
    at different places. 
  The more debugging output I generate, the less likely
    it is to hang (I presume because it is updating
    the knowledge base at a slower rate).
  My import program never hangs if I run it standalone
    rather than inside Protege.
  Using a remote debugger I find that the thread doing
    the import is running but not doing anything,
    which implies a deadlock condition.
    My own code is not using synchronization so the problem
    is somewhere else.
  I keep getting a mysterious "" file
    in my directory even though I'm not running the Jambalaya
  The stack dump of a hung thread is interesting:

Thread [Thread-3] (Suspended)   
    MyJTabbedPane(Container).getComponents_NoClientCode() line: 298   
    MyJTabbedPane(Container).getComponents() line: 291   
    ProjectView.getTabByClassName(String) line: not available   
    JambalayaProjectPlugin.getJambalayaTab() line: 247   
    JambalayaProjectPlugin.knowledgeBaseChanged() line: 164   
    JambalayaProjectPlugin.access$0(JambalayaProjectPlugin) line: 160   
    JambalayaProjectPlugin$1.ownSlotValueChanged(FrameEvent) line: 49   
    EventDispatchFrameStore.dispatchFrameEvent(FrameEvent) line: not 
    EventDispatchFrameStore.dispatchEvent(EventObject) line: not 
    EventDispatchFrameStore.dispatchEvents(Collection, boolean) line: 
not available   
    EventDispatchFrameStore.dispatchEvents(boolean) line: not available   
    EventDispatchFrameStore.dispatchEvents() line: not available   
    EventDispatchFrameStore.setDirectOwnSlotValues(Frame, Slot, 
Collection) line: not available   
    SetDirectOwnSlotValuesCommand.doIt() line: not available   
    UndoFrameStore.simpleCommandExecute(Command) line: not available   
    UndoFrameStore.execute(Command) line: not available   
    UndoFrameStore.setDirectOwnSlotValues(Frame, Slot, Collection) line: 
not available   
    ArgumentCheckingFrameStore.setDirectOwnSlotValues(Frame, Slot, 
Collection) line: not available   
    ChangeMonitorFrameStore.setDirectOwnSlotValues(Frame, Slot, 
Collection) line: not available   
    DefaultDispatch.setDirectOwnSlotValues(FrameStore, Frame, Slot, 
Collection) line: not available   
    CleanDispatchFrameStore.setDirectOwnSlotValues(Frame, Slot, 
Collection) line: not available   
Slot, Collection) line: not available   
    DefaultKnowledgeBase.setDirectOwnSlotValues(Frame, Slot, Collection) 
line: not available   
    DefaultKnowledgeBase.addOwnSlotValue(Frame, Slot, Object) line: not 
    DefaultCls(DefaultFrame).addOwnSlotValue(Slot, Object) line: not 
    ZProtegeClass.addSlotValue(Instance, Slot, Object) line: 226   
    ZProtegeClass.findOrCreateProtegeClass(Node, KnowledgeBase, Cls, 
Cls, ZParameters, List<String>) line: 156   
    Z.toProtegeTerm(Node, Cls, Cls, KnowledgeBase, ZParameters, 
List<String>) line: 384   
    Z.processComplexRelation(Node, Cls, Cls, KnowledgeBase, ZParameters, 
List<String>) line: 519   
    Z.toProtegeTerm(Node, Cls, Cls, KnowledgeBase, ZParameters, 
List<String>) line: 412   
    ImportTask.executeOne() line: 107   
    ImportTask(StandardManagedTask).run() line: 388 line: 595   

The Jambalaya plugin is apparently attaching a listener to
Protege even though it is not activated.  The listener code
is somehow accidentally causing a deadlock.  Jambalaya is
also unnecessarily using processing time.

  I removed the Jambalaya plugin from the Protege folder.
  My import tab doesn't hang now.

  Either Jambalaya is ill-behaved because it adds a listener
  in a static initializer or in setup() rather than in the initialize()
  method, or Protege is ill-behaved because it creates an instance
  of each plugin even if it isn't activated by the user.  A non-activated
  plugin shouldn't be consuming processor time.

Mike Hewett
System Architect
Evincii, Inc.

More information about the protege-discussion mailing list