Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

network-manager: 1.10.6 → 1.12.0 #43087

Merged
merged 3 commits into from Jul 13, 2018
Merged

network-manager: 1.10.6 → 1.12.0 #43087

merged 3 commits into from Jul 13, 2018

Conversation

jtojnar
Copy link
Contributor

@jtojnar jtojnar commented Jul 5, 2018

Motivation for this change

https://blogs.gnome.org/lkundrak/2018/06/29/networkmanager-1-12/

There is now a meson support in network-manager but we cannot use it since it always tries to build docs (attempt here). It fails because docs generator uses GObject introspection but we are patching g-ir-scanner to produce absolute paths, which, of course, do not exist before installation.

Upstream now disables the legacy nm-glib by default, we are enabling it here since some packages probably still rely on it. Is there a way to find those packages?

cc @obadz Password entering in nm-applet should now work even without GNOME Keyring: https://gitlab.gnome.org/GNOME/network-manager-applet/issues/3

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: networkmanager, networkmanager-openvpn

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: networkmanager, networkmanager-openvpn

Partial log (click to expand)

shrinking /nix/store/7i6yf0pm5khb7417axqhf8afjb9wnsb4-NetworkManager-openvpn-gnome-1.8.4/libexec/nm-openvpn-service
shrinking /nix/store/7i6yf0pm5khb7417axqhf8afjb9wnsb4-NetworkManager-openvpn-gnome-1.8.4/lib/NetworkManager/libnm-openvpn-properties.so
shrinking /nix/store/7i6yf0pm5khb7417axqhf8afjb9wnsb4-NetworkManager-openvpn-gnome-1.8.4/lib/NetworkManager/libnm-vpn-plugin-openvpn-editor.so
shrinking /nix/store/7i6yf0pm5khb7417axqhf8afjb9wnsb4-NetworkManager-openvpn-gnome-1.8.4/lib/NetworkManager/libnm-vpn-plugin-openvpn.so
strip is /nix/store/4qvrxzxa535y8304mk195x50b6p9607d-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/7i6yf0pm5khb7417axqhf8afjb9wnsb4-NetworkManager-openvpn-gnome-1.8.4/lib  /nix/store/7i6yf0pm5khb7417axqhf8afjb9wnsb4-NetworkManager-openvpn-gnome-1.8.4/libexec
patching script interpreter paths in /nix/store/7i6yf0pm5khb7417axqhf8afjb9wnsb4-NetworkManager-openvpn-gnome-1.8.4
checking for references to /build in /nix/store/7i6yf0pm5khb7417axqhf8afjb9wnsb4-NetworkManager-openvpn-gnome-1.8.4...
/nix/store/f5gjmgz8ag67przsbrpw5hh6dg8gvjlm-network-manager-1.12.0
/nix/store/7i6yf0pm5khb7417axqhf8afjb9wnsb4-NetworkManager-openvpn-gnome-1.8.4

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: networkmanager, networkmanager-openvpn

Partial log (click to expand)

shrinking /nix/store/jkw5hlfmd2qajaw866h1lrmc4xsnhk9y-NetworkManager-openvpn-gnome-1.8.4/lib/NetworkManager/libnm-vpn-plugin-openvpn.so
shrinking /nix/store/jkw5hlfmd2qajaw866h1lrmc4xsnhk9y-NetworkManager-openvpn-gnome-1.8.4/libexec/nm-openvpn-auth-dialog
shrinking /nix/store/jkw5hlfmd2qajaw866h1lrmc4xsnhk9y-NetworkManager-openvpn-gnome-1.8.4/libexec/nm-openvpn-service-openvpn-helper
shrinking /nix/store/jkw5hlfmd2qajaw866h1lrmc4xsnhk9y-NetworkManager-openvpn-gnome-1.8.4/libexec/nm-openvpn-service
strip is /nix/store/0pjsgkxz0rp5baycq5sp2s72lrr5q9sg-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/jkw5hlfmd2qajaw866h1lrmc4xsnhk9y-NetworkManager-openvpn-gnome-1.8.4/lib  /nix/store/jkw5hlfmd2qajaw866h1lrmc4xsnhk9y-NetworkManager-openvpn-gnome-1.8.4/libexec
patching script interpreter paths in /nix/store/jkw5hlfmd2qajaw866h1lrmc4xsnhk9y-NetworkManager-openvpn-gnome-1.8.4
checking for references to /build in /nix/store/jkw5hlfmd2qajaw866h1lrmc4xsnhk9y-NetworkManager-openvpn-gnome-1.8.4...
/nix/store/ph49ghn6ng8s3s0fzm5ri2xj8q6bsvka-network-manager-1.12.0
/nix/store/jkw5hlfmd2qajaw866h1lrmc4xsnhk9y-NetworkManager-openvpn-gnome-1.8.4

