FS#43576 - [network-manager-applet] 1.0.0-1 crashes on broadband connection

Attached to Project: Arch Linux
Opened by Nesser (Decepteiskon) - Sunday, 25 January 2015, 22:32 GMT
Last edited by Doug Newgard (Scimmia) - Wednesday, 06 May 2015, 02:29 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Jan Alexander Steffens (heftig)
Architecture i686
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: i use nm-applet to manage a broadband (ppp) connection using a cellphone as a modem, just set the right operator/apn in the wizard and i'm on the internet. Until today when i updated nm-applet to version 1

[2015-01-25 11:53] [ALPM] upgraded network-manager-applet (0.9.10.0-2 -> 1.0.0-1)

With the old version i could connect from the menu choosing the right connection, now it's the same when connecting, with the spinning icon, then the icon briefly changes to the unconnected icon and crashes.
With the connection active i get an "Address boundary error" just running from the terminal, even without a single icon appears in the taskbar. Disconnecting the phone and retrying, same behavior from before.

Manually deleted the connection and remade, no changes.

Additional info:
* package version(s): see above
* config and/or log files etc.

nm-applet with terminal
fish: Job 2, 'nm-applet' terminated by signal SIGSEGV (Address boundary error)

nm-applet with gdb
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0xb5d35b40 (LWP 24398)]
[New Thread 0xb53b2b40 (LWP 24399)]
[New Thread 0xb48b1b40 (LWP 24410)]
Program received signal SIGSEGV, Segmentation fault.
0xb6ffd07a in g_str_hash () from /usr/lib/libglib-2.0.so.0

