Closed Bug 1747610 Opened 3 years ago Closed 1 years ago

TB empties the entire calendar on disk

Categories

(Calendar :: Provider: ICS/WebDAV, defect, P1)

Thunderbird 91
x86_64
All

Tracking

(thunderbird_esr102+ affected, thunderbird113 affected)

RESOLVED FIXED
114 Branch
Tracking Status
thunderbird_esr102 + affected
thunderbird113 --- affected

People

(Reporter: BenB, Assigned: leftmostcat)

References

Details

(Keywords: dataloss)

Attachments

(1 file)

Environment:

  • I have several calendars, which are configured as ICS calendars. The remove address is a local file file:///home/<username>/business.ics .
  • I had a recurring event.
  • Thunderbird 91.2.0 on Ubuntu Linux and XFS file system
  • This TB profile is only for calendars and dedicated to calendars. There is an email account configured, but not used (there's not even an email folder tree).

Steps:

  1. Double-click on the event, to open the event read-only.
  2. Click Edit
  3. Select "All instances"
  4. Modify the text
  5. Close and save the event

Actual result:

  • Saving the event failed. An technical error message MODIFICATION_FAILED or similar appeared.
  • The calendar disappears completely. All events of that calendar disappeared.
  • The calendar is marked read-only.
  1. I restart the application:
  2. The events are still not displaying.
  3. I change the calendar properties and remove the read-only flag.
  4. The events are still not displaying.
  5. I check the business.ics file on the harddisk, and see that only the header of the file is there, but there are no entries The whole file has only 4 lines.
BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0

Expected result:

  • Modifying the recurring event worked.
  • The modified event is displayed.
  • All other events are unchanged.

Impact:

  • Major data loss. This was my primary business calendar. I have lost all the appointments and reminders.
  • By definition: Severity S1 / Critical.

Is it reproducible? And if so with which steps.

Priority: -- → P1

I'm really sorry, but I don't know, apart from what I wrote above.
I think the best chance to find this bug is to reason about the code logic. Are there any failure cases while writing a calendar entry where we'd presume that the calendar is empty, or overwrite the calendar items array, or something like that?

What's really weird is that Lightning is occasionally failing to write to the calendar. And then, as a consenquence, keeps marking the correspinding calendar as read-only. This has happened many times (usually without wiping the calendar), and I've never figured out why. It seems that this is what is leading to the bug, but only part of the bug. Even in such a situation, we should never wipe the calendar.

Duplicate of this bug: 1782447
Assignee: nobody → leftmostcat
Status: NEW → ASSIGNED
No longer duplicate of this bug: 1782447
Duplicate of this bug: 1782447

Thanks, Sean, for taking note of this bug, and assigning it to yourself. I appreciate that.

Most other users would have dropped Thunderbird entirely. Indeed, this data loss was a major disruption, as you can imagine. This should never happen under any circumstance. Thomas D and Wayne, could you please baby-sit this serious bug and ensure it gets fixed? Unfortunately, as much as I'd like to, I cannot contribute any more information than I already did above.

Flags: needinfo?(vseerror)
Flags: needinfo?(bugzilla2007)

(In reply to Ben Bucksch (:BenB) from comment #7)

Unfortunately, as much as I'd like to, I cannot contribute any more information than I already did above.

I have discovered a bug in the handling of local ICS files which has a tiny chance of causing data loss whenever the calendar file is written, data loss that looks exactly like what you described here. Fortunately, once it's known, the solution to that bug is fairly simple. I can't be certain it's the bug which caused your issue, but I think there's a very, very good chance it is. I should have a first version of the patch up very shortly.

Flags: needinfo?(vseerror)
Flags: needinfo?(bugzilla2007)

Oh, that's great! Ping me with needinfo once you have a patch, please. I'm curious.

Ben, patch is pushed.

Flags: needinfo?(ben.bucksch)

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/53798c29e640
avoid data loss in locally-hosted ICS calendars. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 1 years ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
Regressions: 1830412
Flags: needinfo?(ben.bucksch)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: