Session.json info is lost in via network file shared folder, losing customizations
Categories
(Thunderbird :: General, defect)
Tracking
(thunderbird_esr78 wontfix, thunderbird89 wontfix)
People
(Reporter: hartnegg, Assigned: alta88)
References
(Blocks 1 open bug, )
Details
(Keywords: dataloss, Whiteboard: [dupme])
Attachments
(1 file)
999 bytes,
patch
|
benc
:
review+
|
Details | Diff | Splinter Review |
Comment 1•6 years ago
|
||
Comment 2•6 years ago
|
||
Same problem here.
Windows 10, Thunderbird 60.4, the Thunderbird profile is stored on a network drive.
We have also this .tmp files problem as described above. It came with our latest update of Thunderbird - I don't know the prvious version, now it is 60.4. Thunderbird worked with the profiles on a network drive for many years.
I see also this rename error in the Browser-Console. Example for one of the files:
Win error 32 during operation rename on file \Server\Mail-Most\session.json (Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird.
) DeferredTask.jsm:313
_runTask resource://gre/modules/DeferredTask.jsm:313:7
throw self-hosted:1229:9
It seems that Thunderbird saves the settings the following way:
- save the latest settings in .tmp files
- delete the original files
- rename the .tmp files to the original files
And it seems that the last step does not work. Maybe because the network drive still performes step 2 at this moment?
Maybe there is some retry and/or some waiting time necessary between step 2 and step 3 ?
Comment 5•6 years ago
|
||
OK, revisiting this, finally the penny dropped. session.json is a file administered by the Mozilla platform code which Thunderbird uses for 90% of it's operation.
Does this problem exist in Firefox, that is, do a similar operation using FF. If so, the bug needs to go to the Firefox queue.
(Oh, I already said that in comment #1)
I don't know if this problem exists in Firefox - we only have Thunderbird profiles on the network drive.
And I want to underline that in my case the Thunderbird profile is NOT on VirtualBox shared folder but just on a share on a server in our network. So I wonder if my post is at the right place here...
Comment 7•6 years ago
|
||
Well, in this case your post isn't in the right place. Please try this with Firefox, and if it fails, file a bug for Firefox.
Comment 8•5 years ago
|
||
Not important enough for someone to have tested Firefox or filed followup bugs?
Anyway, yes, there are definitely integrity issues with file shares. https://mzl.la/3cVSSPe is only a partial list - should be easy to riff on that to connect this to some worthy actionable bug(s).
backupTo should be added to session store, and will help with a lost session file here; the file lock problem may be made obsolete though not necessarily fixed.
Comment 10•4 years ago
|
||
Comment 11•4 years ago
|
||
Just a few more notes:
JSONFile always uses writeAtomic() with a tmpFile.
writeAtomic() implementation appears to be here:
https://searchfox.org/mozilla-central/source/toolkit/components/osfile/NativeOSFileInternals.cpp#931
The steps in comment #4 aren't quite right - it doesn't delete the file before renaming the tmpFile - it merely renames tmpFile to the real file (which overwrites file if it already exists). This is the pretty standard way of doing "atomic" file writes.
I don't know enough about network shares or virtualbox to know what extra things might go wrong there. I do know that atomic write saves to network shares is an historically thorny issue with no real good solution.
I don't quite see why the .json file would be locked - as per comment #3 and comment #4. I could imagine that the user might have closed (or crashed) TB then reopened it, and the network filesystem still thinks the json file is locked for a while?
I'm assuming that we're not talking about multiple instances of thunderbird sharing the same profile dir, right? That would seem to be a recipe for disaster...
Comment 12•4 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/263efd97c221
Add backupTo to session store JSONFile. r=benc
Updated•4 years ago
|
Updated•4 years ago
|
Description
•