Re: Network Manager crashes after a configuration is added and a connection is attempted.



On Wed, 2014-07-02 at 08:43 -0500, Dan Williams wrote:
On Wed, 2014-07-02 at 11:26 +0200, Thomas Haller wrote:
On Tue, 2014-07-01 at 16:52 -0600, Chris Hessing wrote:
Hi all,

I thought it might be an issue with the variant type I was sending in to 
some configuration setting that was later being parsed when I requested 
the connection become active.   However, after going through my code to 
generate the settings, they all match what is documented here : 
https://developer.gnome.org/NetworkManager/0.9/ref-settings.html

One interesting tidbit is that after Network Manager crashes, and is 
restarted by the system, the connection comes up fine and seems to work 
from then on.

At this point, short of cracking open the Network Manager code, I am 
running out of ideas as to what it could be.   Perhaps someone that 
understands the Network Manager code can shed some light on what might 
be going on?

Hi Chris,



This looks like a bug in NetworkManager.

The attached patch should fix it.

Patch looks right to me.  It's likely unnoticed because these days most
certificates use the "path" scheme instead of the blob scheme, and thus
this code doesn't get triggered.

Pushed to
master: 
http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=e343c45ebbb7976e15241a241f2876de8619ca3c


backported to
nm-0-0-10: 
http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=a24ad8b03c69683aadf8abc3cedbbbba146eb57d
nm-0-9-8:  
http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=4d5fa9dadc13577067eadf0a1d39de4d426a9fc3




Interestingly,
http://dbus.freedesktop.org/doc/dbus-glib/dbus-glib-Specializable-GType-System.html#DBUS-TYPE-G-UCHAR-ARRAY:CAPS
 says that we cannot pass a GByteArray instead of the expected GArray of uchar. But I think the comment 
is just wrong, because a GByteArray *is* actually a GArray.

We should look at this a bit more; I ran into this when doing the
wwan-ipv6 stuff and it did cause a crash that was fixed by using GArray
instead of GByteArray.  But we've been using GByteArray for a really
long time, so I'm sure that at some point in the past this worked.

I think it's just a documentation error. I opened bug
https://bugs.freedesktop.org/show_bug.cgi?id=80797

GByteArray is since the beginning implemented as a GArray. E.g.

  GByteArray*
  g_byte_array_new (void)
  {
    return (GByteArray *)g_array_sized_new (FALSE, FALSE, 1, 0);
  }


Even if this is not commited as public API, I don't think that glib can
ever change the underlying implementation, because it potentially might
break a lot of users. And why would glib even want to do that, it's a
neat way to implement GByteArray bringing some advantages.



Thomas

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]