Steps to reproduce: just connect to a cellular network (or other connections, not tested because i don't have one now, TBD: test with ethernet/wifi) and wait until the spinning icon disappear.

By the way, nm-applet crashes but still connects without other (apparent) issues.
This task depends upon

Closed by  Doug Newgard (Scimmia)
Wednesday, 06 May 2015, 02:29 GMT
Reason for closing:  Fixed
Additional comments about closing:  User requested: Fixed with NM updated at 1.0.2
Comment by Nesser (Decepteiskon) - Monday, 26 January 2015, 20:29 GMT
Update: no issues on ethernet link.
Comment by Nesser (Decepteiskon) - Wednesday, 28 January 2015, 22:07 GMT
Update2: no issues even on wifi, probably just broadband related.
Comment by Nesser (Decepteiskon) - Wednesday, 11 February 2015, 22:22 GMT
[ALPM] upgraded modemmanager (1.4.2-1 -> 1.4.4-1)

Still crashing, probably not related.
Comment by Nesser (Decepteiskon) - Thursday, 12 February 2015, 19:21 GMT Comment by Aleksander Morgado (aleksander0m) - Friday, 13 February 2015, 08:50 GMT
Could you get a full backtrace when running nm-applet under gdb? This may be a bug either in nm-applet or in the new libnm.
Comment by Nesser (Decepteiskon) - Friday, 13 February 2015, 17:40 GMT
Program received signal SIGSEGV, Segmentation fault.
0xb6ffb07a in g_str_hash () from /usr/lib/libglib-2.0.so.0
(gdb) bt
#0 0xb6ffb07a in g_str_hash () from /usr/lib/libglib-2.0.so.0
#1 0xb6ffa4a8 in g_hash_table_lookup () from /usr/lib/libglib-2.0.so.0
#2 0x0805dfef in nma_icon_check_and_load ()
#3 0x0806e778 in mobile_helper_get_status_pixbuf ()
#4 0x0806f042 in mobile_helper_get_icon ()
#5 0x080724d2 in ?? ()
#6 0x0805e80a in ?? ()
#7 0xb7008130 in ?? () from /usr/lib/libglib-2.0.so.0
#8 0xb700b8d3 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#9 0xb700bce9 in ?? () from /usr/lib/libglib-2.0.so.0
#10 0xb700c099 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#11 0x08056654 in main ()

Not an expert, but looks like there's something related to hash in libglib.
Btw, i deleted the connection, killed nm-applet and restarted, re-made the connection and same behavior, spinning icon and crash. The spin of death
Comment by Nesser (Decepteiskon) - Friday, 13 February 2015, 17:44 GMT
gdb> bt full should be the full backtrace, right?

Program received signal SIGSEGV, Segmentation fault.
0xb6ffb07a in g_str_hash () from /usr/lib/libglib-2.0.so.0
(gdb) bt full
#0 0xb6ffb07a in g_str_hash () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#1 0xb6ffa4a8 in g_hash_table_lookup () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#2 0x0805dfef in nma_icon_check_and_load ()
No symbol table info available.
#3 0x0806e778 in mobile_helper_get_status_pixbuf ()
No symbol table info available.
#4 0x0806f042 in mobile_helper_get_icon ()
No symbol table info available.
#5 0x080724d2 in ?? ()
No symbol table info available.
#6 0x0805e80a in ?? ()
No symbol table info available.
#7 0xb7008130 in ?? () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#8 0xb700b8d3 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#9 0xb700bce9 in ?? () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#10 0xb700c099 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#11 0x08056654 in main ()
Comment by Jan Alexander Steffens (heftig) - Friday, 13 February 2015, 17:47 GMT
You need to build glib2 and network-manager-applet with debug symbols for backtraces to have any value.

Simplest way is to do a rebuild with /etc/makepkg.conf having debug and !strip in the OPTIONS array.
Comment by Aleksander Morgado (aleksander0m) - Friday, 13 February 2015, 17:54 GMT
Looks like mobile_helper_get_tech_icon_name () is returning NULL because it doesn't find a matching icon to use in some access tech value, and the returned NULL is directly being passed to nma_icon_check_and_load(), which in turn calls g_hash_table_lookup() with a NULL key, and kaboom.
Comment by Aleksander Morgado (aleksander0m) - Friday, 13 February 2015, 17:57 GMT
When enabled debug symbols and retrying with gdb, could you go to the "mobile_helper_get_status_pixbuf" context and print the value of "access_tech"?
Comment by Aleksander Morgado (aleksander0m) - Friday, 13 February 2015, 18:07 GMT
Also, please get me the output of "mmcli -m 0"
Comment by Aleksander Morgado (aleksander0m) - Friday, 13 February 2015, 18:07 GMT
And then, if you can, please test with the following patch applied to the network-manager-applet sources:
https://bug744421.bugzilla-attachments.gnome.org/attachment.cgi?id=296795
Comment by Nesser (Decepteiskon) - Saturday, 14 February 2015, 11:10 GMT
@heftig
Done both packages, recompiled with a problem, probably yaourt related, compile of nm-applet failed for some reason (check... something) in my system's native language, using 'set LANG C' yaourt compiled w/o problems. Should i fill a bug for Yaourt?

@aleksander0m
Idk how to get value of access_tech, leaving here a backtrace and full one with symbols, NOT patched with the patch you made: http://pastebin.com/C3j3GKE9

mmcli -m 1 (0 wasn't found) output:
-------------------------
Hardware | manufacturer: 'Nokia'
| model: 'Nokia C7-00'
| revision: '111.040.1511
| 2012-07-28
| RM-675
| (c) Nokia'
| supported: 'gsm-umts'
| current: 'gsm-umts'
| equipment id: '' #removed
-------------------------
System | device: '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7'
| drivers: 'cdc_acm, cdc_phonet'
| plugin: 'Nokia'
| primary port: 'ttyACM0'
| ports: 'ttyACM0 (at)'
-------------------------
Numbers | own : 'unknown'
-------------------------
Status | lock: 'none'
| unlock retries: 'unknown'
| state: 'connected'
| power state: 'on'
| access tech: 'unknown'
| signal quality: '48' (cached)
-------------------------
Modes | supported: 'allowed: 2g; preferred: none'
| current: 'allowed: 2g; preferred: none'
-------------------------
Bands | supported: 'unknown'
| current: 'unknown'
-------------------------
IP | supported: 'ipv4, ipv6'
-------------------------
3GPP | imei: '' #removed
| enabled locks: 'sim'
| operator id: '22210'
| operator name: 'unknown'
| subscription: 'unknown'
| registration: 'home'
-------------------------
SIM | path: '/org/freedesktop/ModemManager1/SIM/1'

-------------------------
Bearers | paths: '/org/freedesktop/ModemManager1/Bearer/1'

Comment by Aleksander Morgado (aleksander0m) - Saturday, 14 February 2015, 12:08 GMT
Yeah, ok, so the access tech is actually reported as 'unknown' already by ModemManager. The patch I suggested for nm-applet should therefore be correct; i.e. if MM reports unknown access tech, nm-applet shouldn't try to embed the access tech icon in the status icon.

Not being able to get access tech, like in this case, is a total valid situation. Specially like this case where we have a single TTY for both control and data: once the modem is connected, you cannot send control commands to query access tech. One last thing that I'd like to check is whether any query to load access tech was made before the connection attempt. Could you please get ModemManager debug logs? Steps to do that would be:

$ sudo systemctl disable ModemManager
$ sudo systemctl stop ModemManager
$ sudo /usr/sbin/ModemManager --debug

(now reproduce the issue, and copy the debug logs from stdout)

To recover your original setup, just Ctrl+C to stop ModemManager and then:
$ sudo systemctl enable ModemManager
$ sudo systemctl start ModemManager

Thanks!
Comment by Nesser (Decepteiskon) - Saturday, 14 February 2015, 22:31 GMT
@aleksander0m
>(now reproduce the issue, and copy the debug logs from stdout)
Was over the console limit, resolved via a '2> modemmanagerdebug.txt'

In the upped file: ModemManager started with debug mode, phone connected (PC-Suite mode, phone said) and connection activated via nmtui (this doesn't crash)

Still not using patch, i have to figure how to patch nm-applet.

Upload file isn't doing anything, pasted: http://pastebin.com/aW6vMz3W
Comment by Nesser (Decepteiskon) - Monday, 16 February 2015, 22:53 GMT
Bug is marked as RESOLVED FIXED in upstream and pushed in git (thanks @aleksander0m for the fix). Waiting for the final version to verify behavior and request closure.
Comment by Nesser (Decepteiskon) - Tuesday, 10 March 2015, 08:40 GMT
Not crashed today, after an update, should be this:
upgraded gdk-pixbuf2 (2.31.2-1 -> 2.31.3-1)
Comment by Nesser (Decepteiskon) - Thursday, 12 March 2015, 14:02 GMT
  • Field changed: Percent Complete (100% → 0%)
Err, sadly it was just a one time it didn't crash, after a reboot crashed like before, will be fixed in new nm version?

Loading...