Deadlock in Updates

Bug #866423 reported by David Graf
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
Critical
Markos Zaharioudakis

Bug Description

If some update expressions are executed in a certain order, Zorba ends up in a deadlock.

Example Query:

import module namespace coll = "http://www.zorba-xquery.com/zorba/collection-functions";

declare sequential function local:test()
{
  coll:create-collection("test", <a><b>Foo</b></a>);
  replace value of node collection("test")[1]/b with "Bar";
  coll:insert-nodes-at("test", 2, <a />);
  ();
};

local:test();

Tags: update
Revision history for this message
Daniel Turcanu (danielturcanu) wrote :

Right now, the test zorba_stack_module/empty1 is hanging when executed in debug mode. In release mode it passes.
The stack module uses the collections, and there is a deadlock between removeNode function which aquires Writelock and the collection iterator, which aquires Readlock. The collection iterator is not closed before the apply updates.

Revision history for this message
Daniel Turcanu (danielturcanu) wrote :

Still hanging

Changed in zorba:
status: Fix Released → Incomplete
Changed in zorba:
milestone: none → 2.2
Revision history for this message
Markos Zaharioudakis (markos-za) wrote :

Where is the query file for the "zorba_stack_module/empty1" test?

Revision history for this message
Daniel Turcanu (danielturcanu) wrote :

In the newly commited stack module

Changed in zorba:
status: Incomplete → Fix Committed
Changed in zorba:
assignee: Markos Zaharioudakis (markos-za) → Matthias Brantner (matthias-brantner)
assignee: Matthias Brantner (matthias-brantner) → Markos Zaharioudakis (markos-za)
Changed in zorba:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.