Summary: | ttyUSB device nodes are not freed after AT reset | ||
---|---|---|---|
Product: | ModemManager | Reporter: | jan.haegeman |
Component: | general | Assignee: | ModemManager bug user <modemmanager> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | ||
Version: | 1.4 | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
modemmanager debug log
dmesg logs commands logs |
Created attachment 119069 [details]
dmesg logs
Created attachment 119070 [details]
commands logs
Are you using 1.4.0? If so, this is very likely a bug fixed in 1.4.2, please retry with a newer version. http://cgit.freedesktop.org/ModemManager/ModemManager/commit/?h=mm-1-4&id=009af02f6d06d5020e397455354b9ccc56557b02 Ah, good to know. I will try with 1.4.2 tomorrow. Thanks for the quick reply. This is indeed fixed in 1.4.2. Thanks for the help! |
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.
Created attachment 119068 [details] modemmanager debug log This issue appears on a Debian 8 64-bit system (Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1 (2015-05-24)). This issue concerns a Sierra Wireless MC7304 modem. At boot, the Sierra Wireless modem uses three ttyUSB ports, namely: /dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 When disconnecting this modem directly through the USB bus or performing a reset via an AT command (mmcli -m 0 --command='AT!GRESET') I have noticed that we get errors of this kind: [ 74.170025] option1 ttyUSB0: usb_wwan_indat_callback: resubmit read urb failed. (-2) [ 74.170150] option1 ttyUSB0: usb_wwan_indat_callback: resubmit read urb failed. (-2) [ 74.170271] option1 ttyUSB0: usb_wwan_indat_callback: resubmit read urb failed. (-2) When this happens, the ttyUSB device node is blocked by the ModemManager process indefinitely and not freed up until ModemManager is restarted. When the modem connects again through the USB bus, it is using different ttyUSB ports: [ 82.983375] option 1-4:1.0: GSM modem (1-port) converter detected [ 82.983791] usb 1-4: GSM modem (1-port) converter now attached to ttyUSB1 [ 82.984219] option 1-4:1.2: GSM modem (1-port) converter detected [ 82.984733] usb 1-4: GSM modem (1-port) converter now attached to ttyUSB4 [ 82.985339] option 1-4:1.3: GSM modem (1-port) converter detected [ 82.987641] usb 1-4: GSM modem (1-port) converter now attached to ttyUSB5 This is not actually an issue, but we when we do many resets with many modems on the same system, we eventually hit the maximum of /dev/ttyUSB511 (kernel limit) and we lose the ability to issue AT commands, as no free ttyUSB ports are available anymore to bind to. Below, some commands to reproduce the issue: root@jh:~# cd /sys/devices/pci0000:00/0000:00:14.0/usb1/1-4 root@jh:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-4# echo 0 > authorized root@jh:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-4# echo 1 > authorized root@jh:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-4# echo 0 > authorized root@jh:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-4# echo 1 > authorized root@jh:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-4# echo 0 > authorized root@jh:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-4# echo 1 > authorized root@jh:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-4# systemctl restart ModemManager root@jh:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-4# echo 0 > authorized root@jh:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-4# echo 1 > authorized First, you will see that the /dev/ttyUSB number increases. When we do a ModemManager process restart and do again a reset of the modem, we see that the device nodes are freed and /dev/ttyUSB0, /dev/ttyUSB1 and /dev/ttyUSB2 are re-used. ModemManager debug log, dmesg logs and commands issued attached to ticket.