Bug 2129461 - ModemManager crashes on Lenovo ThinkPad X230
Summary: ModemManager crashes on Lenovo ThinkPad X230
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: ModemManager
Version: 37
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Davide Cavalca
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2133733 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-23 20:39 UTC by Otto Liljalaakso
Modified: 2023-11-22 17:40 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-22 17:40:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
File: backtrace (27.42 KB, text/plain)
2022-10-24 04:39 UTC, Joerg Skottke
no flags Details


Links
System ID Private Priority Status Summary Last Updated
freedesktop.org Gitlab mobile-broadband ModemManager issues 621 0 None closed "corrupted double-linked list" after upgrade to glib2-2.73.2 2022-09-23 20:39:43 UTC

Description Otto Liljalaakso 2022-09-23 20:39:43 UTC
Description of problem:

After upgrading my Lenovo ThinkPad X230 to Fedora 37 Beta,
ModemManager crashes within seconds from starting.
Since it runs as an auto-restarting systemd service,
great amounts of coredumps accumulate.

The exact position of the crash varies,
but typical log output looks like this:

$ sudo ModemManager
ModemManager[25037]: <info>  ModemManager (version 1.18.8-2.fc37) starting in system bus...
ModemManager[25037]: [qrtr] socket lookup from 1:0
ModemManager[25037]: [qrtr] initial lookup finished
ModemManager[25037]: opening device...
ModemManager[25037]: [/dev/cdc-wdm2] Read max control message size from descriptors file: 512
ModemManager[25037]: <info>  [cdc-wdm2/mbim] MBIM device is not QMI capable
ModemManager[25037]: [/dev/cdc-wdm2] channel destroyed

(ModemManager:25037): GLib-CRITICAL **: 23:31:42.842: g_regex_match_full: assertion 'regex != NULL' failed

(ModemManager:25037): GLib-CRITICAL **: 23:31:42.843: g_regex_match_full: assertion 'regex != NULL' failed
corrupted double-linked list

Version-Release number of selected component (if applicable):
1.18.8-2.fc37

How reproducible:
Always on my machine

Steps to Reproduce:

Boot and login, observe accumulating crashes with e.g. coredumpctl

To reproduce manually:

1. sudo systemctl stop ModemManager.service
2. sudo ModemManager

Actual results:
Crash with error message "corrupted double-linked list"

Expected results:
No crash

Additional info:

Upstream issue: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/621

I can reproduce the issue with locally built ModemManager from upstream tag 1.18.8.
Cherry-picking upstream fix in commit79a5a4ee fixes the issue in local build.
I suggest it is cherry-picked to affected Fedora branches.
According to discussion in upstream bug report, the trigger is glib2 version.

Comment 1 Otto Liljalaakso 2022-09-23 20:44:21 UTC
Some further information:
I actually never use the laptop's modem.
I initially noticed that there is something wrong with ModemManager
because after the Fedora 37 Beta upgrade,
I started receiving great amounts of SELinux denials of the following form:

type=AVC msg=audit(1663963395.193:1911): avc:  denied  { execmem } for  pid=14946 comm="ModemManager" scontext=system_u:system_r:modemmanager_t:s0 tcontext=system_u:system_r:modemmanager_t:s0 tclass=process permissive=1

I believe that denial is triggered by ModemManager service crashing.
I have not been able to reproduce it by manually running ModemManager.

Comment 2 Otto Liljalaakso 2022-09-24 18:07:59 UTC
Actually, it looks like just updating to the latest point release would fix the issue.
The problem is mentioned as the very first item in 1.18.12 announcement:

https://lists.freedesktop.org/archives/modemmanager-devel/2022-September/009419.html

Comment 3 Apostolos Pachios 2022-10-11 14:19:09 UTC
*** Bug 2133733 has been marked as a duplicate of this bug. ***

Comment 4 Joerg Skottke 2022-10-24 04:39:50 UTC
Similar problem has been detected:

At login with no user interaction

reporter:       libreport-2.17.4
backtrace_rating: 4
cgroup:         0::/system.slice/ModemManager.service
cmdline:        /usr/sbin/ModemManager
crash_function: g_malloc0
executable:     /usr/sbin/ModemManager
journald_cursor: s=5c6a9255d2a24d7c8b5e34079497078c;i=612b;b=1bd7c7e3fd804a27bdcab08402e0bc0c;m=26d298c;t=5eb8bbffb124d;x=dd935d6cff7ff96c
kernel:         5.19.15-301.fc37.x86_64
package:        ModemManager-1.18.8-2.fc37
reason:         ModemManager killed by SIGABRT
rootdir:        /
runlevel:       unknown
type:           CCpp
uid:            0

Comment 5 Joerg Skottke 2022-10-24 04:39:52 UTC
Created attachment 1919832 [details]
File: backtrace

Comment 6 Vlado Potisk 2022-11-20 15:59:20 UTC
I second the suggestion from Comment #2: "updating to the latest point release would fix the issue"

I have built the 1.8.12 from sources and it works (for me).

Comment 7 Vlado Potisk 2022-11-20 16:04:47 UTC
... addendum to Comment 6: on a PC, not using a laptop

Comment 8 Simo Sutela 2022-11-24 12:40:33 UTC
As a work-around, I downgraded Glib2 to the last known working version, which is available from Koji.

rpm -i --nodeps --force glib2-2.73.1-2.fc37.x86_64.rpm

My internet connection works now, but note that doing this is inadvisable because it can break many other parts of your system.

Comment 9 Simo Sutela 2022-11-29 02:40:17 UTC
Forget my previous comment, I clearly don't know what I'm talking about. ModemManager just happens to work sometimes. It's possible to initialize the modem by booting into another distribution that has a working ModemManager, and then reboot into Fedora. After that the connection seems to always work. Sleep mode messes it up.

Comment 10 nos1609 2022-12-19 22:46:10 UTC
Similar problem has been detected:

Fedora 37 upgrade

reporter:       libreport-2.17.4
backtrace_rating: 4
cgroup:         0::/system.slice/ModemManager.service
cmdline:        /usr/sbin/ModemManager
crash_function: g_malloc0
executable:     /usr/sbin/ModemManager
journald_cursor: s=20c6f594adf44fdbb7e81e0b5e71d23a;i=e1e71;b=a7507338186046a5bb63a16a8952e762;m=e7986d6a;t=5eeb65e98b260;x=1bd2a27f144b1cce
kernel:         6.0.10-300.fc37.x86_64
package:        ModemManager-1.18.8-2.fc37
reason:         ModemManager killed by SIGABRT
rootdir:        /
runlevel:       N 5
type:           CCpp
uid:            0

Comment 11 Kai Wetlesen 2023-01-03 19:00:21 UTC
Similar problem has been detected:

This is a recurring problem which began once I installed a new cellular modem. I 
do not have any other information on what precipated the crash besides this.

reporter:       libreport-2.17.4
backtrace_rating: 4
cgroup:         0::/system.slice/ModemManager.service
cmdline:        /usr/sbin/ModemManager
crash_function: g_malloc0
executable:     /usr/sbin/ModemManager
journald_cursor: s=5cbe6c533f974b1bb13b5989bdd3ba3d;i=33051;b=27fce7956fab40ecb10e6dec485abb9f;m=1bf4d9321;t=5efeb7c9d576e;x=9a39c268838e85f4
kernel:         6.0.12-300.fc37.x86_64
package:        ModemManager-1.18.8-2.fc37
reason:         ModemManager killed by SIGABRT
rootdir:        /
runlevel:       N 5
type:           CCpp
uid:            0

Comment 12 Apostolos Pachios 2023-01-25 19:38:39 UTC
Fixed for me with version ModemManager 1.18.12-1.fc37

Comment 13 Fedora Admin user for bugzilla script actions 2023-02-21 12:04:21 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 14 Fedora Admin user for bugzilla script actions 2023-02-22 00:03:51 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.


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