Bug 1123520 - nmcli core dumps at boot
Summary: nmcli core dumps at boot
Status: CLOSED DUPLICATE of bug 1122593
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: 20
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Dan Williams
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2014-07-25 22:56 UTC by Shawn Bohrer
Modified: 2014-07-27 07:39 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-07-27 07:39:29 UTC

Attachments (Terms of Use)

Description Shawn Bohrer 2014-07-25 22:56:58 UTC
Description of problem:

While setting up some new systems I'm getting core dumps from nmcli when the system boots.  I am not using NetworkManager but these seem to come from


is_nm_running ()
    [ "$(LANG=C nmcli -t --fields running general status 2>/dev/null)" = "running" ]

Running this command after this after this system is up does not core dump and reports:

root@berbox20:~# LANG=C nmcli -t --fields running general status 
not running

Looking at one of the core dumps I see the following:

Core was generated by `nmcli -t --fields running general status'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  _nm_object_ensure_inited (object=0x0) at nm-object.c:1259
1259		if (!priv->inited) {
(gdb) bt
#0  _nm_object_ensure_inited (object=0x0) at nm-object.c:1259
#1  0x00007f0bf6e657db in nm_client_new () at nm-client.c:1606
#2  0x00007f0bf756351e in nmc_get_client (nmc=0x7fff3ff5fd30) at nmcli.c:336
#3  0x00007f0bf754d746 in show_nm_status (nmc=nmc@entry=0x7fff3ff5fd30, pretty_header_name=pretty_header_name@entry=0x0, 
    print_flds=print_flds@entry=0x0) at network-manager.c:216
#4  0x00007f0bf754e234 in do_general (nmc=0x7fff3ff5fd30, argc=1, argv=0x7fff3ff5fef0) at network-manager.c:461
#5  0x00007f0bf7563025 in do_cmd (argv=0x7fff3ff5fee8, argc=2, argv0=0x7fff3ff60f4b "general", nmc=0x7fff3ff5fd30) at nmcli.c:129
#6  parse_command_line (argv=0x7fff3ff5fee0, argc=3, nmc=0x7fff3ff5fd30) at nmcli.c:262
#7  start (data=0x7fff3ff5fd10) at nmcli.c:399
#8  0x00007f0bf47122a6 in g_main_dispatch (context=0x7f0bf8a8c900) at gmain.c:3066
#9  g_main_context_dispatch (context=context@entry=0x7f0bf8a8c900) at gmain.c:3642
#10 0x00007f0bf4712628 in g_main_context_iterate (context=0x7f0bf8a8c900, block=block@entry=1, dispatch=dispatch@entry=1, 
    self=<optimized out>) at gmain.c:3713
#11 0x00007f0bf4712a3a in g_main_loop_run (loop=0x7f0bf8a8ca20) at gmain.c:3907
#12 0x00007f0bf7536b15 in main (argc=<optimized out>, argv=<optimized out>) at nmcli.c:434
(gdb) list
1254	_nm_object_ensure_inited (NMObject *object)
1255	{
1256		NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object);
1257		GError *error = NULL;
1259		if (!priv->inited) {
1260			if (!g_initable_init (G_INITABLE (object), NULL, &error)) {
1261				g_warning ("Could not initialize %s %s: %s",
1262				           G_OBJECT_TYPE_NAME (object), priv->path,
1263				           error->message);
(gdb) print priv
$1 = (NMObjectPrivate *) 0x0
(gdb) frame 1
#1  0x00007f0bf6e657db in nm_client_new () at nm-client.c:1606
1606		_nm_object_ensure_inited (NM_OBJECT (client));
(gdb) print client
$2 = (NMClient *) 0x0
(gdb) list
1601	nm_client_new (void)
1602	{
1603		NMClient *client;
1605		client = g_object_new (NM_TYPE_CLIENT, NM_OBJECT_DBUS_PATH, NM_DBUS_PATH, NULL);
1606		_nm_object_ensure_inited (NM_OBJECT (client));
1607		return client;
1608	}
1610	static void

This looks to me like g_object_new() returned NULL and we passed that on to _nm_object_ensure_inited which then dereferenced the NULL pointer.  Of course the internet tells me that g_object_new() won't ever return a NULL pointer so well... Perhaps someone else knows what is going on here.

Version-Release number of selected component (if applicable):


Comment 1 Jirka Klimes 2014-07-27 07:39:29 UTC

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

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