Bug 89512 - Deleting connected bearer triggers tty hungup and port gets lost
Summary: Deleting connected bearer triggers tty hungup and port gets lost
Status: RESOLVED DUPLICATE of bug 90408
Alias: None
Product: ModemManager
Classification: Unclassified
Component: general (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: ModemManager bug user
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-10 07:15 UTC by Aleksander Morgado
Modified: 2015-12-03 11:23 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Aleksander Morgado 2015-03-10 07:15:30 UTC
As reported in the MM mailing list:
http://lists.freedesktop.org/archives/modemmanager-devel/2015-March/001798.html


Quoting:
I recently ran into an issue with ModemManager (1.4.4) where I created
and connected to a bearer and deleted it without first disconnecting.
I am using a Cinterion PHS8 with two AT ports.  If I delete the bearer
without first disconnecting, the second AT port (on which I was using
pppd) is no longer used by ModemManager as the modem is marked as
forced close.

The issue is easily reproduced by executing the following set of
commands with ModemManager running with a modem with 2 AT ports found
by ModemManager:

    mmcli -m 0 -e
    mmcli -m 0 --create-bearer='apn="myapn"'
    mmcli -b 0 --connect
    mmcli -m 0 --delete-bearer=0
    mmcli -m 0 --create-bearer='apn="myapn"'
    mmcli -b 1 --connect

On connecting to bearer 1, the following error is received:

    Couldn't connect: cannot keep data port open.Could not open \
    serial device ttyUSB3: it has been forced close;

The workaround is pretty straightforward, which is to always
ensure that the bearer is disconnected prior to being removed.  I
figured I would provide this info to the list as this seemed like a
potential bug where MM was not properly cleaning up when removing
the bearer.

The force close appears to occur as a result of
iochannel_input_availble being executed as a result of a hangup
initiated by ModemManager itself:

   ModemManager[3052]: <debug> [1425505651.367703] \
     [mm-port-serial.c:889] common_input_available(): (ttyUSB3) \
     unexpected port hangup!
   ModemManager[3052]: <debug> [1425505651.367854] \
     [mm-port-serial.c:1421] port_serial_close_force(): (ttyUSB3) \
     forced to close port
Comment 1 Aleksander Morgado 2015-12-03 11:23:56 UTC
Flagged as duplicate, already fixed in git master and mm-1-4.

*** This bug has been marked as a duplicate of bug 90408 ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.