After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 767986 - NetworkManager 1.2.2 segfaults on start
NetworkManager 1.2.2 segfaults on start
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
1.2.x
Other Linux
: Normal blocker
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-06-23 19:40 UTC by Andrey Bondrov
Modified: 2016-06-24 17:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Crash log and backtrace for /src/platform/tests/monitor (10.57 KB, text/plain)
2016-06-24 03:19 UTC, Andrey Bondrov
Details
Valgrind log (78.66 KB, text/plain)
2016-06-24 10:04 UTC, Andrey Bondrov
Details
Valgrind log (1.2.2) (76.45 KB, text/plain)
2016-06-24 13:05 UTC, Andrey Bondrov
Details
Valgrind output (1.2.2) (7.48 KB, text/plain)
2016-06-24 13:05 UTC, Andrey Bondrov
Details
NM 1.2.2 crash log (with NMTST_DEBUG=d) (9.15 KB, text/plain)
2016-06-24 13:08 UTC, Andrey Bondrov
Details

Description Andrey Bondrov 2016-06-23 19:40:31 UTC
NetworkManager 1.2.2 segfaults on start. It also doesn't pass tests ("make check") because test-route-manager-linux segfaults. Backtrace for test-route-manager-linux:

==========================================
  • #0 __kernel_vsyscall
  • #1 raise
  • #2 abort
  • #3 0x43f917b5 in
  • #4 _int_free
  • #5 free
  • #6 _nm_auto_free_impl
    at ../shared/nm-macros-internal.h line 35
  • #7 event_handler_recvmsgs
    at platform/nm-linux-platform.c line 5564
  • #8 event_handler_read_netlink
    at platform/nm-linux-platform.c line 5741
  • #9 do_request_all_no_delayed_actions
    at platform/nm-linux-platform.c line 3447
  • #10 delayed_action_handle_REFRESH_ALL
    at platform/nm-linux-platform.c line 2879
  • #11 delayed_action_handle_one
    at platform/nm-linux-platform.c line 2944
  • #12 delayed_action_handle_all
    at platform/nm-linux-platform.c line 2985
  • #13 constructed
    at platform/nm-linux-platform.c line 6018
  • #14 0x447b8a9c in
  • #15 g_object_new_valist
  • #16 g_object_new
  • #17 nm_linux_platform_setup
    at platform/nm-linux-platform.c line 2414
  • #18 main
    at ../../src/platform/tests/test-common.c line 1564

Looks like this segfault was introduced between 1.1.90 (test-route-manager-linux works) and 1.1.91 (test-route-manager-linux segfaults).
Comment 1 Thomas Haller 2016-06-23 20:28:31 UTC
Can you attach the logfile with debug logging enabled?


As you build from source, maybe better toshow the output of
  $ NMTST_DEBUG=d ./src/platform/tests/monitor 
That crashes too, right?


Preferably, also after
  ./configure --with-more-asserts --with-more-logging
  


