Bug 674702 - 100% CPU after disconnect of ipod touch
Summary: 100% CPU after disconnect of ipod touch
Alias: None
Product: Fedora
Classification: Fedora
Component: libgpod
Version: 14
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Bastien Nocera
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2011-02-02 23:44 UTC by Wade Hampton
Modified: 2012-08-16 12:23 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2012-08-16 12:23:08 UTC
Type: ---

Attachments (Terms of Use)
iDevice SSL write fix (777 bytes, patch)
2012-01-07 19:49 UTC, Geoffrey Paul
no flags Details | Diff

Description Wade Hampton 2011-02-02 23:44:14 UTC
Description of problem:

Plug in ipod touch to one of several Fedora 14 i386 netbooks.
Unmount and then unplug.  The program  iphone-set-info and 
upowerd are trying trying to use all my CPU.

Version-Release number of selected component (if applicable):


How reproducible:

Each time I disconnect, these programs try to use all CPU.

Steps to Reproduce:
1.  Plug in ipod touch
2.  Let Linux mount it
3.  After a few minutes, click to unmount
4.  When unmounted, disconnect -- iphone-set-info uses 100% of CPU
Actual results:

18241 root      18  -2  9720  912  832 R 98.1  0.1   3072:09 iphone-set-info    
18682 root      20   0 23976 7020 3404 R 96.1  0.7   1679:48 upowerd            

Expected results:

Additional info:

Comment 1 Brian Lane 2011-05-13 18:00:18 UTC
I am having similar problems with an iPhone 3g (which doesn't get mounted). The upower applet thinks I have 2 phones plugged in and is chewing up 80-90% of cpu.

Comment 2 Geoffrey Paul 2012-01-07 19:49:24 UTC
Created attachment 551381 [details]
iDevice SSL write fix

I encountered the same issue with the Katya release of Linux Mint. After trudging through the debug symbols, I was able to narrow the problem down to libimobiledevice(idevice.o). As it turns out, the internal_ssl_write function (a callback function within libimobiledevice used by libgnutls to send encrypted data) does not perform proper error checking, so instead of returning an error code after the connection closes, it returns 0 bytes sent. The calling function in libgnutls then gets stuck in an infinite loop trying to send data that never gets sent.

I have attached the patch I developed on top of libimobiledevice-1.1.0. It does not resolve any underlying issues leading to the error code, but it should prevent iphone-set-info and upowerd from taking over the processor.

I hope this helps!

Comment 3 Geoffrey Paul 2012-01-13 15:56:32 UTC
Just wanted to let everyone know that as of 11 Jan 2012, the libimobiledevice developers have integrated my patch into their master development branch. I don't know how long this will take to filter down to the various distributions, so if you can't wait, you can obtain the source code (via git) from their repository: <git://git.sukimashita.com/libimobiledevice.git>.

Comment 4 Fedora End Of Life 2012-08-16 12:23:11 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 

Note You need to log in before you can comment on or make changes to this bug.