Last Comment Bug 347707 - Changing parameters can silently fail (particularly on Windows)
: Changing parameters can silently fail (particularly on Windows)
Status: RESOLVED FIXED
:
Product: Bugzilla
Classification: Server Software
Component: Administration (show other bugs)
: 2.23
: All All
: P1 normal (vote)
: Bugzilla 2.22
Assigned To: Max Kanat-Alexander
: default-qa
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-06 23:35 PDT by A. Karl Kornel
Modified: 2008-12-25 11:58 PST (History)
4 users (show)
mkanat: approval+
mkanat: approval3.2+
mkanat: approval3.0+
mkanat: approval2.22+
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
v1 (545 bytes, patch)
2008-12-24 10:52 PST, Max Kanat-Alexander
justdave: review+
Details | Diff | Splinter Review

Description A. Karl Kornel 2006-08-06 23:35:57 PDT
In bug 347706, I reported a bug that I discovered when I tried to change parameters, but the parameter change did not complete.  Unfortunately, the failure was silent.

I would guess that this is due to the fact that the rename function in Perl "...varies wildly depending on your system implementation.... Other restrictions include whether it works on directories, open files, or preexisting files."

The only fix I can think of is to supplement the check of rename's return value with a check to see if the file still exists under its original name.
Comment 1 Max Kanat-Alexander 2008-12-05 16:38:46 PST
This is the most-common problem reported by Windows users, even though they don't know it. The problem is that the user their webserver is running as doesn't have permissions to fully control the data/ folder, and so it either can't create a new file or it can't move the new file over the params file.
Comment 2 Max Kanat-Alexander 2008-12-24 10:52:38 PST
Created attachment 354410 [details] [diff] [review]
v1

This is great. Our most-common support issue turns out to be a one-line error involving precedence.
Comment 3 Max Kanat-Alexander 2008-12-24 10:52:59 PST
This is such a simple fix for such high gain, we might as well backport it as far as reasonable.
Comment 4 Dave Miller [:justdave] (justdave@bugzilla.org) 2008-12-24 11:01:10 PST
Comment on attachment 354410 [details] [diff] [review]
v1

wow. :)  backport++ on this :)
Comment 5 Max Kanat-Alexander 2008-12-24 11:12:30 PST
Okay, it required a slight adjustment to apply on 2.22, but otherwise all branches took the above patch exactly.

tip:

Checking in Bugzilla/Config.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config.pm,v  <--  Config.pm
new revision: 1.76; previous revision: 1.75
done

3.2:

Checking in Bugzilla/Config.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config.pm,v  <--  Config.pm
new revision: 1.74.2.1; previous revision: 1.74
done

3.0:

Checking in Bugzilla/Config.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config.pm,v  <--  Config.pm
new revision: 1.70.2.2; previous revision: 1.70.2.1
done

2.22:

Checking in Bugzilla/Config.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config.pm,v  <--  Config.pm
new revision: 1.51.2.18; previous revision: 1.51.2.17
done

Note You need to log in before you can comment on or make changes to this bug.