Closed Bug 303366 Opened 19 years ago Closed 19 years ago

possible locking tables conflict when voting for bugs

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

2.20
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: LpSolit, Assigned: LpSolit)

References

Details

(Keywords: regression)

Attachments

(1 file)

When a bug gets confirmed by my votes, I sometimes get the following error message:


Attempted to lock a table without releasing previous lock first:

Tables already locked:
bugs WRITE, bugs_activity WRITE, votes WRITE, longdescs WRITE, profiles READ,
products READ, components READ, cc READ, dependencies READ, groups READ,
fielddefs READ, namedqueries READ, whine_queries READ, watch READ, profiles AS
watchers READ, profiles AS watched READ, user_group_map READ, bug_group_map
READ, email_setting READ

Tables requesting locking:
profiles WRITE, user_group_map WRITE, group_group_map READ, groups READ 


This is due to BugMail.pm, line 405:

my $user = new Bugzilla::User($user_id);

Creating a new user object may call $user->derive_groups() which also does a
LOCK TABLES. The error message doesn't appear if groups haven't been changed for
a while though. My patch from bug 301020 would fix the problem but is too
invasive for 2.20. So I will extract here only the relevant part of this patch,
for both 2.20 and tip, and will update my patch in bug 301020 accordingly, for
the tip only.

For the records, I already attempted to fix the voting system in bug 277013. Now
the right fix is definitely to send emails only when tables are unlocked. This
will avoid many problems and possible regressions.
Status: NEW → ASSIGNED
Target Milestone: --- → Bugzilla 2.20
Blocks: 301020
Attached patch patch, v1Splinter Review
tested on both the tip and 2.20.
Attachment #191578 - Flags: review?(wurblzap)
Blocks: 34172
Received the same error when doing a multiple-bug update, (approx. 15 bugs).
Comment on attachment 191578 [details] [diff] [review]
patch, v1

r=wurblzap for HEAD because of my testing, and for 2.20 because of your
testing.

To test, I needed to work around bug 305126, comment 3, by locking
group_group_map in sub show_user in votes.cgi, but that's not related to this
bug here, and neither to the patch.
Attachment #191578 - Flags: review?(wurblzap) → review+
Flags: approval?
Flags: approval2.20?
this bug just keeps coming back. (bug 277013)
Flags: approval?
Flags: approval2.20?
Flags: approval2.20+
Flags: approval+
Keywords: regression
tip:

Checking in editproducts.cgi;
/cvsroot/mozilla/webtools/bugzilla/editproducts.cgi,v  <--  editproducts.cgi
new revision: 1.93; previous revision: 1.92
done
Checking in votes.cgi;
/cvsroot/mozilla/webtools/bugzilla/votes.cgi,v  <--  votes.cgi
new revision: 1.31; previous revision: 1.30
done
Checking in Bugzilla/Bug.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Bug.pm,v  <--  Bug.pm
new revision: 1.92; previous revision: 1.91
done


2.20rc2:

Checking in editproducts.cgi;
/cvsroot/mozilla/webtools/bugzilla/editproducts.cgi,v  <--  editproducts.cgi
new revision: 1.85.2.3; previous revision: 1.85.2.2
done
Checking in votes.cgi;
/cvsroot/mozilla/webtools/bugzilla/votes.cgi,v  <--  votes.cgi
new revision: 1.29.4.1; previous revision: 1.29
done
Checking in Bugzilla/Bug.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Bug.pm,v  <--  Bug.pm
new revision: 1.81.2.2; previous revision: 1.81.2.1
done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: