Closed Bug 1916063 Opened 1 year ago Closed 7 months ago

128.1.0 global indexing hung: TypeError: exc.startDate is null calInvitationUtils.sys.mjs:484:11, and messages not being indexed

Categories

(Calendar :: General, defect, P1)

Thunderbird 131

Tracking

(thunderbird_esr128+ fixed, thunderbird132 wontfix, thunderbird136 wontfix, thunderbird137 wontfix)

RESOLVED FIXED
138 Branch
Tracking Status
thunderbird_esr128 + fixed
thunderbird132 --- wontfix
thunderbird136 --- wontfix
thunderbird137 --- wontfix

People

(Reporter: jonah, Assigned: mkmelin)

References

(Blocks 1 open bug)

Details

(Whiteboard: [datalossy])

Attachments

(2 files)

Steps to reproduce:

Launched thunderbird, observed indexing progress in the activity viewer.

TypeError: exc.startDate is null calInvitationUtils.sys.mjs:484:11
updateInvitationOverlay resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:484
setField resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:380
updateInvitationOverlay resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:460
createInvitationOverlay resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:292
convertToHTML resource:///modules/CalMimeConverter.sys.mjs:59

Occurs on Linux 130.0b3 (64-bit) beta build, as well as Linux flatpak 128.1.0esr.

Actual results:

Indexing always hangs part way through my sent mail folder. The error message in the console is:

TypeError: exc.startDate is null calInvitationUtils.sys.mjs:484:11
updateInvitationOverlay resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:484
setField resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:380
updateInvitationOverlay resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:460
createInvitationOverlay resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:292
convertToHTML resource:///modules/CalMimeConverter.sys.mjs:59

Expected results:

Indexing should always complete.

Same issue still present in 131.0b6 (64-bit). Global index is totally hosed, with no way to recover. I don't know which message is causing the issue, so I am really stuck here.

OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Version: Thunderbird 130 → Thunderbird 131

The issue is that you've got some invalid calendar data (in some email), that we don't handle properly.
According to RFC 5545, Section 3, DTSTART is required, but we don't seem to enforce that.

Correction, DTSTART is OPTIONAL when METHOD is specified.

Thanks for the info! I am not surprised that there's some non-conforming calendar data in my email folders, which date back more than 15 years. Fixing the parser seems like a good idea, but the larger issue is that the entirety of global indexing halts and never recovers.

It seems that the larger issue is that global indexing is not robust against an exception being thrown during indexing of even a single message. Does that make sense?

Assignee: nobody → mkmelin+mozilla
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
OS: Linux → All
Hardware: x86_64 → All
Target Milestone: --- → 133 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/5d683c29e8f4
Don't break calendar data handling for missing start date. r=john.bieling

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED

Comment on attachment 9429004 [details]
Bug 1916063 - Don't break calendar data handling for missing start date. r=#thunderbird-reviewers

