Bug 834359
Summary: | Lenovo X220 fails to suspend with segfault at upowerd | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Radoslav Husar <rhusar> |
Component: | libimobiledevice | Assignee: | Peter Robinson <pbrobinson> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 17 | CC: | alanh, bnocera, cfergeau, diego.ml, gwync, hughsient, mgress, nadim, pbrobinson, rhughes, wolfram, xiamx2004 |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-10-09 14:38:17 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Radoslav Husar
2012-06-21 16:10:33 UTC
Can you get a backtrace please. Thanks. Not sure if this helps, but this problem doesn't occur on a ThinkPad X230. It appears to be this bug: http://libiphone.lighthouseapp.com/projects/27916/tickets/265-userpref_get_config_dir-segfaults-when-home-is-undefined When an iOS device is connected, upowerd pulls in libimobiledevice. If XDG_CONFIG_HOME is not set in the environment, it tries to copy the value of HOME instead. However, in the systemd environment, HOME is null and strcpy() causes a SEGV. It isn't checking if HOME is null. This isn't specific to the Thinkad; it should happen on any system with an iOS device plugged in. libimobiledevice needs to be updated to correctly handle a null HOME. Here's the backtrace from F17: #0 __stpcpy_chk () at ../sysdeps/x86_64/strcpy_chk.S:71 #1 0x00007f9c643f225c in strcpy (__src=<optimized out>, __dest= 0x7f9c64602600 "") at /usr/include/bits/string3.h:105 #2 userpref_get_config_dir () at userpref.c:128 #3 userpref_get_config_dir () at userpref.c:105 #4 0x00007f9c643f25d4 in userpref_get_host_id (host_id=host_id@entry= 0x7fff05ef3fb0) at userpref.c:406 #5 0x00007f9c643f5c1d in lockdownd_client_new_with_handshake ( device=<optimized out>, client=client@entry=0x7fff05ef4058, label=label@entry=0x41bb5d "upower") at lockdown.c:717 #6 0x0000000000412cbb in up_device_idevice_coldplug (device= 0x11473e0 [UpDeviceIdevice]) at up-device-idevice.c:105 #7 0x000000000040b6ab in up_device_coldplug (device=device@entry= 0x11473e0 [UpDeviceIdevice], daemon=<optimized out>, native=<optimized out>) at up-device.c:548 #8 0x0000000000411861 in up_backend_device_new (native= 0x113b720 [GUdevDevice], backend=0x112e4f0 [UpBackend]) at up-backend.c:128 #9 up_backend_device_add (backend=backend@entry=0x112e4f0 [UpBackend], native= 0x113b720 [GUdevDevice]) at up-backend.c:229 #10 0x00000000004120db in up_backend_coldplug (backend=0x112e4f0 [UpBackend], daemon=daemon@entry=0x1122010 [UpDaemon]) at up-backend.c:324 #11 0x0000000000408e0f in up_daemon_startup (daemon=daemon@entry= 0x1122010 [UpDaemon]) at up-daemon.c:753 #12 0x0000000000406d77 in main (argc=1, argv=0x7fff05ef4408) at up-main.c:289 I previously filed a similar bug which describes the same iPhone issue on a ThinkPad X230: https://bugzilla.redhat.com/show_bug.cgi?id=836399 This is a bug in lockdownd. *** Bug 836399 has been marked as a duplicate of this bug. *** Any ETA for a fix? I'm not sure what lockdownd is and what it has with libimobiledevice tbh (In reply to comment #8) > I'm not sure what lockdownd is and what it has with libimobiledevice tbh It's a library for accessing Apple hardware. The analysis of the problem is correct, the problem is indeed when iOS device is connected. Thanks guys. Is there any walkaround for this? On my laptop. upowerd crashes. I loss battery indication. Also loss the ability to suspend the laptop. Aug 4 22:20:05 THINK-MX upowerd[4739]: (upowerd:4739): UPower-Linux-WARNING **: energy_full (48.190000) is greater than energy_full_design (47.520000) Aug 4 22:20:06 THINK-MX kernel: [ 1671.609524] upowerd[4739]: segfault at 0 ip 0000003d3fb06700 sp 00007fff94d74838 error 4 in libc-2.15.so[3d3fa00000+1ac000] Aug 4 22:20:06 THINK-MX abrtd: Directory 'ccpp-2012-08-04-22:20:06-4739' creation detected Aug 4 22:20:06 THINK-MX abrt[4759]: Saved core dump of pid 4739 (/usr/libexec/upowerd) to /var/spool/abrt/ccpp-2012-08-04-22:20:06-4739 (18333696 bytes) Aug 4 22:20:06 THINK-MX systemd[1]: upower.service: main process exited, code=dumped, status=11 Aug 4 22:20:06 THINK-MX systemd[1]: Unit upower.service entered failed state. Aug 4 22:20:06 THINK-MX abrtd: Duplicate: core backtrace Aug 4 22:20:06 THINK-MX abrtd: DUP_OF_DIR: /var/spool/abrt/ccpp-2012-08-04-21:24:22-867 Aug 4 22:20:06 THINK-MX abrtd: Problem directory is a duplicate of /var/spool/abrt/ccpp-2012-08-04-21:24:22-867 Aug 4 22:20:06 THINK-MX abrtd: Deleting problem directory ccpp-2012-08-04-22:20:06-4739 (dup of ccpp-2012-08-04-21:24:22-867) You can add the HOME environment to the unit file /usr/lib/systemd/system/upower.service: [Unit] Description=Daemon for power management [Service] Type=dbus BusName=org.freedesktop.UPower # ###Workaround, %h is systemd's user's home Environment=HOME=%h ExecStart=/usr/libexec/upowerd [Install] # We pull this in by graphical.target instead of waiting for the bus # activation, to speed things up a little: gdm uses this anyway so it is nice # if it is already around when gdm wants to use it and doesn't have to wait for # it. WantedBy=graphical.target After editing you need to either reboot or run "systemctl --system daemon-reload" and "systemctl start upower.service". Incorporating the upstream fix is the ultimate solution, of course. Alan, With Environment=HOME=%h which I think gives HOME=/root, It causes iphone-set-info to crash due to https://bugzilla.redhat.com/show_bug.cgi?id=733701 Nevertheless, it keeps upowerd from crashing. libimobiledevice-1.1.4-4.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/libimobiledevice-1.1.4-4.fc18 Can we have this update for f17 as well? This bug is against that release, and I'd personally love seeing it fixed there, as I use it. Bastien, will we see this libimobiledevice update for f17? Jon, I took the src.rpm from f18 update and patched f17 rpm by my self. You can try to do this for the moment as it seems the maintainer is currently not available. I may do that short term. Bastien, also, I'm a provenpackager and could do this for you if you'd like asssistance. I did my best to try and compile the package for Fedora 17, but got hit by: http://libiphone.lighthouseapp.com/projects/27916-libiphone/tickets/285-cant-compile-cython-bindings I'd personally nuke the Cython bindings, nothing useful uses them. Changelog says that was disabled in -3, so I'd think -4 should work. I tried this on 17, and it builds and fixes that crash. It exposed a crash in gtkpod, but that's good. I'll commit and build tomorrow unless you object, or approve sooner. libimobiledevice-1.1.4-4.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/libimobiledevice-1.1.4-4.fc17 The new build fixes it for me. Thanks! Package libimobiledevice-1.1.4-4.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing libimobiledevice-1.1.4-4.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-14503/libimobiledevice-1.1.4-4.fc17 then log in and leave karma (feedback). This has been pushed to stable *** Bug 836764 has been marked as a duplicate of this bug. *** |