@flokli
Copy link
Contributor

flokli commented Jul 6, 2018

Did give this a try. I'm still not quite sure if everything is correctly, though:

After cherry-picking and rebuilding my user profile (with the newer nm-applet, but still old network-manager), then spinning up a openonnect connection via this nm-applet, I was greeted with the a login window I normally didn't see (previously, nm-applet just segfaulted, so an improvement ;-)).
It did ask me for credentials, then for a keyring password. I do have seahorse in my path, so I peeked into it and credentials appear to have landed in the gnome keyring, but network-manager still complained:

<error> [1530861861.2655] vpn-connection[0x2962350,d1c0d453-aef5-40ab-9bd1-22d436cb35e4,"olathoe",0]: final secrets request failed to provide sufficient secrets

After rebuilding the system itself too, and restarting network-manager and nm-applet, I can't initiate any VPN connection through nm-applet:

.nm-applet-wrap[2733]: VPN Connection activation failed: (org.freedesktop.NetworkManager.UnknownDevice) Cannot specify device when activating VPN.

This now happens with other VPN flavours that previously worked (vpnc for example).

Initiating the vpnc connection from the commandline via nmcli still works, when initiating the openconnect connection, I get the same login dialog as with the half-upgraded system described above, with the same error message "final secrets request failed to provide sufficient secrets".

@flokli
Copy link
Contributor

flokli commented Jul 6, 2018

As for the segfault currently happening on unstable:

nm-applet[6283]: double free or corruption (out)
systemd[2424]: network-manager-applet.service: Main process exited, code=killed, status=6/ABRT
systemd[2424]: network-manager-applet.service: Failed with result 'signal'.
NetworkManager[6829]: <error> [1530863104.5028] vpn-connection[0x1232480,d1c0d453-aef5-40ab-9bd1-22d436cb35e4,"olathoe",0]: Failed to request VPN secrets #3: No agents were available for this request.

@flokli
Copy link
Contributor

flokli commented Jul 6, 2018

services.xserver.desktopManager.gnome3.enable = true,
this means services.gnome3.gnome-keyring.enable is set to true.

@dtzWill
Copy link
Member

dtzWill commented Jul 6, 2018

LGTM.

Rebooted into this PR (you know what I mean) and VPN works as usual (on 18.03).

