Defect #6143

Subtask creation form submission race?

Added by Piet Delport over 7 years ago. Updated almost 4 years ago.

Status:ClosedStart date:2010-08-16
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:-
Resolution:Duplicate Affected version:0.9.3

Description

I encountered what seems to be some form of database or form state corruption, while creating multiple subtasks for a task on our local Redmine instance (running SVN r3608).

Steps to reproduce:

  1. Create a parent task
  2. Open up more than one subtask creation form from the parent task's Subtask "add" link (that is, in separate browser windows / tabs)
  3. Fill in each subtask's Subject field, without submitting them
  4. Submit each form (window/tab) in succession, without strictly waiting for the previous submission to complete

The above shouldn't cause any trouble or corruption, because each form submission should be logically independent, but this doesn't seem to be the case, as can be seen in this example i created on demo.redmine.org:

(The subtask creation forms were submitted in the above order (1, 2, 3), but as can be seen from the issue numbers, Test child 3 happens to have been created before Test child 2.)

The exact symptoms of the corruption seems to vary; in the above example, it can be observed that although #28910 and #28909 both have "28907" in their parent field, they display each other as their respective parents in their parent trees: in other words, their parentage is displayed as #28907→#28909→#28910 and #28907→#28910→#28909, instead of #28907→#28910 and #28907→#28909.

Other symptoms i've observed:

  • In the local case, one child ended up displaying all the other children as a sequence of nested parents (despite all the children having their parent field set to the same root issue)
  • The parent issue sometimes displays only some of the children (despite all their parent fields being set), or none
  • Trying to update the affected issues result in server-side Internal errors, or in one case a "Parent task translation missing: en, activerecord, errors, models, issue, attributes, parent_issue_id, not_a_valid_parent" error

I could only solve this so far by deleting and recreating all the affected issues, without form submission overlap. (Deleting the children alone seems insufficient; subsequent recreation fails.)

(I don't know if this problem is specific to subtask creation, or affects all task creation; i'm not sure how to test the latter.)


Related issues

Duplicates Redmine - Defect #6579: Tree hierachy being currupted on multiple submissions of ... Closed 2010-10-05

History

#1 Updated by Piet Delport over 7 years ago

Based on other occurrences i've seen, this corruption may be due to race conditions in the underlying nested sets model?

#2 Updated by Piet Delport over 7 years ago

That is, i've seen it not only with subtask creations, but with parent reassignments and other operations involving parent / child task relationship changes.

Other concurrent operations don't seem to have any problems: only hierarchy changes seem to trigger the corruption, and the symptoms seem to be consistent with nested set left/right boundaries going haywire.

#3 Updated by David Martínez Moreno over 6 years ago

This is hitting me as well, Redmine 1.1.2.

#4 Updated by Bruno Medeiros over 5 years ago

It's really the same as #6579

#5 Updated by Eugene Hutorny over 5 years ago

Hit this issue with the following scenario:
Two users concurrently update two different issues and assign the same parent id to both of them.
Hierarchy of the parent task becomes broken and access to its children may cause process hanging or crashing.

#6 Updated by Toshi MARUYAMA almost 4 years ago

  • Status changed from New to Closed
  • Resolution set to Duplicate

Duplicate of #6579.
#6579 has more discussions.

#7 Updated by Toshi MARUYAMA almost 4 years ago

  • Related to deleted (Defect #6579: Tree hierachy being currupted on multiple submissions of an issue)

#8 Updated by Toshi MARUYAMA almost 4 years ago

  • Duplicates Defect #6579: Tree hierachy being currupted on multiple submissions of an issue added

#9 Updated by Toshi MARUYAMA almost 4 years ago

  • Related to deleted (Defect #6309: missing "not_a_valid_parent" from all the locale files?)

Also available in: Atom PDF