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 777831 - nm-online returns success before wlan is connected
nm-online returns success before wlan is connected
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
1.4.x
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-01-27 13:37 UTC by uwe+gnome
Modified: 2017-02-17 19:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
journalctl -alb with NetworkManager --log-level=TRACE (461.39 KB, text/x-vhdl)
2017-01-27 13:37 UTC, uwe+gnome
Details
journalctl -alb with NetworkManager --log-level=TRACE from th/device-pending-action-bgo777831 (466.72 KB, text/plain)
2017-01-29 16:54 UTC, uwe+gnome
Details
journalctl -alb with NetworkManager --log-level=TRACE. Debian package for 1.6.0-1 + 256bfe54e7ef..85140df1170b (457.49 KB, text/plain)
2017-02-10 20:13 UTC, uwe+gnome
Details

Description uwe+gnome 2017-01-27 13:37:04 UTC
Created attachment 344418 [details]
journalctl -alb with NetworkManager --log-level=TRACE

This is related to Debian bug #771441 (https://bugs.debian.org/771441).

tftpd is started to early, in it's init.d script it has:

# Required-Start:       $local_fs $remote_fs $syslog $network

and it is really only started once NetworkManager-wait-online.service is complete but still the output of `ip a` is:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: wlp2s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 4e:e6:d3:b5:49:da brd ff:ff:ff:ff:ff:ff

The problem seems to be that nm-online -s -q --timeout returns before the wlan interface is in connected state.
Comment 1 uwe+gnome 2017-01-27 14:00:31 UTC
Just upgraded to network-manager 1.6.0-1, issue still remains
Comment 3 uwe+gnome 2017-01-27 19:03:13 UTC
I tested the debian packages mbiebl provided:


$ dpkg -l network-manager
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  network-manage 1.6.0-2~test amd64        network management framework (dae

I assume that this includes the above patches, but tftpd still fails to start.

Best regards
Uwe
Comment 4 Thomas Haller 2017-01-28 09:59:13 UTC
(In reply to uwe+gnome from comment #3)
> I assume that this includes the above patches, but tftpd still fails to
> start.

I don't know whether the package includes the patches, but if it does and it doesn't fix the issue, a logfile would be helpful.
Comment 5 Michael Biebl 2017-01-29 14:19:28 UTC
Version 1.6.0-2~test1 includes the patches from th/device-pending-action-bgo777831

Uwe, can you send a new log file?
Comment 6 uwe+gnome 2017-01-29 16:54:34 UTC
Created attachment 344487 [details]
journalctl -alb with NetworkManager --log-level=TRACE from th/device-pending-action-bgo777831
Comment 7 Thomas Haller 2017-02-03 15:45:48 UTC
branch extended... should fix the issue now.

(while at it, I changed several other things, so the resulting branch is rather large)
Comment 8 Michael Biebl 2017-02-04 20:40:57 UTC
it's overly 50 patches large, so it's not obvious which specific commits to cherry-pick for nm-1-6 which fixes this bug report. Thomas, could you list the commits I need?
Comment 9 Thomas Haller 2017-02-04 21:34:23 UTC
(In reply to Michael Biebl from comment #8)
> it's overly 50 patches large, so it's not obvious which specific commits to
> cherry-pick for nm-1-6 which fixes this bug report. Thomas, could you list
> the commits I need?

it's only on-review at this point. I would suggest to wait until the relevant parts are on nm-1-6 branch. Is that ok?
Comment 10 Michael Biebl 2017-02-05 00:04:24 UTC
(In reply to Thomas Haller from comment #9)
> (In reply to Michael Biebl from comment #8)
> > it's overly 50 patches large, so it's not obvious which specific commits to
> > cherry-pick for nm-1-6 which fixes this bug report. Thomas, could you list
> > the commits I need?
> 
> it's only on-review at this point. I would suggest to wait until the
> relevant parts are on nm-1-6 branch. Is that ok?

Well, I can certainly wait. I was just trying to prepare a test package for Uwe, so having a minimal patch set would have been nice
Comment 11 Lubomir Rintel 2017-02-08 10:02:26 UTC
Looks generally fine. In general, some commit messages/comments may need improvement:

> a7a288b shared: add NM_CACHED_QUARK() macro

Missing a comment about what does the macro do.
Missing explanation why is it useful in commit message.

> a4b4466 core/trivial: use define for GObject property name NM_SUPPLICANT_INTERFACE_SCANNING

> 7aef7cf device: add pending-action "recheck-available"
> When we have a recheck-available scheduled, we clearly should not yet
> declare startup-complete.

Not clear to me. Why?

> bfb30c7 device: inline device helper structs QueuedState and PingInfo

Why?
Comment 12 Thomas Haller 2017-02-08 12:13:14 UTC
(In reply to Lubomir Rintel from comment #11)
> Looks generally fine. In general, some commit messages/comments may need
> improvement:

thanks. I improved commit messages of all mentioned.
Comment 14 uwe+gnome 2017-02-10 20:13:14 UTC
Created attachment 345481 [details]
journalctl -alb with NetworkManager --log-level=TRACE. Debian package for 1.6.0-1 + 256bfe54e7ef..85140df1170b

I did something like this to create the package:

debcheckout network-manager
cd network-manager
dquilt push -a
dquilt new device-pending-action-bgo777831.patch
git diff 256bfe54e7ef 85140df1170b | dquilt fold
dquilt refresh
dch -l ukl
sbuild

Then I installed the resulting packages (not all of them, just gir1.2-networkmanager-1.0 libnm-glib4 libnm-util2 libnm0 network-manager)
Comment 15 Thomas Haller 2017-02-14 15:06:33 UTC
(In reply to uwe+gnome from comment #14)
> Created attachment 345481 [details]
> journalctl -alb with NetworkManager --log-level=TRACE. Debian package for
> 1.6.0-1 + 256bfe54e7ef..85140df1170b
> 
> I did something like this to create the package:
> 
> debcheckout network-manager
> cd network-manager
> dquilt push -a
> dquilt new device-pending-action-bgo777831.patch
> git diff 256bfe54e7ef 85140df1170b | dquilt fold
> dquilt refresh
> dch -l ukl
> sbuild
> 
> Then I installed the resulting packages (not all of them, just
> gir1.2-networkmanager-1.0 libnm-glib4 libnm-util2 libnm0 network-manager)

A fix for this should be on
https://cgit.freedesktop.org/NetworkManager/NetworkManager/log/?h=th/device-wifi-wait-for-scan-bgo770938
for bug 770938.

commit:
  "device/wifi: mark the device to busy while supplicant is in scanning state"
Comment 16 Michael Biebl 2017-02-16 22:26:33 UTC
Uwe reported that his problem is still unfixed with 1.6.2, so we should reopen the bug report.
Comment 19 uwe+gnome 2017-02-17 19:44:24 UTC
I tested Debian-Package 1.6.0-1 + 

git diff 1.6.0..803e1a04bb0a35b096c1f17bdd0d1abd41f0b863 | filterdiff -p 1 -xcontrib/*

and the issue is gone for me.

Thanks
Uwe