(don't know about the issues brought up, sorry)

@jtojnar
Copy link
Contributor Author

jtojnar commented Jul 7, 2018

I can confirm a segfault when trying to add any VPN connection using nm-applet in Xfce, no matter the presence of the gnome-keyring.

The following messages are logged to journal:

Jul 07 09:51:24 nixos xsession[865]: ** Message: 09:51:24.577: Cannot save connection due to error: Invalid setting VPN: remote
Jul 07 09:51:24 nixos kernel: .nm-connection-[1092]: segfault at 0 ip 00007f3858ee0700 sp 00007ffda8ef0988 error 4 in libgtk-3.so.0.2200.30[7f3858dc3000+6f9000]
Jul 07 09:51:24 nixos systemd[1]: Started Process Core Dump (PID 1099/UID 0).
Jul 07 09:51:25 nixos systemd-coredump[1100]: Process 1092 (.nm-connection-) of user 1000 dumped core.

And this is the stack trace:

#0  0x00007fe496da3700 in gtk_application_impl_window_added () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#1  0x00007fe496da0798 in gtk_application_window_added () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#2  0x00007fe4963b4a7d in g_closure_invoke () from /nix/store/dkq5gx9xpc7sx1k29kxjhwjk9dq4lkz8-glib-2.56.0/lib/libgobject-2.0.so.0
#3  0x00007fe4963c78de in signal_emit_unlocked_R () from /nix/store/dkq5gx9xpc7sx1k29kxjhwjk9dq4lkz8-glib-2.56.0/lib/libgobject-2.0.so.0
#4  0x00007fe4963cfec5 in g_signal_emit_valist () from /nix/store/dkq5gx9xpc7sx1k29kxjhwjk9dq4lkz8-glib-2.56.0/lib/libgobject-2.0.so.0
#5  0x00007fe4963d08df in g_signal_emit () from /nix/store/dkq5gx9xpc7sx1k29kxjhwjk9dq4lkz8-glib-2.56.0/lib/libgobject-2.0.so.0
#6  0x00000000004261fd in new_editor_cb (list=<optimized out>, new_editor=0x2935010, user_data=<optimized out>) at ../src/connection-editor/main.c:179
#7  0x00007fe4963b7b22 in g_cclosure_marshal_VOID__POINTERv () from /nix/store/dkq5gx9xpc7sx1k29kxjhwjk9dq4lkz8-glib-2.56.0/lib/libgobject-2.0.so.0
#8  0x00007fe4963b4cb6 in _g_closure_invoke_va () from /nix/store/dkq5gx9xpc7sx1k29kxjhwjk9dq4lkz8-glib-2.56.0/lib/libgobject-2.0.so.0
#9  0x00007fe4963d01af in g_signal_emit_valist () from /nix/store/dkq5gx9xpc7sx1k29kxjhwjk9dq4lkz8-glib-2.56.0/lib/libgobject-2.0.so.0
#10 0x00007fe4963d08df in g_signal_emit () from /nix/store/dkq5gx9xpc7sx1k29kxjhwjk9dq4lkz8-glib-2.56.0/lib/libgobject-2.0.so.0
#11 0x0000000000424641 in really_add_connection (_dummy=<optimized out>, connection=<optimized out>, user_data=0x2956360) at ../src/connection-editor/nm-connection-list.c:324
#12 0x0000000000418feb in new_connection_result (_dummy=<optimized out>, connection=0x281d4a0, canceled=0, error=0x0, user_data=0x2956360) at ../src/connection-editor/connection-helpers.c:562
#13 0x0000000000444e88 in vpn_type_result_func (_dummy=<optimized out>, connection=<optimized out>, user_data=0x281d320) at ../src/connection-editor/page-vpn.c:223
#14 0x0000000000418feb in new_connection_result (_dummy=<optimized out>, connection=0x281d4a0, canceled=0, error=0x0, user_data=0x281d320) at ../src/connection-editor/connection-helpers.c:562
#15 0x00000000004455f1 in vpn_connection_new (_dummy=_dummy@entry=0x0, parent=parent@entry=0x2956360, detail=<optimized out>, detail@entry=0x2afb680 "org.freedesktop.NetworkManager.openvpn", 
    detail_data=detail_data@entry=0x7ffdc652acd0, connection=<optimized out>, connection@entry=0x0, client=client@entry=0x2992680, result_func=0x418f3d <new_connection_result>, user_data=0x2818cc0)
    at ../src/connection-editor/page-vpn.c:322
#16 0x000000000041aea7 in new_connection_of_type (parent_window=parent_window@entry=0x2956360, detail=detail@entry=0x2afb680 "org.freedesktop.NetworkManager.openvpn", 
    detail_data=detail_data@entry=0x7ffdc652acd0, connection=connection@entry=0x0, client=client@entry=0x2992680, new_func=0x4454b7 <vpn_connection_new>, result_func=0x444e6a <vpn_type_result_func>, 
    user_data=0x281d320) at ../src/connection-editor/connection-helpers.c:583
#17 0x000000000041b284 in new_connection_dialog_full (parent_window=parent_window@entry=0x2956360, client=client@entry=0x2992680, primary_label=<optimized out>, 
    secondary_label=secondary_label@entry=0x45c818 "Select the type of VPN you wish to use for the new connection. If the type of VPN connection you wish to create does not appear in the list, you may not have the correct VPN plugin installed.", type_filter_func=type_filter_func@entry=0x444e97 <vpn_type_filter_func>, result_func=result_func@entry=0x444e6a <vpn_type_result_func>, user_data=0x281d320)
    at ../src/connection-editor/connection-helpers.c:689
#18 0x00000000004456ad in vpn_connection_new (_dummy=_dummy@entry=0x0, parent=parent@entry=0x2956360, detail=detail@entry=0x0, detail_data=detail_data@entry=0x0, connection=connection@entry=0x0, 
    client=client@entry=0x2992680, result_func=0x418f3d <new_connection_result>, user_data=0x281d300) at ../src/connection-editor/page-vpn.c:258