Thanks
Comment 2 Andrey Bondrov 2016-06-24 03:17:46 UTC
(In reply to Thomas Haller from comment #1)
> Can you attach the logfile with debug logging enabled?
> 
> 
> As you build from source, maybe better toshow the output of
>   $ NMTST_DEBUG=d ./src/platform/tests/monitor 
> That crashes too, right?

Yes, it does. 

> Preferably, also after
>   ./configure --with-more-asserts --with-more-logging

Built NM with these options. I'll attach the log for "NMTST_DEBUG=debug ./src/platform/tests/monitor".
Comment 3 Andrey Bondrov 2016-06-24 03:19:06 UTC
Created attachment 330286 [details]
Crash log and backtrace for /src/platform/tests/monitor
Comment 4 Thomas Haller 2016-06-24 09:11:40 UTC
Are you using the 1.2.2 tarball from here: http://ftp.gnome.org/pub/GNOME/sources/NetworkManager/1.2/ ?


I don't see why that crash would happen. Can you run it in valgrind:

  NMTST_DEBUG=d valgrind --leak-check=full --log-file=valgrind.log \
     ./src/platform/tests/monitor


(note it's "d", not "debug", but doesn't matter much).
Comment 5 Andrey Bondrov 2016-06-24 10:02:34 UTC
(In reply to Thomas Haller from comment #4)
> (note it's "d", not "debug", but doesn't matter much).

For "d" it says:

NetworkManager-Message: >>> nmtst: ignore unrecognized NMTST_DEBUG option "d"

With valgrind it doesn't segfault but says:

==29128== Invalid free() / delete / delete[] / realloc()
==29128==    at 0x4007D8A: free (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==29128==    by 0x8073330: _nm_auto_free_impl (nm-macros-internal.h:35)

I'll attach the log.
Comment 6 Andrey Bondrov 2016-06-24 10:04:25 UTC
Created attachment 330306 [details]
Valgrind log
Comment 7 Thomas Haller 2016-06-24 12:28:44 UTC
(In reply to Andrey Bondrov from comment #5)
> (In reply to Thomas Haller from comment #4)
> > (note it's "d", not "debug", but doesn't matter much).
> 
> For "d" it says:
> 
> NetworkManager-Message: >>> nmtst: ignore unrecognized NMTST_DEBUG option "d"

than I don't think you are running upstream 1.2.2 release. Did you get it from git? What is the commit-id?
Comment 8 Andrey Bondrov 2016-06-24 13:04:38 UTC
(In reply to Thomas Haller from comment #7)
> than I don't think you are running upstream 1.2.2 release. Did you get it
> from git? What is the commit-id?

Indeed, it was 1.1.91 (same segfault as in 1.2.2).

I'll attach valgrind log and output from 1.2.2.
Comment 9 Andrey Bondrov 2016-06-24 13:05:19 UTC
Created attachment 330314 [details]
Valgrind log (1.2.2)
Comment 10 Andrey Bondrov 2016-06-24 13:05:50 UTC
Created attachment 330315 [details]
Valgrind output (1.2.2)
Comment 11 Andrey Bondrov 2016-06-24 13:08:50 UTC
Created attachment 330316 [details]
NM 1.2.2 crash log (with NMTST_DEBUG=d)
Comment 12 Thomas Haller 2016-06-24 15:25:01 UTC
Thanks.

Still no idea why that would happen. Can you explain more about your system? How can this reproduced? What distro? What libnl3 version? Did you build libnl3 yourself (which exact version) or got a package from the distro?
Comment 13 Andrey Bondrov 2016-06-24 15:59:38 UTC
(In reply to Thomas Haller from comment #12)
> Thanks.
> 
> Still no idea why that would happen. Can you explain more about your system?
> How can this reproduced? What distro? What libnl3 version? Did you build
> libnl3 yourself (which exact version) or got a package from the distro?

Distro:
1. ROSA Desktop Fresh R7 (rosa2014.1)
2. libnl3 3.2.14 from rosa2014.1 repository

How to reproduce:
1. Download and install the distro from the latest ISO:
https://abf.rosalinux.ru/platforms/rosa2014.1/products/86/product_build_lists/15433
2. Install NetworkManager 1.2.2 from
2.1. 32 bit: http://abf-downloads.rosalinux.ru/rosa2014.1/container/2683665/i586/main/release/
2.2. 64 bit: http://abf-downloads.rosalinux.ru/rosa2014.1/container/2683666/x86_64/main/release/
3. Start it and it will crash

You can also try to build it from source after installing the distro:
1. Download SRPM from http://abf-downloads.rosalinux.ru/rosa2014.1/container/2683666/SRPMS/main/release/networkmanager-1.2.2-1.src.rpm
2. Install build dependences by
# urpmi.update -a
# urpmi --buildrequires networkmanager-1.2.2-1.src.rpm
3. Then either run
rpmbuild --rebuild networkmanager-1.2.2-1.src.rpm
or just unpack source tarball and run configure, make etc.
Comment 15 Andrey Bondrov 2016-06-24 17:21:33 UTC
Thanx for fixing it.