Send connman mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."
Today's Topics:
1. Re: BUG: file descriptor leak in DHCPv6 (Richard Genoud)
2. Re: Predefined hostname in dhcp requests (Marco Gigante)
----------------------------------------------------------------------
Message: 1
Date: Tue, 28 Nov 2017 11:08:59 +0100
From: Richard Genoud <[email protected]>
To: Daniel Wagner <[email protected]>
Cc: [email protected]
Subject: Re: BUG: file descriptor leak in DHCPv6
Message-ID: <[email protected]>
Content-Type: text/plain; charset="UTF-8"
Hi Daniel,
Le dimanche 26 novembre 2017 ? 20:39 +0100, Daniel Wagner a ?crit?:
> Hi Richard,
>
> > > Anyway, I'll send a patch which fixes at a leak in the stats
> > > file. Can
> > > you check if you still see the leak?
> >
> > Unfortunately, I still see an FD leak with this patch applied.
>
> I can't reproduce with my setup. So the patch is fixing the leak I
> see?
> but not the one you observe. Or did it get slightly better (less fd
> leaks)?
>
> Do you have an IPv6 enable network? Currently mine setup lacks it.
>
> Thanks,
> Daniel
To answer your questions :
- With you patch, I see less opened fd (but they were not leaked by
plugging/unplugging the ethernet cable)
- I do not have an IPv6 enable network
I restarted some tests, and I discovered that the fd leaks append only
with a specific configuration.
That's why you didn't saw them !
To reproduce the fd leaks, you'll need a tethering capable wifi usb
device, or a usb gadget.
And the specific configuration can be created like this:
mkdir -p /etc/connman
cat > /etc/connman/main.conf << EOF
[General]
PersistentTetheringMode=true
EOF
# without PersistentTetheringMode=true, there's no fd leak.
rm -fr /var/lib/connman
mkdir -p /var/lib/connman
cat > /var/lib/connman/settings << EOF
[global]
OfflineMode=false
[Wired]
Enable=true
Tethering=false
[Gadget]
Enable=true
Tethering=true
[WiFi]
Enable=true
Tethering=true
Tethering.Identifier=testconnmand
Tethering.Passphrase=test password, really hard to guess
EOF
# without [gadget or wifi].enable=true and [gadget or wifi].tethering=true,
there's no fd leak
# The USB gadget cable may be plugged or not, it doesn't change the leak
# The Wifi usb device must be plugged, otherwise, no fd leaks
connmand -n & while [ true ]; do ls -l /proc/$(pidof connmand)/fd/ | wc -l ;
sleep 1; done
4
connmand[23974]: Connection Manager version 1.35
connmand[23974]: Failed to bind UDP listener socket
connmand[23974]: Failed to bind UDP listener socket
connmand[23974]: Couldn't create listener for index 1 err -5
connmand[23974]: lo {newlink} index 1 address 00:00:00:00:00:00 mtu 65536
connmand[23974]: lo {newlink} index 1 operstate 0 <UNKNOWN>
connmand[23974]: eth0 {create} index 2 type 1 <ETHER>
connmand[23974]: eth0 {RX} 1927 packets 225044 bytes
connmand[23974]: eth0 {TX} 3985 packets 456748 bytes
connmand[23974]: eth0 {update} flags 36866 <DOWN>
connmand[23974]: eth0 {newlink} index 2 address 00:04:A3:D2:A7:EF mtu 1500
connmand[23974]: eth0 {newlink} index 2 operstate 2 <DOWN>
connmand[23974]: Adding interface eth0 [ ethernet ]
connmand[23974]: usb0 {create} index 3 type 1 <ETHER>
connmand[23974]: usb0 {RX} 3992 packets 2133551 bytes
connmand[23974]: usb0 {TX} 1994 packets 382577 bytes
connmand[23974]: usb0 {update} flags 36866 <DOWN>
connmand[23974]: usb0 {newlink} index 3 address F6:A2:A6:A3:44:4D mtu 1500
connmand[23974]: usb0 {newlink} index 3 operstate 2 <DOWN>
connmand[23974]: Adding interface usb0 [ gadget ]
connmand[23974]: Failed to bind UDP listener socket
connmand[23974]: Failed to bind UDP listener socket
connmand[23974]: Couldn't create listener for index 16 err -5
connmand[23974]: Can't add listener tether to DNS proxy
connmand[23974]: DHCP server: option_code 1 option_value 255.255.255.0
connmand[23974]: DHCP server: option_code 3 option_value 192.168.0.1
connmand[23974]: wlan0 {create} index 12 type 1 <ETHER>
connmand[23974]: wlan0 {update} flags 36866 <DOWN>
connmand[23974]: wlan0 {newlink} index 12 address E8:94:F6:15:5B:37 mtu 1500
connmand[23974]: wlan0 {newlink} index 12 operstate 2 <DOWN>
connmand[23974]: Adding interface wlan0 [ wifi ]
connmand[23974]: eth0 {RX} 1927 packets 225044 bytes
connmand[23974]: eth0 {TX} 3985 packets 456748 bytes
connmand[23974]: eth0 {update} flags 36867 <UP>
connmand[23974]: eth0 {newlink} index 2 address 00:04:A3:D2:A7:EF mtu 1500
connmand[23974]: eth0 {newlink} index 2 operstate 2 <DOWN>
connmand[23974]: eth0 {add} route ff00:: gw :: scope 0 <UNIVERSE>
connmand[23974]: eth0 {add} route fe80:: gw :: scope 0 <UNIVERSE>
connmand[23974]: eth0 {RX} 1927 packets 225044 bytes
connmand[23974]: eth0 {TX} 3985 packets 456748 bytes
connmand[23974]: eth0 {update} flags 102467 <UP,RUNNING,LOWER_UP>
connmand[23974]: eth0 {newlink} index 2 address 00:04:A3:D2:A7:EF mtu 1500
connmand[23974]: eth0 {newlink} index 2 operstate 6 <UP>
connmand[23974]: Skipping disconnect of carrier, network is connecting.
connmand[23974]: usb0 {RX} 3992 packets 2133551 bytes
connmand[23974]: usb0 {TX} 1994 packets 382577 bytes
connmand[23974]: usb0 {update} flags 102467 <UP,RUNNING,LOWER_UP>
connmand[23974]: usb0 {newlink} index 3 address F6:A2:A6:A3:44:4D mtu 1500
connmand[23974]: usb0 {newlink} index 3 operstate 6 <UP>
connmand[23974]: usb0 {add} route ff00:: gw :: scope 0 <UNIVERSE>
connmand[23974]: usb0 {add} route fe80:: gw :: scope 0 <UNIVERSE>
connmand[23974]: tether {create} index 16 type 1 <ETHER>
connmand[23974]: tether {update} flags 4098 <DOWN>
connmand[23974]: tether {newlink} index 16 address AE:E3:37:9E:62:95 mtu 1500
connmand[23974]: tether {newlink} index 16 operstate 2 <DOWN>
connmand[23974]: Cannot create /var/run/connman/resolv.conf falling back to
/etc/resolv.conf
DHCPv6 msg send failed (index 2): Cannot assign requested address
connmand[23974]: tether {add} address 192.168.0.1/24 label tether family 2
connmand[23974]: ntp: adjust (slew): +0.024202 sec
connmand[23974]: tether {update} flags 102467 <UP,RUNNING,LOWER_UP>
connmand[23974]: tether {newlink} index 16 address AE:E3:37:9E:62:95 mtu 1500
connmand[23974]: tether {newlink} index 16 operstate 0 <UNKNOWN>
connmand[23974]: tether {add} route 192.168.0.0 gw 0.0.0.0 scope 253 <LINK>
connmand[23974]: tether {add} route ff00:: gw :: scope 0 <UNIVERSE>
connmand[23974]: tether {add} route fe80:: gw :: scope 0 <UNIVERSE>
connmand[23974]: usb0 {RX} 3992 packets 2133551 bytes
connmand[23974]: usb0 {TX} 1995 packets 382667 bytes
connmand[23974]: usb0 {newlink} index 3 address F6:A2:A6:A3:44:4D mtu 1500
connmand[23974]: usb0 {newlink} index 3 operstate 6 <UP>
connmand[23974]: usb0 {RX} 3992 packets 2133551 bytes
connmand[23974]: usb0 {TX} 1995 packets 382667 bytes
connmand[23974]: usb0 {newlink} index 3 address F6:A2:A6:A3:44:4D mtu 1500
connmand[23974]: usb0 {newlink} index 3 operstate 6 <UP>
connmand[23974]: tether {newlink} index 16 address AE:E3:37:9E:62:95 mtu 1500
connmand[23974]: tether {newlink} index 16 operstate 0 <UNKNOWN>
connmand[23974]: usb0 {newlink} index 3 address F6:A2:A6:A3:44:4D mtu 1500
connmand[23974]: usb0 {newlink} index 3 operstate 6 <UP>
connmand[23974]: usb0 {newlink} index 3 address F6:A2:A6:A3:44:4D mtu 1500
connmand[23974]: usb0 {newlink} index 3 operstate 6 <UP>
connmand[23974]: usb0 {newlink} index 3 address F6:A2:A6:A3:44:4D mtu 1500
connmand[23974]: usb0 {newlink} index 3 operstate 6 <UP>
connmand[23974]: tether {newlink} index 16 address F6:A2:A6:A3:44:4D mtu 1500
connmand[23974]: tether {newlink} index 16 operstate 0 <UNKNOWN>
connmand[23974]: eth0 {add} address 192.168.7.207/24 label eth0 family 2
connmand[23974]: Skipping server 192.168.7.1 KoD code RATE
connmand[23974]: eth0 {add} route 192.168.7.0 gw 0.0.0.0 scope 253 <LINK>
connmand[23974]: eth0 {add} route 192.168.7.1 gw 0.0.0.0 scope 253 <LINK>
connmand[23974]: eth0 {add} route 8.8.8.8 gw 192.168.7.1 scope 0 <UNIVERSE>
connmand[23974]: eth0 {add} route 0.0.0.0 gw 192.168.7.1 scope 0 <UNIVERSE>
connmand[23974]: eth0 {add} route 0.0.0.0 gw 192.168.7.1 scope 0 <UNIVERSE>
connmand[23974]: eth0 {add} route 8.8.8.8 gw 192.168.7.1 scope 0 <UNIVERSE>
connmand[23974]: tether {add} route 192.168.0.0 gw 0.0.0.0 scope 253 <LINK>
connmand[23974]: eth0 {add} route 192.168.7.0 gw 0.0.0.0 scope 253 <LINK>
connmand[23974]: eth0 {add} route 192.168.7.1 gw 0.0.0.0 scope 253 <LINK>
connmand[23974]: eth0 {add} route 212.227.81.55 gw 192.168.7.1 scope 0
<UNIVERSE>
connmand[23974]: eth0 {del} route 212.227.81.55 gw 192.168.7.1 scope 0
<UNIVERSE>
21
connmand[23974]: tether {RX} 0 packets 0 bytes
connmand[23974]: tether {TX} 3 packets 306 bytes
connmand[23974]: tether {newlink} index 16 address F6:A2:A6:A3:44:4D mtu 1500
connmand[23974]: tether {newlink} index 16 operstate 6 <UP>
21
21
21
20
connmand[23974]: eth0 {RX} 1937 packets 226122 bytes
connmand[23974]: eth0 {TX} 4013 packets 459649 bytes
connmand[23974]: eth0 {update} flags 36867 <UP>
connmand[23974]: eth0 {newlink} index 2 address 00:04:A3:D2:A7:EF mtu 1500
connmand[23974]: eth0 {newlink} index 2 operstate 2 <DOWN>
connmand[23974]: eth0 {del} address 192.168.7.207/24 label eth0
connmand[23974]: eth0 {del} route 192.168.7.0 gw 0.0.0.0 scope 253 <LINK>
connmand[23974]: eth0 {del} route fe80:: gw :: scope 0 <UNIVERSE>
connmand[23974]: eth0 {del} route ff00:: gw :: scope 0 <UNIVERSE>
17
DHCPv6 msg send failed: Network is unreachable
17
17
connmand[23974]: eth0 {add} route ff00:: gw :: scope 0 <UNIVERSE>
connmand[23974]: eth0 {add} route fe80:: gw :: scope 0 <UNIVERSE>
connmand[23974]: eth0 {RX} 1937 packets 226122 bytes
connmand[23974]: eth0 {TX} 4013 packets 459649 bytes
connmand[23974]: eth0 {update} flags 102467 <UP,RUNNING,LOWER_UP>
connmand[23974]: eth0 {newlink} index 2 address 00:04:A3:D2:A7:EF mtu 1500
connmand[23974]: eth0 {newlink} index 2 operstate 6 <UP>
connmand[23974]: Skipping disconnect of carrier, network is connecting.
DHCPv6 msg send failed (index 2): Cannot assign requested address
connmand[23974]: eth0 {add} address 192.168.7.207/24 label eth0 family 2
connmand[23974]: eth0 {add} route 192.168.7.0 gw 0.0.0.0 scope 253 <LINK>
connmand[23974]: eth0 {add} route 192.168.7.1 gw 0.0.0.0 scope 253 <LINK>
connmand[23974]: eth0 {add} route 8.8.8.8 gw 192.168.7.1 scope 0 <UNIVERSE>
connmand[23974]: eth0 {add} route 0.0.0.0 gw 192.168.7.1 scope 0 <UNIVERSE>
connmand[23974]: eth0 {add} route 212.227.81.55 gw 192.168.7.1 scope 0
<UNIVERSE>
connmand[23974]: eth0 {del} route 212.227.81.55 gw 192.168.7.1 scope 0
<UNIVERSE>
22
DHCPv6 msg send failed (index 2): Cannot assign requested address
22
22
22
21
21
connmand[23974]: eth0 {RX} 1946 packets 227124 bytes
connmand[23974]: eth0 {TX} 4038 packets 462348 bytes
connmand[23974]: eth0 {update} flags 36867 <UP>
connmand[23974]: eth0 {newlink} index 2 address 00:04:A3:D2:A7:EF mtu 1500
connmand[23974]: eth0 {newlink} index 2 operstate 2 <DOWN>
connmand[23974]: eth0 {del} address 192.168.7.207/24 label eth0
connmand[23974]: eth0 {del} route 192.168.7.0 gw 0.0.0.0 scope 253 <LINK>
connmand[23974]: eth0 {del} route fe80:: gw :: scope 0 <UNIVERSE>
connmand[23974]: eth0 {del} route ff00:: gw :: scope 0 <UNIVERSE>
18
DHCPv6 msg send failed: Network is unreachable
18
18
connmand[23974]: eth0 {add} route ff00:: gw :: scope 0 <UNIVERSE>
connmand[23974]: eth0 {add} route fe80:: gw :: scope 0 <UNIVERSE>
connmand[23974]: eth0 {RX} 1946 packets 227124 bytes
connmand[23974]: eth0 {TX} 4038 packets 462348 bytes
connmand[23974]: eth0 {update} flags 102467 <UP,RUNNING,LOWER_UP>
connmand[23974]: eth0 {newlink} index 2 address 00:04:A3:D2:A7:EF mtu 1500
connmand[23974]: eth0 {newlink} index 2 operstate 6 <UP>
19
connmand[23974]: Skipping disconnect of carrier, network is connecting.
DHCPv6 msg send failed (index 2): Cannot assign requested address
connmand[23974]: eth0 {add} address 192.168.7.207/24 label eth0 family 2
connmand[23974]: eth0 {add} route 192.168.7.0 gw 0.0.0.0 scope 253 <LINK>
connmand[23974]: eth0 {add} route 192.168.7.1 gw 0.0.0.0 scope 253 <LINK>
connmand[23974]: eth0 {add} route 8.8.8.8 gw 192.168.7.1 scope 0 <UNIVERSE>
connmand[23974]: eth0 {add} route 0.0.0.0 gw 192.168.7.1 scope 0 <UNIVERSE>
connmand[23974]: eth0 {add} route 212.227.81.55 gw 192.168.7.1 scope 0
<UNIVERSE>
connmand[23974]: eth0 {del} route 212.227.81.55 gw 192.168.7.1 scope 0
<UNIVERSE>
23
23
connmand[23974]: eth0 {RX} 1955 packets 228126 bytes
connmand[23974]: eth0 {TX} 4061 packets 464867 bytes
connmand[23974]: eth0 {update} flags 36867 <UP>
connmand[23974]: eth0 {newlink} index 2 address 00:04:A3:D2:A7:EF mtu 1500
connmand[23974]: eth0 {newlink} index 2 operstate 2 <DOWN>
connmand[23974]: eth0 {del} address 192.168.7.207/24 label eth0
connmand[23974]: eth0 {del} route 192.168.7.0 gw 0.0.0.0 scope 253 <LINK>
connmand[23974]: eth0 {del} route fe80:: gw :: scope 0 <UNIVERSE>
connmand[23974]: eth0 {del} route ff00:: gw :: scope 0 <UNIVERSE>
20
19
19
DHCPv6 msg send failed: Network is unreachable
DHCPv6 msg send failed: Network is unreachable
19
connmand[23974]: eth0 {add} route ff00:: gw :: scope 0 <UNIVERSE>
connmand[23974]: eth0 {add} route fe80:: gw :: scope 0 <UNIVERSE>
connmand[23974]: eth0 {RX} 1955 packets 228126 bytes
connmand[23974]: eth0 {TX} 4061 packets 464867 bytes
connmand[23974]: eth0 {update} flags 102467 <UP,RUNNING,LOWER_UP>
connmand[23974]: eth0 {newlink} index 2 address 00:04:A3:D2:A7:EF mtu 1500
connmand[23974]: eth0 {newlink} index 2 operstate 6 <UP>
connmand[23974]: Skipping disconnect of carrier, network is connecting.
DHCPv6 msg send failed (index 2): Cannot assign requested address
connmand[23974]: eth0 {add} address 192.168.7.207/24 label eth0 family 2
connmand[23974]: eth0 {add} route 192.168.7.0 gw 0.0.0.0 scope 253 <LINK>
connmand[23974]: eth0 {add} route 192.168.7.1 gw 0.0.0.0 scope 253 <LINK>
connmand[23974]: eth0 {add} route 8.8.8.8 gw 192.168.7.1 scope 0 <UNIVERSE>
connmand[23974]: eth0 {add} route 0.0.0.0 gw 192.168.7.1 scope 0 <UNIVERSE>
connmand[23974]: eth0 {add} route 212.227.81.55 gw 192.168.7.1 scope 0
<UNIVERSE>
connmand[23974]: eth0 {del} route 212.227.81.55 gw 192.168.7.1 scope 0
<UNIVERSE>
24
DHCPv6 msg send failed (index 2): Cannot assign requested address
24
connmand[23974]: Skipping server 192.168.7.1 KoD code RATE
23
23
connmand[23974]: eth0 {RX} 1966 packets 229220 bytes
connmand[23974]: eth0 {TX} 4088 packets 467670 bytes
connmand[23974]: eth0 {update} flags 36867 <UP>
connmand[23974]: eth0 {newlink} index 2 address 00:04:A3:D2:A7:EF mtu 1500
connmand[23974]: eth0 {newlink} index 2 operstate 2 <DOWN>
connmand[23974]: eth0 {del} address 192.168.7.207/24 label eth0
connmand[23974]: eth0 {del} route 192.168.7.0 gw 0.0.0.0 scope 253 <LINK>
connmand[23974]: eth0 {del} route fe80:: gw :: scope 0 <UNIVERSE>
connmand[23974]: eth0 {del} route ff00:: gw :: scope 0 <UNIVERSE>
20
20
DHCPv6 msg send failed: Network is unreachable
DHCPv6 msg send failed: Network is unreachable
20
20
connmand[23974]: eth0 {add} route ff00:: gw :: scope 0 <UNIVERSE>
connmand[23974]: eth0 {add} route fe80:: gw :: scope 0 <UNIVERSE>
connmand[23974]: eth0 {RX} 1966 packets 229220 bytes
connmand[23974]: eth0 {TX} 4088 packets 467670 bytes
connmand[23974]: eth0 {update} flags 102467 <UP,RUNNING,LOWER_UP>
connmand[23974]: eth0 {newlink} index 2 address 00:04:A3:D2:A7:EF mtu 1500
connmand[23974]: eth0 {newlink} index 2 operstate 6 <UP>
connmand[23974]: Skipping disconnect of carrier, network is connecting.
DHCPv6 msg send failed (index 2): Cannot assign requested address
connmand[23974]: eth0 {add} address 192.168.7.207/24 label eth0 family 2
connmand[23974]: eth0 {add} route 192.168.7.0 gw 0.0.0.0 scope 253 <LINK>
connmand[23974]: eth0 {add} route 192.168.7.1 gw 0.0.0.0 scope 253 <LINK>
connmand[23974]: eth0 {add} route 8.8.8.8 gw 192.168.7.1 scope 0 <UNIVERSE>
connmand[23974]: eth0 {add} route 0.0.0.0 gw 192.168.7.1 scope 0 <UNIVERSE>
connmand[23974]: eth0 {add} route 212.227.81.55 gw 192.168.7.1 scope 0
<UNIVERSE>
connmand[23974]: eth0 {del} route 212.227.81.55 gw 192.168.7.1 scope 0
<UNIVERSE>
25
DHCPv6 msg send failed (index 2): Cannot assign requested address
25
connmand[23974]: Skipping server 192.168.7.1 KoD code RATE
24
24
23
23
^C
# fg
connmand -n
^Cconnmand[23974]: Terminating
connmand[23974]: Remove interface eth0 [ ethernet ]
connmand[23974]: Remove interface usb0 [ gadget ]
connmand[23974]: Remove interface wlan0 [ wifi ]
connmand[23974]: (null) {remove} index 16
connmand[23974]: eth0 {remove} index 2
connmand[23974]: usb0 {remove} index 3
connmand[23974]: wlan0 {remove} index 12
connmand[23974]: Exit
The test is done with connman v1.35 + your patch on leak stats FD
Thanks !
Richard
------------------------------
Message: 2
Date: Tue, 28 Nov 2017 16:43:36 +0100
From: Marco Gigante <[email protected]>
To: Daniel Wagner <[email protected]>
Cc: [email protected]
Subject: Re: Predefined hostname in dhcp requests
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Daniel
On 26/11/2017 21:02, Daniel Wagner wrote:
>> My need was to set the hostname to a well known value. My system
>> boots with, lets say, 'host-factory' hostname and during its running
>> time the hostname may become 'host-id', where id is a host identifier
>> locally defined.
>
> Right, that is something very generic so far.
Sorry, not sure whether I created confusion or not. I meant "My need was
to set the hostname to a well known value" _in the dhcp requests_.
>
>> Also the end-user can manually change the hostname from system gui
>> and restart the network, hence connman.
>
> That is your approach to solve the problem. If your GUI apps updates
> the hostname, ConnMan could see the change and should the right
> thing... If I am not completely mistaken ConnMan would send a new
> DHCPREQUEST with the new hostname to update the DNS server.
>
> I really would like to avoid to have two places where you configure
> the hostname.
The sack of adding new option is to send a fixed hostname in dhcp
requests, regardless the actual system hostname (which may change).
I understand this can be confusing or unwanted (on the network side you
see a different hostname than the system one), but depending upon the
policy one wants to implement, the config gives the option to set one or
the other behavior.
Here is a usage example, just to better clarify why I went with the
config option way:
ForcedHostname not defined -> connman retrieves the actual system
hostname for the dhcp requests (current behavior)
ForcedHostname = "myhost"? -> connman sends 'myhost' as hostname in the
dhcp requests. This permits also to send empty hostname, which is not
possible with current implementation.
Maybe the config option could have a better name...
>
>> The problem is that the dhcp request can contain either
>> 'host-factory' or 'host-id' depending upon who runs first between
>> connman dhcp client and id negotiator component or end-user actions.
>
> Hmm, somehow this sounds a bit racy :)
Indeed. That's why I wanted to have the chance to fix it.
>
> After a bit of pondering I think we should try the monitor approach
> first and see if this works or not.
>
> Thanks,
> Daniel
Thank you
--
marco
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 25, Issue 16
***************************************