Closed Bug 467652 Opened 11 years ago Closed 11 years ago

Reproducible hang when retrieving remote ICS calendar

Categories

(Calendar :: General, defect, critical)

Lightning 0.9
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mozilla, Assigned: dbo)

Details

(Whiteboard: [libical-upstream?])

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.4) Gecko/2008111317 Ubuntu/8.04 (hardy) Firefox/3.0.4
Build Identifier: https://addons.mozilla.org/en-US/thunderbird/downloads/file/38053/lightning-0.9-tb-linux.xpi

I published a calendar from gpe-calendar as an ICS file.  As soon as i configure this as a remote calendar in either Lightning or Sunbird, the application hangs, and will not restart.  I am unable to get Thunderbird working at all without disabling Lightning.  I've tested the data and found that any calendar created with gpe-calendar which contains an alarm will cause the hang.  Alarm section from the .ics file is shown in additional info below.

Reproducible: Always

Steps to Reproduce:
1. Configure my calendar URL
2. Enter authentication
3. Thunderbird/Sunbird hangs
Actual Results:  
Application hangs using all of 1 CPU core.  Last part of strace shown in additional info below.

Expected Results:  
No hang.
Correctly display entries from the remote calendar.

Sample vevent including valarm that causes problems:

BEGIN:VEVENT
SUMMARY:milk
DTEND:20080420T103001Z
DTSTART:20080420T103000Z
UID:1208679838.1295879838801@Nokia-N800-50-2
DTSTAMP:20081202T210239Z
LAST-MODIFIED:20080420T082424Z

BEGIN:VALARM
ACTION:DISPLAY
TRIGGER:-PT0H1M
END:VALARM
END:VEVENT

last part of strace:

