Comment 23 for bug 636091

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

I can also confirm it hangs in a live session. I also managed to get strace output and roughly pinpoint the issues to a particular action.

When probing the serial devices MM tries to do the following with various interfaces exported by the modem. In this case, ttyUSB0 isn't the actual tty that will receive AT commands but is exported by the modem:

open("/dev/ttyUSB0", O_RDWR|O_EXCL|O_NOCTTY|O_NONBLOCK) = 24
ioctl(24, TIOCEXCL, 0) = 0
ioctl(24, TCFLSH, 0x2) = 0
ioctl(24, SNDCTL_TMR_TIMEBASE or TCGETS, {B9600 -opost -isig -icanon -echo ...}) = 0
ioctl(24, SNDCTL_TMR_TIMEBASE or TCGETS, {B9600 -opost -isig -icanon -echo ...}) = 0
ioctl(24, SNDCTL_TMR_TIMEBASE or TCGETS, {B9600 -opost -isig -icanon -echo ...}) = 0
ioctl(24, SNDCTL_TMR_START or TCSETS, [***] {B57600 -opost -isig -icanon -echo ...}) = 0

Note that NM is stopped at the time (I need to stop is to restart NM and trace it...), and nothing else was running.

What happens appears to be the following: if I'm just moving the mouse, nothing special. There doesn't seem to be any lockup, things go along fine until the modem is "ready".

At the point where MM gets to the open() call for ttyUSBx, in strace, before the closing parens is added for that call, and I press a key on my keyboard, the mouse stops moving and no characters are outputted to the screen. Things appear to be locked for a few seconds (5-6 seconds by my count).

Things unlock at the point where we get to the "ioctl(24, SNDCTL_TMR_START or TCSETS" line where I added the "[***]" marker. The characters I typed in (or at least some of them) appear on the screen and the mouse pointer starts moving again.

I'm attaching the "full" strace output I got for reproducing one or two occurrences of this issue.

From what I can tell this relates roughly to the "tcgetattr (priv->fd, &priv->old_t)" call at line 733 in src/mm-serial-port.c; but I'm nowhere close to knowing whether it's an issue in MM or some part of the serial stack (or even the devices). FWIW, the code I'm referencing is readable at http://cgit.freedesktop.org/ModemManager/ModemManager/tree/src/mm-serial-port.c .