Bug 1176204

Summary: [abrt] Avoid putenv() in libical
Product: [Fedora] Fedora Reporter: Adam Stein <adam>
Component: libicalAssignee: Robert Scheck <redhat-bugzilla>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: dwmw2, lucilanga, mbarnes, mcrha, rdieter, redhat-bugzilla, tpopela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/ea6105d6eb7f5fcbd4852659b9b27bb7500bee21
Whiteboard: abrt_hash:1d7249d0ed89b7cab0769602b4bbe7977e82c4c1
Fixed In Version: libical-1.0-8.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-07 23:52:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: cgroup
none
File: core_backtrace
none
File: dso_list
none
File: environ
none
File: exploitable
none
File: limits
none
File: maps
none
File: open_fds
none
File: proc_pid_status
none
File: var_log_messages none

Description Adam Stein 2014-12-19 16:44:49 UTC
Description of problem:
Going to calendar.  I'm guessing some appointment it's fetching is causing this to crash.

Version-Release number of selected component:
evolution-3.8.5-2.fc19

Additional info:
reporter:       libreport-2.2.2
backtrace_rating: 4
cmdline:        /usr/bin/evolution
crash_function: icaltimezone_load_builtin_timezone
executable:     /usr/bin/evolution
kernel:         3.14.23-100.fc19.x86_64
runlevel:       N 5
type:           CCpp
uid:            1000

Truncated backtrace:
Thread no. 1 (10 frames)
 #0 icaltimezone_load_builtin_timezone at icaltimezone.c:1766
 #1 icaltimezone_ensure_coverage at icaltimezone.c:462
 #2 icaltimezone_get_utc_offset at icaltimezone.c:818
 #3 icaltimezone_convert_time at icaltimezone.c:773
 #4 icaltime_as_timet_with_zone at icaltime.c:415
 #5 e_cal_model_set_instance_times at e-cal-model.c:4051
 #6 process_added at e-cal-model.c:2762
 #7 process_event at e-cal-model.c:2666
 #8 client_view_objects_added_cb at e-cal-model.c:2938
 #9 g_cclosure_marshal_VOID__POINTERv at gmarshal.c:1236

Potential duplicate: bug 875256

Comment 1 Adam Stein 2014-12-19 16:44:53 UTC
Created attachment 971245 [details]
File: backtrace

Comment 2 Adam Stein 2014-12-19 16:44:54 UTC
Created attachment 971246 [details]
File: cgroup

Comment 3 Adam Stein 2014-12-19 16:44:56 UTC
Created attachment 971247 [details]
File: core_backtrace

Comment 4 Adam Stein 2014-12-19 16:44:57 UTC
Created attachment 971248 [details]
File: dso_list

Comment 5 Adam Stein 2014-12-19 16:44:58 UTC
Created attachment 971249 [details]
File: environ

Comment 6 Adam Stein 2014-12-19 16:44:59 UTC
Created attachment 971250 [details]
File: exploitable

Comment 7 Adam Stein 2014-12-19 16:45:00 UTC
Created attachment 971251 [details]
File: limits

Comment 8 Adam Stein 2014-12-19 16:45:04 UTC
Created attachment 971252 [details]
File: maps

Comment 9 Adam Stein 2014-12-19 16:45:05 UTC
Created attachment 971253 [details]
File: open_fds

Comment 10 Adam Stein 2014-12-19 16:45:06 UTC
Created attachment 971254 [details]
File: proc_pid_status

Comment 11 Adam Stein 2014-12-19 16:45:07 UTC
Created attachment 971255 [details]
File: var_log_messages

Comment 12 Adam Stein 2014-12-19 17:13:59 UTC
I can't tell if this is a duplicate of bug 875256.  In that case, the remote calendar system was LDAP based.  For this bug, the remote calendars are the Google calendars.  Guess it depends on where the bug exactly is.

Comment 13 Milan Crha 2014-12-22 11:36:08 UTC
Thanks for a bug report. As noted in bug #1136778 comment #15, this can be caused by two parts, where one of them is fixed in the most latest evolution-data-server 3.12.9. The other part involves libical itself, to not use putenv() when working with timezones. I'm moving this to libical and I'll use a proposed patch from [1] to fix this issue. The fix itself may change during the time, especially after the libical's upstream review. In any case, the change will be done only for Fedora 21 and rawhide. Fedora 19 may suffer of other issues than the above mentioned.

[1] http://lists.infradead.org/pipermail/libical-devel/2014-November/000630.html

