Closed Bug 1850732 Opened 11 months ago Closed 10 months ago

Importing .ics file (locally or remotely by CalDAV) ultimately freezes Thunderbird (Lightning)

Categories

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

Thunderbird 115

Tracking

(thunderbird_esr115 fixed, thunderbird118 fixed)

RESOLVED FIXED
119 Branch
Tracking Status
thunderbird_esr115 --- fixed
thunderbird118 --- fixed

People

(Reporter: zygmanski, Assigned: leftmostcat)

References

(Regression)

Details

(Keywords: hang, regression)

Attachments

(2 files)

Steps to reproduce:

Opened the Calendar window -> Menu -> Open From File -> Calendar -> here I choose the attached .ics file.

Actual results:

The Calendar (and Thunderbird) is not responding and the only thing one can do is forcing close of the program.
Using Thunderbird now becomes impossible since opening it once again results in a immediately freezed program.

Expected results:

The calendar should be imported.

Somehow I managed to track down the rule causing the issue. It's for example:
RRULE:FREQ=YEARLY;BYMONTH=9;BYMONTHDAY=15,16,17,18,19,20,21;BYDAY=1MO;UNTIL=19180916T010000Z

The rule is peculiar because it states that we're looking for the first Monday in September between the 15th and 21st of each year until September 16, 1918, at 1:00 AM UTC (Zulu). The latest occurrence of the first Monday can fall on the 7th day of the month, so this rule is incorrect, and evidently, Thunderbird is unable to handle this as an exception.

Changing the rule to something like:
RRULE:FREQ=YEARLY;BYMONTH=9;BYMONTHDAY=15,16,17,18,19,20,21;BYDAY=MO;UNTIL=19180916T010000Z

or even:
RRULE:FREQ=YEARLY;BYMONTH=9;BYMONTHDAY=15,16,17,18,19,20,21;BYDAY=MO;BYSETPOS=1;UNTIL=19180916T010000Z

causes Thunderbird to load the .ics file without any issues.

Now a question to the developers. Should Thunderbird hang on such badly constructed rules or should it handle them as an exception and follow along?

Severity: -- → S2
Flags: needinfo?(leftmostcat)
Keywords: hang

Confirmed that the test case hangs current Daily not just 115.

Status: UNCONFIRMED → NEW
Ever confirmed: true

Any chance you could check this one out, Alice? It's easy to reproduce, just need to open the .ics in a new profile, no accounts necessary.

Flags: needinfo?(alice0775)
Flags: needinfo?(leftmostcat)
Priority: -- → P1

I cannot reproduce the issue with the following steps on Daily119.0a1(20230912060714) Windpws10. Daily119.0a1 seems to be working properly.

Steps:

  1. Start Thunderbird.exe -p
  2. Create a profile and start Tb with the profile
  3. Click on Cancel and Exit Setup
  4. Click on Calendar (Alt+3) on the left side toolbar
  5. Open hamburger menu > Open from file > Calendar...
  6. Choose the .ics file and Open
  7. Operate close tab, open menu

Results:
no problem, working fine.

Am I missing something?

Flags: needinfo?(alice0775)

I have downloaded https://ftp.mozilla.org/pub/thunderbird/nightly/2023/09/2023-09-12-06-07-14-comm-central/thunderbird-119.0a1.en-US.linux-x86_64.tar.bz2 and I have reproduced the problem using the same steps Alice gave. TB hanged for me.

I also installed https://ftp.mozilla.org/pub/thunderbird/nightly/2023/09/2023-09-12-06-07-14-comm-central/thunderbird-119.0a1.en-US.win64.installer.exe on my Windows 10, and TB also hanged (showing as not responding).

In both cases I've used the .ics included with this bug report.

(In reply to Alice0775 White from comment #4)

I cannot reproduce the issue with the following steps on Daily119.0a1(20230912060714) Windpws10. Daily119.0a1 seems to be working properly.

Steps:

  1. Start Thunderbird.exe -p
  2. Create a profile and start Tb with the profile
  3. Click on Cancel and Exit Setup
  4. Click on Calendar (Alt+3) on the left side toolbar
  5. Open hamburger menu > Open from file > Calendar...
  6. Choose the .ics file and Open
  7. Operate close tab, open menu

Results:
no problem, working fine.

Am I missing something?

Okay. if the .ics file is successfully imported with a good build once, the .ics file seems to be silently overwritten with corrected one. --- this may be other bug.

So, set the downloaded .ics file to read-only and ran mozregression again.

Regression window:
https://hg.mozilla.org/comm-central/pushloghtml?fromchange=b4c86c3886e5b2e4eca9590a4d547edbf0b7b767&tochange=fd8f301fa75d61249c3def6ba9e72e87200467eb
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=7ea8042eaf1d0c5f78ccce2e79e3e13f73526c64&tochange=af45dff5621ad96a2d9a05257fc5256ff248e3f6

Suspect:
1f92bc9ddbdae4e3b3091b9ad6b974003d08a401 Sean Burke — Bug 1149470 - import ical.js update with support for embedded ICS time zones. r=darktrojan

Regressed by: 1149470
Assignee: nobody → leftmostcat
Status: NEW → ASSIGNED
Duplicate of this bug: 1849540

Thank you for isolating this to the RRULE in question. It looks like Horde is generating invalid recurrence rules for time zone definitions, resulting in a rule which will never have an occurrence. The iCalendar specification indicates that we MUST ignore these, but we don't detect these instances and instead loop infinitely trying to find an occurrence.

Perhaps this information "[...]VTIMEZONE data incorrectly[...]" https://bugs.horde.org/ticket/13866 , is nice to know.

Duplicate of this bug: 1852824
See Also: → 1852716

Buy the way: Does Thunderbird exchange the value of "organisator" while sync or import ?
Each time (befor TB115) if I accept an event comming from an foreign calendar system, than TB inserted the event into my calendar, creating an accept message, where I becomes the event organizator. (Perhaps the buggy exchange of organisator value is in horde's code - cf https://bugs.horde.org/ticket/13664#c11 - put perhaps not only there.)

(In reply to Robert Hartmann from comment #12)

Buy the way: Does Thunderbird exchange the value of "organisator" while sync or import ?
Each time (befor TB115) if I accept an event comming from an foreign calendar system, than TB inserted the event into my calendar, creating an accept message, where I becomes the event organizator. (Perhaps the buggy exchange of organisator value is in horde's code - cf https://bugs.horde.org/ticket/13664#c11 - put perhaps not only there.)

This is a separate issue. Please file a separate bug with any steps to reproduce and, ideally, ICS files showing the issue.

Pushed by benc@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/cd0530c0d378
Avoid infinite loop for invalid YEARLY recurrence rules. r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED

Comment on attachment 9352979 [details]
Bug 1850732 - Avoid infinite loop for invalid YEARLY recurrence rules. r=#thunderbird-reviewers

[Triage Comment]
Approved for beta

Attachment #9352979 - Flags: approval-comm-beta+
Target Milestone: --- → 119 Branch

All,

If at all possible today or Sunday, please post your results here after testing patches using either:

Flags: needinfo?(zygmanski)
Duplicate of this bug: 1849508
Duplicate of this bug: 1854891
See Also: → 1855540

Comment on attachment 9352979 [details]
Bug 1850732 - Avoid infinite loop for invalid YEARLY recurrence rules. r=#thunderbird-reviewers

[Triage Comment]
approved for esr115

Attachment #9352979 - Flags: approval-comm-esr115+
Regressions: 1855540
See Also: 1855540

Vins, please clarify "Using Thunderbird now becomes impossible since opening it once again results in a immediately freezed program."

You mean that simply opening Thunderbird hangs, and clicking on a message is not required once the even has been added to calendar?
(It is also described in this way in bug 1852824)

Duplicate of this bug: 1855540
No longer regressions: 1855540

(In reply to Wayne Mery (:wsmwk) from comment #21)

Vins, please clarify "Using Thunderbird now becomes impossible since opening it once again results in a immediately freezed program."

You mean that simply opening Thunderbird hangs, and clicking on a message is not required once the even has been added to calendar?
(It is also described in this way in bug 1852824)

Yes, when the calendar with impossible to comply rule was added to TB and then TB hanged and was killed, then another opening of TB was hanging TB immediately as if TB was still trying to add the faulty calendar.

Flags: needinfo?(zygmanski)
Duplicate of this bug: 1852726
No longer duplicate of this bug: 1855540
Duplicate of this bug: 1855540
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: