Software error generated when adding invalid dependencies

VERIFIED FIXED in Bugzilla 2.12

Status

()

Bugzilla
Bugzilla-General
P3
minor
VERIFIED FIXED
18 years ago
6 years ago

People

(Reporter: Adam Spiers, Assigned: Chris Yeh)

Tracking

unspecified
Bugzilla 2.12

Details

(Whiteboard: 2.14)

Attachments

(1 attachment)

(Reporter)

Description

18 years ago
If you try to make a bug depend on or block an invalid bug id, bugzilla
correctly reports in big bad red and black that the bug id you entered
was invalid.  However, it then generates a software error.  I changed
the die() to a confess() and got this stack trace:

SELECT profiles.userid, profiles.groupset, profiles.login_name,
profiles.login_name = 'aspiers@guideguide.com' AND profiles.cryptpassword =
logincookies.cryptpassword AND logincookies.hostname = '192.168.1.1',
profiles.disabledtext  FROM profiles, logincookies WHERE logincookies.cookie =
'310' AND profiles.userid = logincookies.userid: Table 'logincookies' was not
locked with LOCK TABLES at globals.pl line 140
        main::SendSQL('SELECT profiles.userid, profiles.groupset,
profiles.login_name, ...') called at CGI.pl line 538
        main::quietly_check_login() called at CGI.pl line 909
        main::GetCommandMenu() called at globals.pl line 944
        main::Param('commandmenu') called at globals.pl line 977
        main::PerformSubsts('<TABLE BORDER="0"><TR><TD
BGCOLOR="#000000" VALIGN="TOP">^J<TABLE...') called at
CGI.pl line 812
        main::PutFooter() called at CGI.pl line 821
        main::PuntTryAgain('12345 is not a legal bug number') called at
/nfs-home/stuff/web/bugzilla/process_bug.cgi line 727

Why MySQL was expecting logincookies to be locked, I have no idea ...
*** Bug 51050 has been marked as a duplicate of this bug. ***
Whiteboard: 2.14
ping cyeh...

Is this the same thing you just fixed in editusers.cgi?  Same problem perhaps?
(Assignee)

Comment 3

18 years ago
It appears to be a similar problem: we lock the tables to begin bug processing 
but when an error occurs we punt without unlocking the tables first.

We're going to have to walk through all the logic of process_bug.cgi and see 
where we should be unlocking the tables in a failure case.

(Assignee)

Comment 4

18 years ago
re-assigning to me, have patch
Assignee: tara → cyeh
(Assignee)

Updated

18 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 5

18 years ago
Created attachment 26043 [details] [diff] [review]
if we PuntTryAgain, unlock all tables
(Assignee)

Comment 6

18 years ago
checked patch into trunk
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
In search of accurate queries....  (sorry for the spam)
Target Milestone: --- → Bugzilla 2.12
VERIFIED. Now works as it should.

Gerv
Status: RESOLVED → VERIFIED
Moving closed bugs to Bugzilla product
Component: Bugzilla → Bugzilla-General
Product: Webtools → Bugzilla
Version: other → unspecified
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.