Comment 14 Adam Stein 2014-12-22 12:01:41 UTC
Do you forsee any problems with compiling the patched libical manually on Fedora 19 as a way to get around the problem (since I won't be going to Fedora 21 anytime soon)?

Comment 15 Fedora Update System 2014-12-22 12:02:32 UTC
libical-1.0-8.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/libical-1.0-8.fc21

Comment 16 Milan Crha 2014-12-22 12:05:40 UTC
There is a build for rawhide too, the libical-1.0-8 version as well.

Comment 17 Milan Crha 2014-12-22 13:08:14 UTC
(In reply to Adam Stein from comment #14)
> Do you forsee any problems with compiling the patched libical manually on
> Fedora 19 as a way to get around the problem (since I won't be going to
> Fedora 21 anytime soon)?

I think there might not be an issue, it builds fine at least. Here are scratch (test) builds of evolution-data-server and libical with backported changes. Please report any issue you might find with them. Also note that the scratch builds will be autometically erased from the server after few days. If anything will go wrong then downgrade to previous version (`yum downgrade libical evolution-data-server`). You might restart the computer to be sure that all the background processes will be those from the updated packages.

libical: http://koji.fedoraproject.org/koji/taskinfo?taskID=8458685
eds: http://koji.fedoraproject.org/koji/taskinfo?taskID=8458697

Comment 18 Adam Stein 2014-12-22 18:22:07 UTC
1) Quit evolution
2) Ran 'evolution --force-shutdown' to ensure no components were running
3) Installed scratch packages
4) Restarted evolution

No difference.  Calendar still crashes, everything else looks like it works.  Thanks for the F19 scratch packages anyway.

> sudo yum list libical evolution-data-server
Loaded plugins: auto-update-debuginfo, langpacks, refresh-packagekit
Installed Packages
evolution-data-server.x86_64         3.8.5-7.1.fc19          @/evolution-data-server-3.8.5-7.1.fc19.x86_64
libical.x86_64                       0.48-4.1.fc19           @/libical-0.48-4.1.fc19.x86_64               
Available Packages
evolution-data-server.i686           3.8.5-7.fc19            updates                                      
libical.i686                         0.48-4.fc19             fedora

Comment 19 Fedora Update System 2014-12-23 18:30:45 UTC
Package libical-1.0-8.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libical-1.0-8.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-17526/libical-1.0-8.fc21
then log in and leave karma (feedback).

Comment 20 Adam Stein 2014-12-29 15:01:05 UTC
I'm running fc19.  Would yum show me fc21 packages?  I don't see any at updates-testing, including the libical mentioned above so I'm assuming I can't try it out.

Comment 21 Milan Crha 2015-01-05 11:47:40 UTC
(In reply to Adam Stein from comment #18)
> 1) Quit evolution
> 2) Ran 'evolution --force-shutdown' to ensure no components were running
> 3) Installed scratch packages
> 4) Restarted evolution
> 
> No difference.  Calendar still crashes, everything else looks like it works.
> Thanks for the F19 scratch packages anyway.

The --force-shutdown didn't kill background processes for couple releases, but some later version will do it again. To ensure no evolution related code is running use `ps ax | grep evolution`, but a simpler way is to re-login or restart the machine completely.

(In reply to Adam Stein from comment #20)
> I'm running fc19.  Would yum show me fc21 packages?  I don't see any at
> updates-testing, including the libical mentioned above so I'm assuming I
> can't try it out.

Nope, you cannot use Fedora 21 packages in Fedora 19, due to the dependencies.

Comment 22 Adam Stein 2015-01-05 19:22:59 UTC
On FC19, the new scratch libical you made doesn't do anything (or more accurate to say it doesn't appear to solve my problem).  Made sure no evolution component was running (via ps).  Evolution still crashes when switching to the calendar.  Since I won't be upgrading to FC21 anytime soon, I can't test that.

Comment 23 Milan Crha 2015-01-06 08:07:02 UTC
(In reply to Adam Stein from comment #22)
> Evolution still crashes when switching to the calendar.

I guess it's with the same (or a similar) backtrace as above. It means that the crash is unrelated to the change in libical, which I hoped it is.

There landed too many changes between 3.8.5 and 3.12.9 (current stable in
Fedora 21), to be able to identify the right bug, if any, which would influence your crasher. As you can reproduce this reliably, then maybe a run under valgrind would help to identify the cause of the crash, but again, the 3.8.5 is too old and dead for upstream. If you'd give it a try anyway, then please install debuginfo packages for evolution-data-server and evolution (make sure the version will match the binary package version) and then run evolution under valgrind with this command:
  $ G_SLICE=always-malloc valgring --num-callers=20 evolution -c mail &>log.txt
It will run evolution and will log about any spot memory issues. The evolution will be very slow and CPU expensive, due to all the memory checking, but once it'll settle, please switch from the Mail view to the Calendar view. Even if it'll not crash, then the valgrind may log about the issue. It's due to valgrind being able to recognize certain memory issues and prevent the crash.

Comment 24 Adam Stein 2015-01-07 11:29:58 UTC
Thanks for the information.  As you mentioned, the FC19 evolution is too old, so there's no point in continuing.  I'll upgrade to FC21 sometime this year when I have some time.

Comment 25 Fedora Update System 2015-01-07 23:52:32 UTC
libical-1.0-8.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 26 Milan Crha 2015-02-09 17:26:47 UTC
*** Bug 973755 has been marked as a duplicate of this bug. ***