When USB-serial adaptor is removed, minicom takes 100% of CPU

Bug #111021 reported by Theo Markettos
6
Affects Status Importance Assigned to Milestone
minicom
Unknown
Unknown
minicom (Ubuntu)
Fix Released
Medium
Michal Ingeli

Bug Description

Binary package hint: minicom

I'm using a USB-RS232 adaptor with the mct_u232 driver, which provides /dev/ttyUSB0. If minicom is attached to this serial device when the adaptor is removed, minicom's CPU load goes up to 100% and stays there until it is killed or quit.. The same happens if the machine is suspended to disc with minicom running and while suspended the adaptor is removed. On reawakening minicom takes 100% of CPU. It still responds to commands, and when a menu is displayed the CPU becomes idle, returning to 100% load when the menu is closed.

USB device is this:

T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 6 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=16 #Cfgs= 1
P: Vendor=050d ProdID=0109 Rev= 1.02
S: Manufacturer=Belkin USB PDA Adapter
S: Product=Belkin Components
S: SerialNumber=224663
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=mct_u232
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=2ms
E: Ad=82(I) Atr=03(Int.) MxPS= 64 Ivl=1ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 16 Ivl=0ms

Revision history for this message
Michal Ingeli (xyzz) wrote :
Changed in minicom:
status: New → Confirmed
Revision history for this message
Michal Ingeli (xyzz) wrote :

With patch from Fedora, minicom works fine. After unplugging usb-serial adapter, minicom ends with "Read error on tty device."

Revision history for this message
Martin Kaufmann (martin.kaufmann) wrote :

I make an debdiff with the patch included

Revision history for this message
Colin Watson (cjwatson) wrote :

Wouldn't it be better to use the upstream patch instead of the Fedora one? The CVS repository is here:

  http://alioth.debian.org/plugins/scmcvs/cvsweb.php/minicom/?cvsroot=minicom

And here's the upstream ChangeLog entry:

2007-09-10 Adam Lackorzynski <email address hidden>

 * src/main.c: if device disappears (e.g. USB unplug) don't busy loop
               but detect it and exit minicom

 * src/sysdep1.c: m_getdcd: fixed to return -1 if ioctl failed,
                  adapted caller

Please try backporting this instead and check whether it also fixes the bug.

Changed in minicom:
assignee: nobody → martin.kaufmann
status: Confirmed → In Progress
Revision history for this message
Colin Watson (cjwatson) wrote :

(I've assigned this to Martin Kaufmann, but it may be that Michal Ingeli would be a better person to rework this, depending on whether Martin can actually reproduce this bug.)

Revision history for this message
Martin Kaufmann (martin.kaufmann) wrote :

Hi,

cant reproduce this Bug now cause i dont have any device i can connect via minicom. I think its a good idea when Michael Ingeli can say some words about what works better, the Patch from Fedora or the CVS.

Revision history for this message
Colin Watson (cjwatson) wrote :

Reassigned to Michal, then. Thanks.

Changed in minicom:
assignee: martin.kaufmann → xyzz
Bryce Harrington (bryce)
Changed in minicom:
importance: Undecided → Medium
Revision history for this message
Daniel Holbach (dholbach) wrote :

Unsubscribing Sponsors team for now, please re-subscribe when ready.

Revision history for this message
Chuck Short (zulcss) wrote :

This should be fixed for lucid.

Regards
chuck

Changed in minicom (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.