gettimeofday({1228258119, 402929}, NULL) = 0
futex(0x8087428, 0x85 /* FUTEX_??? */, 1) = 1
gettimeofday({1228258119, 412139}, NULL) = 0
gettimeofday({1228258119, 420449}, NULL) = 0
gettimeofday({1228258119, 433333}, NULL) = 0
gettimeofday({1228258119, 442848}, NULL) = 0
gettimeofday({1228258119, 450892}, NULL) = 0
gettimeofday({1228258119, 464107}, NULL) = 0
gettimeofday({1228258119, 473462}, NULL) = 0
gettimeofday({1228258119, 483429}, NULL) = 0
gettimeofday({1228258119, 495942}, NULL) = 0
gettimeofday({1228258119, 503976}, NULL) = 0
gettimeofday({1228258119, 516868}, NULL) = 0
gettimeofday({1228258119, 528282}, NULL) = 0
gettimeofday({1228258119, 537156}, NULL) = 0
gettimeofday({1228258119, 549728}, NULL) = 0
gettimeofday({1228258119, 561535}, NULL) = 0
gettimeofday({1228258119, 570586}, NULL) = 0
gettimeofday({1228258119, 582433}, NULL) = 0
gettimeofday({1228258119, 594703}, NULL) = 0
gettimeofday({1228258119, 603608}, NULL) = 0
gettimeofday({1228258119, 616081}, NULL) = 0
gettimeofday({1228258119, 628161}, NULL) = 0
gettimeofday({1228258119, 637136}, NULL) = 0
access("/home/angela/.mozilla-thunderbird/02tw763t.default/storage.sdb-journal", F_OK) = -1 ENOENT (No such file or directory)
fstat64(12, {st_mode=S_IFREG|0644, st_size=183296, ...}) = 0
fstat64(12, {st_mode=S_IFREG|0644, st_size=183296, ...}) = 0
_llseek(12, 0, [0], SEEK_SET)           = 0
read(12, "SQLite format 3\0\4\0\1\1\0@  \0\0\25\363\0\0\0\0"..., 1024) = 1024
fstat64(12, {st_mode=S_IFREG|0644, st_size=183296, ...}) = 0
_llseek(12, 79872, [79872], SEEK_SET)   = 0
read(12, "\r\0\0\0\3\1I\0\3\231\2h\1I\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1024) = 1024
gettimeofday({1228258119, 708286}, NULL) = 0
gettimeofday({1228258119, 709364}, NULL) = 0
gettimeofday({1228258119, 710102}, NULL) = 0
gettimeofday({1228258119, 711130}, NULL) = 0
gettimeofday({1228258119, 711877}, NULL) = 0
gettimeofday({1228258119, 712922}, NULL) = 0
gettimeofday({1228258119, 713653}, NULL) = 0
gettimeofday({1228258119, 714671}, NULL) = 0
gettimeofday({1228258119, 715400}, NULL) = 0
gettimeofday({1228258119, 716439}, NULL) = 0
gettimeofday({1228258119, 717171}, NULL) = 0
gettimeofday({1228258119, 720524}, NULL) = 0
gettimeofday({1228258119, 721655}, NULL) = 0
gettimeofday({1228258119, 722713}, NULL) = 0
gettimeofday({1228258119, 723457}, NULL) = 0
gettimeofday({1228258119, 724509}, NULL) = 0
gettimeofday({1228258119, 725249}, NULL) = 0
gettimeofday({1228258119, 726284}, NULL) = 0
gettimeofday({1228258119, 727033}, NULL) = 0
gettimeofday({1228258119, 728077}, NULL) = 0
gettimeofday({1228258119, 728816}, NULL) = 0
gettimeofday({1228258119, 729831}, NULL) = 0
gettimeofday({1228258119, 730557}, NULL) = 0
gettimeofday({1228258119, 731574}, NULL) = 0
gettimeofday({1228258119, 736242}, NULL) = 0
gettimeofday({1228258119, 738209}, NULL) = 0
gettimeofday({1228258119, 739614}, NULL) = 0
gettimeofday({1228258119, 741129}, NULL) = 0
gettimeofday({1228258119, 742047}, NULL) = 0
gettimeofday({1228258119, 743287}, NULL) = 0
gettimeofday({1228258119, 744636}, NULL) = 0
gettimeofday({1228258119, 745846}, NULL) = 0
gettimeofday({1228258119, 746746}, NULL) = 0
gettimeofday({1228258119, 747978}, NULL) = 0
gettimeofday({1228258119, 748900}, NULL) = 0
gettimeofday({1228258119, 750125}, NULL) = 0
gettimeofday({1228258119, 751019}, NULL) = 0
gettimeofday({1228258119, 752275}, NULL) = 0
gettimeofday({1228258119, 753191}, NULL) = 0
gettimeofday({1228258119, 754439}, NULL) = 0
gettimeofday({1228258119, 755293}, NULL) = 0
gettimeofday({1228258119, 756826}, NULL) = 0
gettimeofday({1228258119, 758258}, NULL) = 0
gettimeofday({1228258119, 760190}, NULL) = 0
gettimeofday({1228258119, 761669}, NULL) = 0
gettimeofday({1228258119, 763548}, NULL) = 0
gettimeofday({1228258119, 764851}, NULL) = 0
gettimeofday({1228258119, 766050}, NULL) = 0
gettimeofday({1228258119, 766820}, NULL) = 0
gettimeofday({1228258119, 768036}, NULL) = 0
gettimeofday({1228258119, 768971}, NULL) = 0
gettimeofday({1228258119, 770271}, NULL) = 0
gettimeofday({1228258119, 771312}, NULL) = 0
gettimeofday({1228258119, 772974}, NULL) = 0
gettimeofday({1228258119, 774201}, NULL) = 0
gettimeofday({1228258119, 775800}, NULL) = 0
gettimeofday({1228258119, 777024}, NULL) = 0
gettimeofday({1228258119, 778444}, NULL) = 0
gettimeofday({1228258119, 779216}, NULL) = 0
gettimeofday({1228258119, 780318}, NULL) = 0
gettimeofday({1228258119, 781069}, NULL) = 0
gettimeofday({1228258119, 782133}, NULL) = 0
gettimeofday({1228258119, 782886}, NULL) = 0
gettimeofday({1228258119, 783976}, NULL) = 0
gettimeofday({1228258119, 784771}, NULL) = 0
gettimeofday({1228258119, 785851}, NULL) = 0
gettimeofday({1228258119, 786620}, NULL) = 0
gettimeofday({1228258119, 787711}, NULL) = 0
gettimeofday({1228258119, 788500}, NULL) = 0
gettimeofday({1228258119, 789583}, NULL) = 0
gettimeofday({1228258119, 790338}, NULL) = 0
gettimeofday({1228258119, 791409}, NULL) = 0
gettimeofday({1228258119, 792195}, NULL) = 0
gettimeofday({1228258119, 793420}, NULL) = 0
gettimeofday({1228258119, 794798}, NULL) = 0
gettimeofday({1228258119, 796747}, NULL) = 0
gettimeofday({1228258119, 797523}, NULL) = 0
gettimeofday({1228258119, 798731}, NULL) = 0
gettimeofday({1228258119, 799654}, NULL) = 0
gettimeofday({1228258119, 801079}, NULL) = 0
gettimeofday({1228258119, 802553}, NULL) = 0
gettimeofday({1228258119, 804554}, NULL) = 0
gettimeofday({1228258119, 805868}, NULL) = 0
gettimeofday({1228258119, 807104}, NULL) = 0
gettimeofday({1228258119, 808149}, NULL) = 0
gettimeofday({1228258119, 809882}, NULL) = 0
gettimeofday({1228258119, 811056}, NULL) = 0
gettimeofday({1228258119, 812637}, NULL) = 0
gettimeofday({1228258119, 813748}, NULL) = 0
gettimeofday({1228258119, 815143}, NULL) = 0
gettimeofday({1228258119, 815958}, NULL) = 0
gettimeofday({1228258119, 817073}, NULL) = 0
gettimeofday({1228258119, 817816}, NULL) = 0
gettimeofday({1228258119, 818898}, NULL) = 0
gettimeofday({1228258119, 819666}, NULL) = 0
gettimeofday({1228258119, 820793}, NULL) = 0
gettimeofday({1228258119, 821567}, NULL) = 0
gettimeofday({1228258119, 822659}, NULL) = 0
gettimeofday({1228258119, 823452}, NULL) = 0
gettimeofday({1228258119, 824562}, NULL) = 0
gettimeofday({1228258119, 825314}, NULL) = 0
gettimeofday({1228258119, 826431}, NULL) = 0
gettimeofday({1228258119, 827203}, NULL) = 0
gettimeofday({1228258119, 828441}, NULL) = 0
gettimeofday({1228258119, 829364}, NULL) = 0
gettimeofday({1228258119, 830758}, NULL) = 0
gettimeofday({1228258119, 831834}, NULL) = 0
gettimeofday({1228258119, 833315}, NULL) = 0
gettimeofday({1228258119, 834243}, NULL) = 0
gettimeofday({1228258119, 835470}, NULL) = 0
gettimeofday({1228258119, 836622}, NULL) = 0
gettimeofday({1228258119, 838907}, NULL) = 0
gettimeofday({1228258119, 840792}, NULL) = 0
gettimeofday({1228258119, 843119}, NULL) = 0
gettimeofday({1228258119, 844612}, NULL) = 0
gettimeofday({1228258119, 846003}, NULL) = 0
gettimeofday({1228258119, 847148}, NULL) = 0
gettimeofday({1228258119, 848760}, NULL) = 0
gettimeofday({1228258119, 849930}, NULL) = 0
gettimeofday({1228258119, 851519}, NULL) = 0
gettimeofday({1228258119, 852700}, NULL) = 0
gettimeofday({1228258119, 853875}, NULL) = 0
gettimeofday({1228258119, 854647}, NULL) = 0
gettimeofday({1228258119, 855761}, NULL) = 0
gettimeofday({1228258119, 856574}, NULL) = 0
gettimeofday({1228258119, 857789}, NULL) = 0
gettimeofday({1228258119, 858690}, NULL) = 0
gettimeofday({1228258119, 859965}, NULL) = 0
gettimeofday({1228258119, 860751}, NULL) = 0
gettimeofday({1228258119, 861833}, NULL) = 0
gettimeofday({1228258119, 862603}, NULL) = 0
gettimeofday({1228258119, 863691}, NULL) = 0
gettimeofday({1228258119, 864477}, NULL) = 0
gettimeofday({1228258119, 865554}, NULL) = 0
gettimeofday({1228258119, 866317}, NULL) = 0
gettimeofday({1228258119, 867402}, NULL) = 0
gettimeofday({1228258119, 868180}, NULL) = 0
gettimeofday({1228258119, 869261}, NULL) = 0
gettimeofday({1228258119, 870016}, NULL) = 0
gettimeofday({1228258119, 871086}, NULL) = 0
gettimeofday({1228258119, 871843}, NULL) = 0
gettimeofday({1228258119, 873457}, NULL) = 0
gettimeofday({1228258119, 874855}, NULL) = 0
gettimeofday({1228258119, 876812}, NULL) = 0
gettimeofday({1228258119, 878161}, NULL) = 0
gettimeofday({1228258119, 879813}, NULL) = 0
gettimeofday({1228258119, 881271}, NULL) = 0
gettimeofday({1228258119, 882660}, NULL) = 0
gettimeofday({1228258119, 883520}, NULL) = 0
gettimeofday({1228258119, 885046}, NULL) = 0
gettimeofday({1228258119, 885895}, NULL) = 0
gettimeofday({1228258119, 887111}, NULL) = 0
gettimeofday({1228258119, 888054}, NULL) = 0
gettimeofday({1228258119, 889372}, NULL) = 0
gettimeofday({1228258119, 890533}, NULL) = 0
gettimeofday({1228258119, 892077}, NULL) = 0
gettimeofday({1228258119, 893183}, NULL) = 0
gettimeofday({1228258119, 894676}, NULL) = 0
gettimeofday({1228258119, 895510}, NULL) = 0
gettimeofday({1228258119, 896611}, NULL) = 0
gettimeofday({1228258119, 897373}, NULL) = 0
gettimeofday({1228258119, 898445}, NULL) = 0
gettimeofday({1228258119, 899192}, NULL) = 0
gettimeofday({1228258119, 900332}, NULL) = 0
gettimeofday({1228258119, 901088}, NULL) = 0
gettimeofday({1228258119, 902175}, NULL) = 0
gettimeofday({1228258119, 902986}, NULL) = 0
gettimeofday({1228258119, 904074}, NULL) = 0
gettimeofday({1228258119, 904836}, NULL) = 0
gettimeofday({1228258119, 905919}, NULL) = 0
gettimeofday({1228258119, 906662}, NULL) = 0
gettimeofday({1228258119, 907751}, NULL) = 0
gettimeofday({1228258119, 908534}, NULL) = 0
gettimeofday({1228258119, 909600}, NULL) = 0
gettimeofday({1228258119, 910709}, NULL) = 0
gettimeofday({1228258119, 912644}, NULL) = 0
gettimeofday({1228258119, 914025}, NULL) = 0
gettimeofday({1228258119, 915561}, NULL) = 0
gettimeofday({1228258119, 916456}, NULL) = 0
gettimeofday({1228258119, 917663}, NULL) = 0
gettimeofday({1228258119, 918557}, NULL) = 0
gettimeofday({1228258119, 920408}, NULL) = 0
gettimeofday({1228258119, 921876}, NULL) = 0
gettimeofday({1228258119, 923272}, NULL) = 0
gettimeofday({1228258119, 924178}, NULL) = 0
gettimeofday({1228258119, 925740}, NULL) = 0
gettimeofday({1228258119, 926906}, NULL) = 0
gettimeofday({1228258119, 928650}, NULL) = 0
gettimeofday({1228258119, 929820}, NULL) = 0
gettimeofday({1228258119, 931217}, NULL) = 0
gettimeofday({1228258119, 931998}, NULL) = 0
gettimeofday({1228258119, 933092}, NULL) = 0
gettimeofday({1228258119, 933869}, NULL) = 0
gettimeofday({1228258119, 934956}, NULL) = 0
gettimeofday({1228258119, 935723}, NULL) = 0
gettimeofday({1228258119, 936845}, NULL) = 0
gettimeofday({1228258119, 937599}, NULL) = 0
gettimeofday({1228258119, 938691}, NULL) = 0
gettimeofday({1228258119, 939459}, NULL) = 0
gettimeofday({1228258119, 940572}, NULL) = 0
gettimeofday({1228258119, 941338}, NULL) = 0
gettimeofday({1228258119, 942419}, NULL) = 0
gettimeofday({1228258119, 943191}, NULL) = 0
gettimeofday({1228258119, 944328}, NULL) = 0
gettimeofday({1228258119, 945108}, NULL) = 0
gettimeofday({1228258119, 946301}, NULL) = 0
gettimeofday({1228258119, 947224}, NULL) = 0
gettimeofday({1228258119, 948491}, NULL) = 0
gettimeofday({1228258119, 949235}, NULL) = 0
gettimeofday({1228258119, 950864}, NULL) = 0
gettimeofday({1228258119, 952648}, NULL) = 0
gettimeofday({1228258119, 954645}, NULL) = 0
gettimeofday({1228258119, 956131}, NULL) = 0
gettimeofday({1228258119, 957908}, NULL) = 0
gettimeofday({1228258119, 958978}, NULL) = 0
gettimeofday({1228258119, 960422}, NULL) = 0
gettimeofday({1228258119, 961575}, NULL) = 0
gettimeofday({1228258119, 963123}, NULL) = 0
gettimeofday({1228258119, 964285}, NULL) = 0
gettimeofday({1228258119, 965820}, NULL) = 0
gettimeofday({1228258119, 966900}, NULL) = 0
gettimeofday({1228258119, 968041}, NULL) = 0
gettimeofday({1228258119, 968802}, NULL) = 0
gettimeofday({1228258119, 969892}, NULL) = 0
gettimeofday({1228258119, 970644}, NULL) = 0
gettimeofday({1228258119, 971781}, NULL) = 0
brk(0x9d61000)                          = 0x9d61000
brk(0x9d82000)                          = 0x9d82000
brk(0x9da5000)                          = 0x9da5000
brk(0x9dc6000)                          = 0x9dc6000
gettimeofday({1228258121, 992664}, NULL) = 0
brk(0x9ded000)                          = 0x9ded000
gettimeofday({1228258123, 827222}, NULL) = 0
brk(0x9e0f000)                          = 0x9e0f000
gettimeofday({1228258125, 833140}, NULL) = 0
gettimeofday({1228258127, 807579}, NULL) = 0
gettimeofday({1228258129, 800834}, NULL) = 0
gettimeofday({1228258131, 608697}, NULL) = 0
gettimeofday({1228258133, 421854}, NULL) = 0
gettimeofday({1228258135, 220745}, NULL) = 0
gettimeofday({1228258137, 114559}, NULL) = 0
gettimeofday({1228258139, 223106}, NULL) = 0
gettimeofday({1228258141, 176671}, NULL) = 0
gettimeofday({1228258143, 172}, NULL)   = 0
gettimeofday({1228258144, 807125}, NULL) = 0
gettimeofday({1228258146, 762419}, NULL) = 0
gettimeofday({1228258148, 629728}, NULL) = 0
Version: unspecified → Lightning 0.9
Please attach a complete testcase ics file that can be used to reproduce the issue.
This one hangs when i retrieve it via http from my server (authentication required).  Works on Thunderbird 2.0.0.18 with Lightning 0.9 or with Sunbird 0.7+nobinonly-0ubuntu2 on Ubuntu hardy (8.04).
This one (created from the same gpe-calendar instance on my Nokia N800) does not crash Thunderbird/Lightning or Sunbird.
There you have it, folks.  Hopefully the difference between the working & non-working files will help you narrow it down.  Please note that the original suspicion i had about it being the alarm causing the problem is not right.  Please disregard my comments about that in the initial bug description.

Please also note that i have no idea whether either of these files are really valid ICS.  They were generated by gpe-calendar on my Nokia N800.
Comment on attachment 351141 [details]
Test ICS file which hangs sunbird

Testcase fails validation <http://severinghaus.org/projects/icv/>:

Sorry, your calendar could not be parsed.
Error: Error was: Error at line 64: For input string: "(NUL"
Cause: Caused by: For input string: "(NUL"

61:  DTEND:20080623T070001Z
62:  DTSTART:20080622T230000Z
63:  UID:1212450160.13851743790335@Nokia-N800-51-3
64:  RRULE:FREQ=DAILY;BYDAY=(NULL)
65:  DTSTAMP:20081202T210239Z
66:  LAST-MODIFIED:20080602T234255Z
67:  END:VEVENT
Presumably this needs to be reported as a bug in either GPE or the underlying library (whatever produces the 'PRODID:-//GNOME//NONSGML MIME Directory Library 0.4.2//EN'), but it still shouldn't hang Lightning/Sunbird, right?  How can i remove this calendar entry from Lightning without killing all the local calendars?
Attached patch fix - v1Splinter Review
Right, hanging is not what we want here. This patch filters out invalid by-day parts. I am not sure whether this is the optimal libical fix, but it works well for me on the given file.
Assignee: nobody → daniel.boelzle
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #351894 - Flags: review?(philipp)
Comment on attachment 351894 [details] [diff] [review]
fix - v1

r=philipp
Attachment #351894 - Flags: review?(philipp) → review+
OS: Linux → All
Hardware: x86 → All
Whiteboard: [libical-upstream?]
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/f913fff0f7ba>

-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.0
Just a question - is an updated lightning .xpi file available that i can install?  I'd really like to get this problem fixed so i can share calendars.
(In reply to comment #10)
Only as a Lightning 1.0pre test build that works only with Thunderbird 3.0b2pre.

As long as gpe-calendar (?) produces such invalid files you need to manually fix the iCalendar file to avoid possible errors in other calendar applications, e.g. using a text editor.
Target Milestone: 1.0 → 1.0b1
You need to log in before you can comment on or make changes to this bug.