#19 0x000000000041aea7 in new_connection_of_type (parent_window=0x2956360, detail=detail@entry=0x0, detail_data=detail_data@entry=0x0, connection=connection@entry=0x0, client=client@entry=0x2992680, 
    new_func=new_func@entry=0x4454b7 <vpn_connection_new>, result_func=0x42455b <really_add_connection>, user_data=0x2956360) at ../src/connection-editor/connection-helpers.c:583
#20 0x0000000000425715 in nm_connection_list_create (list=0x2956360, ctype=<optimized out>, detail=0x0, import_filename=import_filename@entry=0x0) at ../src/connection-editor/nm-connection-list.c:1049
#21 0x0000000000425ffc in idle_create_connection (user_data=0x7fe478040920) at ../src/connection-editor/main.c:59
#22 0x00007fe4960dadb5 in g_main_context_dispatch () from /nix/store/dkq5gx9xpc7sx1k29kxjhwjk9dq4lkz8-glib-2.56.0/lib/libglib-2.0.so.0
#23 0x00007fe4960db180 in g_main_context_iterate.isra () from /nix/store/dkq5gx9xpc7sx1k29kxjhwjk9dq4lkz8-glib-2.56.0/lib/libglib-2.0.so.0
#24 0x00007fe4960db20c in g_main_context_iteration () from /nix/store/dkq5gx9xpc7sx1k29kxjhwjk9dq4lkz8-glib-2.56.0/lib/libglib-2.0.so.0
#25 0x00007fe49669fc0a in g_application_run () from /nix/store/dkq5gx9xpc7sx1k29kxjhwjk9dq4lkz8-glib-2.56.0/lib/libgio-2.0.so.0
#26 0x00000000004263a2 in main (argc=<optimized out>, argv=<optimized out>) at ../src/connection-editor/main.c:302
System configuration
{ config, pkgs, ... }:

with { inherit (pkgs) enableDebugging; };
{
  environment.systemPackages = with pkgs; [
    gdb
  ];

  nixpkgs.config.packageOverrides = super: {
    networkmanager = enableDebugging super.networkmanager;
    networkmanagerapplet = enableDebugging super.networkmanagerapplet;
  };


  networking.networkmanager.enable = true;
  services.xserver.enable = true;
  services.xserver.libinput.enable = true;
  services.xserver.displayManager.lightdm.enable = true;
  services.xserver.desktopManager.xfce.enable = true;
  # services.gnome3.gnome-keyring.enable = true;
  services.openssh.enable = true;
  environment.enableDebugInfo = true;
  systemd.coredump.enable = true;

  users.extraUsers.guest = {
    isNormalUser = true;
    uid = 1000;
    initialPassword = "";
    extraGroups = ["users" "wheel" "networkmanager"];
    openssh.authorizedKeys.keys = [...];
  };
}

@jtojnar
Copy link
Contributor Author

jtojnar commented Jul 7, 2018

Incredibly, the dialogue is displayed fine when nm-connection-editor is running. Opened an upstream issue https://gitlab.gnome.org/GNOME/network-manager-applet/issues/9

@dtzWill
Copy link
Member

dtzWill commented Jul 9, 2018

It's strange to me the problem occurs for me on master-ish--same double-free AFAICT-- but is fixed by either this PR or #43123. In neither situation do I have the connection editor open, although the dialog does display briefly (it always has for me, including on 18.03 and earlier).