[Approval Request Comment]
Regression caused by (bug #): never worked per se, but the way it's used now seem to break gloda indexing and likely affecting other unusual/invalid data processing cases.
User impact if declined: gloda indexing may break
Testing completed (on c-c, etc.): c-c
Risk to taking this patch (and alternatives if risky): fairly safe but some beta baking would good

Attachment #9429004 - Flags: approval-comm-esr128?
Attachment #9429004 - Flags: approval-comm-beta?

Comment on attachment 9429004 [details]
Bug 1916063 - Don't break calendar data handling for missing start date. r=#thunderbird-reviewers

[Triage Comment]
Approved for beta

Attachment #9429004 - Flags: approval-comm-beta? → approval-comm-beta+

Unfortunately this does not seem to be fixed in 132.0b6. Indexing still hangs at the same spot. However, I can't see the error message because the dev tools are now non-functional: selecting the menu item does nothing as far as i can tell.

Dunno about that. But try starting with thunderbird.exe -p -jsconsole

Thanks, that lets me see the error now. Still no word from the logging about what message is causing the problem, but global indexing completely hangs again with:

TypeError: val is null
CalDateTime.sys.mjs:146:13
    compare resource:///modules/CalDateTime.sys.mjs:146
    dateComptor resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:458
    binarySearchInternal resource:///modules/calendar/utils/calDataUtils.sys.mjs:189
    binarySearch resource:///modules/calendar/utils/calDataUtils.sys.mjs:210
    binaryInsert resource:///modules/calendar/utils/calDataUtils.sys.mjs:265
    updateInvitationOverlay resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:488
    setField resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:380
    updateInvitationOverlay resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:460
    createInvitationOverlay resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:292
    convertToHTML resource:///modules/CalMimeConverter.sys.mjs:59
NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: [JavaScript Error: "val is null" {file: "resource:///modules/CalDateTime.sys.mjs" line: 146}]'[JavaScript Error: "val is null" {file: "resource:///modules/CalDateTime.sys.mjs" line: 146}]' when calling method: [calIDateTime::compare] calInvitationUtils.sys.mjs:458
    dateComptor resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:458
    binarySearchInternal resource:///modules/calendar/utils/calDataUtils.sys.mjs:189
    binarySearch resource:///modules/calendar/utils/calDataUtils.sys.mjs:210
    binaryInsert resource:///modules/calendar/utils/calDataUtils.sys.mjs:265
    updateInvitationOverlay resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:488
    setField resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:380
    updateInvitationOverlay resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:460
    createInvitationOverlay resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:292
    convertToHTML resource:///modules/CalMimeConverter.sys.mjs:59
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Hi, any idea about the above? Still seems to me that the existence of any user data which breaks gloda is a very serious bug indeed. A third party should not be able to break my index just by sending me an email.

Status: REOPENED → ASSIGNED
Summary: global indexing hung: TypeError: exc.startDate is null calInvitationUtils.sys.mjs:484:11 → global indexing hung: TypeError: exc.startDate is null calInvitationUtils.sys.mjs:484:11, and messages not being indexed
Whiteboard: [datalossy]
See Also: → 1919400

Comment on attachment 9429004 [details]
Bug 1916063 - Don't break calendar data handling for missing start date. r=#thunderbird-reviewers

It seems we should hold off on uplifting to 128 for now. Please let me know otherwise.

Attachment #9429004 - Flags: approval-comm-esr128?

Still present in 136 b1.

What next?

Flags: needinfo?(mkmelin+mozilla)
See Also: → 1952669
Blocks: 1952669

We should formally elevate this, in order to make progress against the large number of bug reports I just tagged to bug 541349.

Severity: -- → S3
Priority: -- → P1
Summary: global indexing hung: TypeError: exc.startDate is null calInvitationUtils.sys.mjs:484:11, and messages not being indexed → 128.1.0 global indexing hung: TypeError: exc.startDate is null calInvitationUtils.sys.mjs:484:11, and messages not being indexed

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

What next?

Magnus has mentioned he has another piece to go.

Flags: needinfo?(mkmelin+mozilla)

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/2f91b7eacdf0
Handle exc.startDate null gracefully. r=tobyp

Status: ASSIGNED → RESOLVED
Closed: 1 year ago7 months ago
Resolution: --- → FIXED

Comment on attachment 9472687 [details]
Bug 1916063 - Handle exc.startDate null gracefully. r=#thunderbird-reviewers

Uplift Approval Request

  • Please state case for uplift consideration and ensure bug severity is set: Causing issue for users
  • User impact if declined: May get stuck indexing
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Daily?: No
  • Has the fix been verified in Beta?: Yes
  • Needs manual test from QA?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): If's bascially nullchecking the data a bit
  • String changes made/needed: none
Attachment #9472687 - Flags: approval-comm-beta?

Comment on attachment 9472687 [details]
Bug 1916063 - Handle exc.startDate null gracefully. r=#thunderbird-reviewers

Is already on 138beta

Attachment #9472687 - Flags: approval-comm-beta?

Woo hoo! On 1.38b1 I was able to index my mail for the first time in a year plus. Thank you!

Comment on attachment 9472687 [details]
Bug 1916063 - Handle exc.startDate null gracefully. r=#thunderbird-reviewers

Uplift Approval Request

  • Please state case for uplift consideration and ensure bug severity is set: (Both patches)
    Causes annoying indexing issue if you have appropriately unexpected event data
  • User impact if declined: Indexing failure
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Daily?: Yes
  • Has the fix been verified in Beta?: Yes
  • Needs manual test from QA?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): It's handling cases that would blow up otherwise
  • String changes made/needed: none
Attachment #9472687 - Flags: approval-comm-esr128?

Comment on attachment 9429004 [details]
Bug 1916063 - Don't break calendar data handling for missing start date. r=#thunderbird-reviewers

[Triage Comment]
Approved for release
Approved for esr128

Attachment #9429004 - Flags: approval-comm-release+
Attachment #9429004 - Flags: approval-comm-esr128+

Comment on attachment 9472687 [details]
Bug 1916063 - Handle exc.startDate null gracefully. r=#thunderbird-reviewers

[Triage Comment]
Approved for release
Approved for esr128

Attachment #9472687 - Flags: approval-comm-release+
Attachment #9472687 - Flags: approval-comm-esr128?
Attachment #9472687 - Flags: approval-comm-esr128+
See Also: → 1952259

Changed some tracking flags to reflect the follow-up patch from comment 21 that fixed bug 1919400.

Blocks: 1919400
No longer blocks: 1952669
Target Milestone: 138 Branch → 133 Branch
Target Milestone: 133 Branch → 138 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: