Closed
Bug 253935
Opened 21 years ago
Closed 21 years ago
shift+delete doesnt delete form entries due to corrupted formhistory.dat
Categories
(Toolkit :: Form Manager, defect)
Toolkit
Form Manager
Tracking
()
VERIFIED
FIXED
People
(Reporter: bugzilla, Assigned: bryner)
References
Details
(Keywords: fixed-aviary1.0, Whiteboard: [have patch])
Attachments
(2 files)
|
603 bytes,
patch
|
Details | Diff | Splinter Review | |
|
3.08 KB,
patch
|
bryner
:
review+
mscott
:
superreview+
|
Details | Diff | Splinter Review |
After bug 242250 was fixed, the form entries still came back when browser was
restarted. This is due to that formhistory.dat is corrupted (see bug 242250,
comment 22). This was tested on Windows 2000 and on a XP machine.
Steps to reproduce:
1. Delete an form entry with shift+delete
2. Restart browser
Actual results:
Deleted form entry is back
Expected results:
Deleted form entry should not appear anymore
This bug will not appear no more if formhistory.dat is renamed or deleted. Form
entry deletion will work as expected.
| Assignee | ||
Comment 1•21 years ago
|
||
Ok, so we have some sort of mork database corruption happening here. I think
the main thing we need here is a corrupted formhistory.dat to analyze, but
unfortunately due to the mork format it's difficult to tell if your
formhistory.dat contains any sensitive data. I'll test out my corrupted
formhistory.dat in a debug build and see if I'm triggering any assertions in mork.
I know this has been asked many times, but why do we keep using mork?
Component: Password Manager → Form Manager
| Assignee | ||
Comment 3•21 years ago
|
||
So, in my case, the symptom I notice is that I'm unable to get a particular
value to stick in the "Branch" input on
http://bonsai.mozilla.org/cvsqueryform.cgi . I tried, just now, hooking up a
nsIMdbErrorHook to satchel's mork instance. I got this error upon loading that
page, and nothing else:
mork error: undefined cell value alias
bienvenu, does that mean anything to you?
Comment 4•21 years ago
|
||
It sounds like an atom id is not in the dictionary, but is in a row cell -
Brian, do you have a reproducible set of steps to corrupt a previously
uncorrupted mork db? That would be a first - the only way I know of to corrupt a
mork db is to have two instances of mozilla writing to a mork db at the same
time (formhistory uses mork? Is that new? I knew plain old history used mork,
but not formhistory)
I only have on instance running at a time, except during the DDExec problem
Firefox encountered recently. Is it possible to uncorrupt a mork? I guess
that's what you're working on.
| Reporter | ||
Updated•21 years ago
|
Flags: blocking-aviary1.0PR?
Comment 6•21 years ago
|
||
Looking at the formhistory.dat file, it looks to me that it's likely that two
instances of Firefox were writing to it, specifically, appending rows with the
same id to it. Since the formhistory code lets Mork pick the row ids, and Mork
just uses monotonically increasing row ids, if you have two instances of Firefox
writing to Mork, they're quite likely to pick the same row id. And since new
rows are added by just appending transactions to the file, both instances will
end up in the file. That's if you're lucky, I guess. You can end up with much
worse corruption.
Once this happens, I believe formhistory changes are never remembered, because
the formhistory code is ignoring the error that Mork returns about the db being
corrupted. So it only takes one incident of getting two instances of Firefox
writing to formhistory.dat to make this problem permanent. I can attach a patch
that will cause the form history code to delete the formhistory.dat file and get
on with life, which is what the code intended to do, I believe (it's currently
just ignoring one of the error paths). However, I think it's possible, depending
on how ambitious you are, to recover the data in this case, by writing out the
history we were able to parse to a temp formhistory.dat file and coying that
over the original, instead of simply blowing it away - I know if it was up to
me, I'd like to keep as much of my form history as possible. I'll spend a few
minutes seeing if that approach will work.
Comment 7•21 years ago
|
||
I haven't tried this yet, but it should work. If it does, next I'll see if it's
possible to save some of the data...
Deleting this file will result in someone filing a dataloss bug. Full recovery
would of course be best, but some has to be better than none. Is it possible to
hack Mork to be able to either A) recover or B) prevent this from happening in
the first place? I don't think I've ever had 2 browsers open within the past 6
months.
Comment 9•21 years ago
|
||
this fix successfully restored the data in the corrupted formhistory.dat that I
have access to, and wrote it out to a new, uncorrupted formhistory.dat. It's
rather specific to the particular failure path caused by this form of
corruption, where we were actually able to read in the table almost all the way
to the end.
Re how this got corrupted, as I said before, it looks very much like two
instances wrote to the file - we count on the profile manager locking to
prevent this. Once the DB got corrupted, it would have stayed corrupted
forever, with the existing code. Without reproducible steps to corrupt a
formhistory.dat file, that's about all I can say - it's possible of course that
there's a bug in Mork that can produce this corruption, but I'd need some sort
of way to reproduce the problem.
Comment 10•21 years ago
|
||
*** Bug 255276 has been marked as a duplicate of this bug. ***
Updated•21 years ago
|
Attachment #155722 -
Flags: review?(bryner)
| Assignee | ||
Updated•21 years ago
|
Attachment #155722 -
Flags: review?(bryner) → review+
Updated•21 years ago
|
Attachment #155722 -
Flags: superreview?(mscott)
Updated•21 years ago
|
Attachment #155722 -
Flags: superreview?(mscott) → superreview+
Comment 12•21 years ago
|
||
Thought I'd note recorruption of formhistory.dat after renaming and receiving
fresh one is reappearing as of 20040812 Firefox/0.9 build.
Will be watching closely for how/when conditions appear. It may be during
browser crashes though I have no idea.
Updated•21 years ago
|
Whiteboard: [have patch]
Comment 13•21 years ago
|
||
*** Bug 242836 has been marked as a duplicate of this bug. ***
| Assignee | ||
Comment 14•21 years ago
|
||
checked in
Comment 15•17 years ago
|
||
Verified on Gran Paradiso 3.0.1pre.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1pre) Gecko/2008062306 GranParadiso/3.0.1pre
Status: RESOLVED → VERIFIED
Updated•17 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•