I do tend to issue nm c up uiuc to initiate my VPN connection (named 'UIUC' for reasons that I'm sure are very mysterious :D), don't know if that matters?

Hope this helps...

(I do have nm-applet running, but not the connection editor, FWIW)

@FRidh FRidh added this to the 18.09 milestone Jul 11, 2018
@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: networkmanager, networkmanager-openvpn

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: networkmanager, networkmanager-openvpn

Partial log (click to expand)

shrinking /nix/store/1n119sbi0d3wvcf482vharyx2blbd95m-NetworkManager-openvpn-gnome-1.8.4/libexec/nm-openvpn-service
shrinking /nix/store/1n119sbi0d3wvcf482vharyx2blbd95m-NetworkManager-openvpn-gnome-1.8.4/lib/NetworkManager/libnm-openvpn-properties.so
shrinking /nix/store/1n119sbi0d3wvcf482vharyx2blbd95m-NetworkManager-openvpn-gnome-1.8.4/lib/NetworkManager/libnm-vpn-plugin-openvpn-editor.so
shrinking /nix/store/1n119sbi0d3wvcf482vharyx2blbd95m-NetworkManager-openvpn-gnome-1.8.4/lib/NetworkManager/libnm-vpn-plugin-openvpn.so
strip is /nix/store/4qvrxzxa535y8304mk195x50b6p9607d-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/1n119sbi0d3wvcf482vharyx2blbd95m-NetworkManager-openvpn-gnome-1.8.4/lib  /nix/store/1n119sbi0d3wvcf482vharyx2blbd95m-NetworkManager-openvpn-gnome-1.8.4/libexec
patching script interpreter paths in /nix/store/1n119sbi0d3wvcf482vharyx2blbd95m-NetworkManager-openvpn-gnome-1.8.4
checking for references to /build in /nix/store/1n119sbi0d3wvcf482vharyx2blbd95m-NetworkManager-openvpn-gnome-1.8.4...
/nix/store/yasvph0qbn2hvn05ml81lgbjyaanh89l-network-manager-1.12.0
/nix/store/1n119sbi0d3wvcf482vharyx2blbd95m-NetworkManager-openvpn-gnome-1.8.4

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: networkmanager, networkmanager-openvpn

Partial log (click to expand)

shrinking /nix/store/bs7z9sv16a1i4pc6y37702ql2ia33hvx-NetworkManager-openvpn-gnome-1.8.4/lib/NetworkManager/libnm-vpn-plugin-openvpn.so
shrinking /nix/store/bs7z9sv16a1i4pc6y37702ql2ia33hvx-NetworkManager-openvpn-gnome-1.8.4/libexec/nm-openvpn-auth-dialog
shrinking /nix/store/bs7z9sv16a1i4pc6y37702ql2ia33hvx-NetworkManager-openvpn-gnome-1.8.4/libexec/nm-openvpn-service-openvpn-helper
shrinking /nix/store/bs7z9sv16a1i4pc6y37702ql2ia33hvx-NetworkManager-openvpn-gnome-1.8.4/libexec/nm-openvpn-service
strip is /nix/store/0pjsgkxz0rp5baycq5sp2s72lrr5q9sg-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/bs7z9sv16a1i4pc6y37702ql2ia33hvx-NetworkManager-openvpn-gnome-1.8.4/lib  /nix/store/bs7z9sv16a1i4pc6y37702ql2ia33hvx-NetworkManager-openvpn-gnome-1.8.4/libexec
patching script interpreter paths in /nix/store/bs7z9sv16a1i4pc6y37702ql2ia33hvx-NetworkManager-openvpn-gnome-1.8.4
checking for references to /build in /nix/store/bs7z9sv16a1i4pc6y37702ql2ia33hvx-NetworkManager-openvpn-gnome-1.8.4...
/nix/store/g1p07904masmxqkkwbxng8ydgncm7n0z-network-manager-1.12.0
/nix/store/bs7z9sv16a1i4pc6y37702ql2ia33hvx-NetworkManager-openvpn-gnome-1.8.4

@jtojnar jtojnar merged commit 5457be8 into NixOS:master Jul 13, 2018
@jtojnar jtojnar deleted the nm-1.12 branch July 13, 2018 18:46
@dtzWill
Copy link
Member

dtzWill commented Jul 16, 2018

Incredibly, the dialogue is displayed fine when nm-connection-editor is running. Opened an upstream issue https://gitlab.gnome.org/GNOME/network-manager-applet/issues/9

Looks like this was fixed upstream? Would it make sense to pick this patch to address the issue (while waiting for next release)?

@jtojnar
Copy link
Contributor Author

jtojnar commented Jul 16, 2018

@dtzWill
Copy link
Member

dtzWill commented Jul 16, 2018

@dtzWill I already did that before merging https://github.com/NixOS/nixpkgs/pull/43087/files#diff-f8870604db2c9e88b1a23bac47f7dfc9R20

Haha of course! Awesome, my mistake :D.

@jtojnar
Copy link
Contributor Author

jtojnar commented Jul 23, 2018

@flokli
Copy link
Contributor

flokli commented Jul 24, 2018

@jtojnar the first one is already covered by #44037.
As for the second one, I couldn't reproduce here - my nm-applet show's a "Configure VPN…" below the "VPN Connections" menu item, which does open nm-connection-editor, from which I seem to be able to import a new VPN connection the file selection dialog without it flashing and exiting immediatly.

@jtojnar
Copy link
Contributor Author

jtojnar commented Jul 24, 2018

Yes, the import menu item is only shown when there are no VPNs configured (e.g. in VM).

@flokli
Copy link
Contributor

flokli commented Jul 24, 2018

got it - will update above PR to include these changes as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants