[Touch-packages] [Bug 1533631] Re: Failed to renew DHCPv6 lease after suspend

2016-03-31 Thread Bug Watch Updater
** Changed in: network-manager
   Status: Unknown => Confirmed

** Changed in: network-manager
   Importance: Unknown => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1533631

Title:
  Failed to renew DHCPv6 lease after suspend

Status in NetworkManager:
  Confirmed
Status in isc-dhcp package in Ubuntu:
  Invalid
Status in network-manager package in Ubuntu:
  Triaged

Bug description:
  Network Manager summarily kills the IPv6 dhclient process when the
  DHCPv6 lease contained in the dhclient6-${UUID}.lease file is out-of
  date, leaving the IPv6 interface without a stateful IPv6 address, or,
  if the "require IPv6 address on this interface" option is enabled,
  causes NM to cycle continuously deactivating and reactivating the
  interface (including the IPv4 addresses).

  This is effectively a Denial Of Service. It can be trivially induced
  if, for example, the dhclient6-$(UUID}.lease file contains a lease
  that was issued before the user went away on vacation or the PC wasn't
  connected to the same network for a few days (depending on the lease
  renew/rebind/expiry times). Calculation on the old lease of

  start + preferred_lifetime < NOW

  triggers dhclient to 'DEPREFER6' the lease (withdraw the address
  record) and ask the DHCPv6 server for a new lease, but Network Manager
  will kill the dhclient because it only sees an 'EXPIRE6' state change.

  In summary, when the DHCPv6 state transitions from "bound" to
  "unknown" then "expire" to "done" Network Manager kills the 'dhclient'
  process before it has chance to request and bind a fresh lease, If
  'dhclient' is run manually with the same command-line options and
  allowed to continue running it correctly gains a new lease.

  Network Manager doesn't know how to handle "DEPREF6", which is sent
  from isc-dhcp dhclient to the helper script (set by "-sf" option).

  So it seems that to correctly solve this issue Network Manager must be
  taught how to handle DEPREF6.

  /var/log/syslog will show a message from dhclient of the form:

  dhclient: PRC: Address 2a02:8011:2007::2 depreferred.

To manage notifications about this bug go to:
https://bugs.launchpad.net/network-manager/+bug/1533631/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1533631] Re: Failed to renew DHCPv6 lease after suspend

2016-03-31 Thread TJ
** Description changed:

- After fixing IPv6 address assignment (#1469346), IPv6 works fine until
- sleep. On wake up ubuntu fails to renew its IPv6 lease:
+ Network Manager summarily kills the IPv6 dhclient process when the
+ DHCPv6 lease contained in the dhclient6-${UUID}.lease file is out-of
+ date, leaving the IPv6 interface without a stateful IPv6 address, or, if
+ the "require IPv6 address on this interface" option is enabled, causes
+ NM to cycle continuously deactivating and reactivating the interface
+ (including the IPv4 addresses).
  
- Jan 13 10:47:47 ubuntu dhclient: PRC: Renewing lease on wlp3s0.
- Jan 13 10:47:47 ubuntu dhclient: PRC: Rebinding lease on wlp3s0.
- Jan 13 10:47:47 ubuntu dhclient: XMT: Rebind on wlp3s0, interval 9890ms.
- Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed bound -> unknown
- Jan 13 10:47:47 ubuntu dhclient: PRC: Address 2a02:::::b44 
depreferred.
- Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed unknown -> expire
- Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): canceled DHCP 
transaction, DHCP client pid 1170
- Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed expire -> done
+ This is effectively a Denial Of Service. It can be trivially induced if,
+ for example, the dhclient6-$(UUID}.lease file contains a lease that was
+ issued before the user went away on vacation or the PC wasn't connected
+ to the same network for a few days (depending on the lease
+ renew/rebind/expiry times). Calculation on the old lease of
  
- I'm not sure that it's solely NetworkManager issue (dhclient could also
- be affected).
+ start + preferred_lifetime < NOW
+ 
+ triggers dhclient to 'DEPREFER6' the lease (withdraw the address record)
+ and ask the DHCPv6 server for a new lease, but Network Manager will kill
+ the dhclient because it only sees an 'EXPIRE6' state change.
+ 
+ In summary, when the DHCPv6 state transitions from "bound" to "unknown"
+ then "expire" to "done" Network Manager kills the 'dhclient' process
+ before it has chance to request and bind a fresh lease, If 'dhclient' is
+ run manually with the same command-line options and allowed to continue
+ running it correctly gains a new lease.
+ 
+ Network Manager doesn't know how to handle "DEPREF6", which is sent from
+ isc-dhcp dhclient to the helper script (set by "-sf" option).
+ 
+ So it seems that to correctly solve this issue Network Manager must be
+ taught how to handle DEPREF6.
+ 
+ /var/log/syslog will show a message from dhclient of the form:
+ 
+ dhclient: PRC: Address 2a02:8011:2007::2 depreferred.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1533631

Title:
  Failed to renew DHCPv6 lease after suspend

Status in NetworkManager:
  Unknown
Status in isc-dhcp package in Ubuntu:
  Invalid
Status in network-manager package in Ubuntu:
  Triaged

Bug description:
  Network Manager summarily kills the IPv6 dhclient process when the
  DHCPv6 lease contained in the dhclient6-${UUID}.lease file is out-of
  date, leaving the IPv6 interface without a stateful IPv6 address, or,
  if the "require IPv6 address on this interface" option is enabled,
  causes NM to cycle continuously deactivating and reactivating the
  interface (including the IPv4 addresses).

  This is effectively a Denial Of Service. It can be trivially induced
  if, for example, the dhclient6-$(UUID}.lease file contains a lease
  that was issued before the user went away on vacation or the PC wasn't
  connected to the same network for a few days (depending on the lease
  renew/rebind/expiry times). Calculation on the old lease of

  start + preferred_lifetime < NOW

  triggers dhclient to 'DEPREFER6' the lease (withdraw the address
  record) and ask the DHCPv6 server for a new lease, but Network Manager
  will kill the dhclient because it only sees an 'EXPIRE6' state change.

  In summary, when the DHCPv6 state transitions from "bound" to
  "unknown" then "expire" to "done" Network Manager kills the 'dhclient'
  process before it has chance to request and bind a fresh lease, If
  'dhclient' is run manually with the same command-line options and
  allowed to continue running it correctly gains a new lease.

  Network Manager doesn't know how to handle "DEPREF6", which is sent
  from isc-dhcp dhclient to the helper script (set by "-sf" option).

  So it seems that to correctly solve this issue Network Manager must be
  taught how to handle DEPREF6.

  /var/log/syslog will show a message from dhclient of the form:

  dhclient: PRC: Address 2a02:8011:2007::2 depreferred.

To manage notifications about this bug go to:
https://bugs.launchpad.net/network-manager/+bug/1533631/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : 

[Touch-packages] [Bug 1533631] Re: Failed to renew DHCPv6 lease after suspend

2016-03-31 Thread TJ
** Bug watch added: GNOME Bug Tracker #748268
   https://bugzilla.gnome.org/show_bug.cgi?id=748268

** Also affects: network-manager via
   https://bugzilla.gnome.org/show_bug.cgi?id=748268
   Importance: Unknown
   Status: Unknown

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1533631

Title:
  Failed to renew DHCPv6 lease after suspend

Status in NetworkManager:
  Unknown
Status in isc-dhcp package in Ubuntu:
  Invalid
Status in network-manager package in Ubuntu:
  Triaged

Bug description:
  After fixing IPv6 address assignment (#1469346), IPv6 works fine until
  sleep. On wake up ubuntu fails to renew its IPv6 lease:

  Jan 13 10:47:47 ubuntu dhclient: PRC: Renewing lease on wlp3s0.
  Jan 13 10:47:47 ubuntu dhclient: PRC: Rebinding lease on wlp3s0.
  Jan 13 10:47:47 ubuntu dhclient: XMT: Rebind on wlp3s0, interval 9890ms.
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed bound -> unknown
  Jan 13 10:47:47 ubuntu dhclient: PRC: Address 2a02:::::b44 
depreferred.
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed unknown -> expire
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): canceled DHCP 
transaction, DHCP client pid 1170
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed expire -> done

  I'm not sure that it's solely NetworkManager issue (dhclient could
  also be affected).

To manage notifications about this bug go to:
https://bugs.launchpad.net/network-manager/+bug/1533631/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1533631] Re: Failed to renew DHCPv6 lease after suspend

2016-03-31 Thread TJ
** Changed in: isc-dhcp (Ubuntu)
   Importance: High => Low

** Changed in: isc-dhcp (Ubuntu)
   Status: Triaged => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1533631

Title:
  Failed to renew DHCPv6 lease after suspend

Status in isc-dhcp package in Ubuntu:
  Invalid
Status in network-manager package in Ubuntu:
  Triaged

Bug description:
  After fixing IPv6 address assignment (#1469346), IPv6 works fine until
  sleep. On wake up ubuntu fails to renew its IPv6 lease:

  Jan 13 10:47:47 ubuntu dhclient: PRC: Renewing lease on wlp3s0.
  Jan 13 10:47:47 ubuntu dhclient: PRC: Rebinding lease on wlp3s0.
  Jan 13 10:47:47 ubuntu dhclient: XMT: Rebind on wlp3s0, interval 9890ms.
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed bound -> unknown
  Jan 13 10:47:47 ubuntu dhclient: PRC: Address 2a02:::::b44 
depreferred.
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed unknown -> expire
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): canceled DHCP 
transaction, DHCP client pid 1170
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed expire -> done

  I'm not sure that it's solely NetworkManager issue (dhclient could
  also be affected).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1533631/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1533631] Re: Failed to renew DHCPv6 lease after suspend

2016-03-30 Thread TJ
The debug log contains:

Mar 31 01:34:59 hephaestion NetworkManager[9095]:  [1459384499.752259] 
[dhcp-manager/nm-dhcp-client.c:222] reason_to_state(): (wlp3s0): unmapped DHCP 
state 'DEPREF6'
Mar 31 01:34:59 hephaestion NetworkManager[9095]:  [1459384499.758516] 
[dhcp-manager/nm-dhcp-client.c:757] nm_dhcp_client_handle_event(): (wlp3s0): 
DHCP reason 'DEPREF6' -> state 'unknown'

Network Manager doesn't know how to handle "DEPREF6", which is sent from
isc-dhcp dhclient to the helper script (set by "-sf" option):

client/dhc6.c::do_depref()
{
...
  if (addr->starts + addr->preferred_life <= cur_time) {
script_init(client, "DEPREF6", NULL);
dhc6_marshall_values("cur_", client, lease,
 ia, addr);
script_write_requested6(client);
script_go(client);
...
}

So it seems that to correctly solve this issue Network Manager must be
taught how to handle DEPREF6.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1533631

Title:
  Failed to renew DHCPv6 lease after suspend

Status in isc-dhcp package in Ubuntu:
  Triaged
Status in network-manager package in Ubuntu:
  Triaged

Bug description:
  After fixing IPv6 address assignment (#1469346), IPv6 works fine until
  sleep. On wake up ubuntu fails to renew its IPv6 lease:

  Jan 13 10:47:47 ubuntu dhclient: PRC: Renewing lease on wlp3s0.
  Jan 13 10:47:47 ubuntu dhclient: PRC: Rebinding lease on wlp3s0.
  Jan 13 10:47:47 ubuntu dhclient: XMT: Rebind on wlp3s0, interval 9890ms.
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed bound -> unknown
  Jan 13 10:47:47 ubuntu dhclient: PRC: Address 2a02:::::b44 
depreferred.
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed unknown -> expire
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): canceled DHCP 
transaction, DHCP client pid 1170
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed expire -> done

  I'm not sure that it's solely NetworkManager issue (dhclient could
  also be affected).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1533631/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1533631] Re: Failed to renew DHCPv6 lease after suspend

2016-03-30 Thread TJ
Attaching a Network Manager TRACE log_level from syslog generated using:

/etc/NetworkManager/conf.d/logging.conf:
---
[logging]
level=TRACE
---

I've removed any extraneous messages from processes other than NM and
dhclient. I've also removed IPv4 related messages to make it easier to
follow.

** Attachment added: "Network Manager TRACE debug log"
   
https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1533631/+attachment/4617754/+files/nm-debug.log

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1533631

Title:
  Failed to renew DHCPv6 lease after suspend

Status in isc-dhcp package in Ubuntu:
  Triaged
Status in network-manager package in Ubuntu:
  Triaged

Bug description:
  After fixing IPv6 address assignment (#1469346), IPv6 works fine until
  sleep. On wake up ubuntu fails to renew its IPv6 lease:

  Jan 13 10:47:47 ubuntu dhclient: PRC: Renewing lease on wlp3s0.
  Jan 13 10:47:47 ubuntu dhclient: PRC: Rebinding lease on wlp3s0.
  Jan 13 10:47:47 ubuntu dhclient: XMT: Rebind on wlp3s0, interval 9890ms.
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed bound -> unknown
  Jan 13 10:47:47 ubuntu dhclient: PRC: Address 2a02:::::b44 
depreferred.
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed unknown -> expire
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): canceled DHCP 
transaction, DHCP client pid 1170
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed expire -> done

  I'm not sure that it's solely NetworkManager issue (dhclient could
  also be affected).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1533631/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1533631] Re: Failed to renew DHCPv6 lease after suspend

2016-03-30 Thread TJ
Here's some notes from my digging into the code paths being followed.
Using the messages logged by NM to syslog I've been able to reconstruct
the call heirarchy. In summary, when the state transitions from "expire"
to "done":

nm_dhcp_client_set_state () fires a  NM_DHCP_STATE_EXPIRE signal

dhcp6_state_changed () receives NM_DHCP_STATE_EXPIRE signal and calls
   dhcp6_fail (self, FALSE)
  dhcp6_cleanup(self,  CLEANUP_TYPE_DECONFIGURE, FALSE)
 nm_dhcp_client_stop ()
NM_DHCP_CLIENT_GET_CLASS (self)->stop (self, release, priv->duid);

I've not been able to identify why the behaviour appears to have changed
recently.  Inspecting the changelogs and patches in both isc-dhcp and
network-manager hasn't revealed anything.

It definitely seems to be Network Manager's issue since it is killing
the dhclient process... however... if dhclient tried to gain a new lease
immediately it 'deprefered' the expired lease (thus sending NM
additional state change signals) then maybe NM wouldn't kill the
process.


Something else I noticed - which misled me for a while - is that the dhclient 
lease files written by Network Manager for IP4v and IPv6 use different syntax 
for the timestamps. From 'man 5 dhclient.conf' "LEASE DECLARATIONS" the "renew" 
"rebind" "expire" dates can have two formats: "default" or "local". This is set 
by "db-time-format" in the configuration.

default:   // :: 
local: epoch ; #
:: 

The NM IPv4.lease file uses the "default" format ("  renew 4 2016/03/31
06:32:42;") but the IPv6.lease file seems to use "local" ("renew
43200;") but without the "epoch" keyword. The code seems to indicate the
manual is confusing the *server* settings with client settings, or else
IPv6 is using a different scheme entirely via its 'clientenv_add()'
mechanism.

NM generates this config file - there is no 'db-time-format':
---
# Created by NetworkManager

send fqdn.fqdn "hephaestion.lan.iam.tj"; # added by NetworkManager
send fqdn.encoded on;
send fqdn.server-update on;

also request dhcp6.name-servers;
also request dhcp6.domain-search;
also request dhcp6.client-id;
---

The dhcp6 lease file extract (showing the last entry is an expired one:- 
$ date --date @$(echo 1459002474+86400 | bc)
Sun Mar 27 15:27:54 BST 2016
---
lease6 {
  interface "wlp3s0";
  ia-na 3b:bd:74:85 {
starts 1459002474;
renew 43200;
rebind 69120;
iaaddr 2a02:8011:2007::2 {
  starts 1459002474;
  preferred-life 86400;
  max-life 86400;
}
  }
---


---
Notes from the source-code analysis.

  static const GEnumValue values[] = {
{ NM_DHCP_STATE_UNKNOWN, "NM_DHCP_STATE_UNKNOWN", 
"nm-dhcp-state-unknown" },
{ NM_DHCP_STATE_BOUND, "NM_DHCP_STATE_BOUND", "nm-dhcp-state-bound" },
{ NM_DHCP_STATE_TIMEOUT, "NM_DHCP_STATE_TIMEOUT", 
"nm-dhcp-state-timeout" },
{ NM_DHCP_STATE_DONE, "NM_DHCP_STATE_DONE", "nm-dhcp-state-done" },
{ NM_DHCP_STATE_EXPIRE, "NM_DHCP_STATE_EXPIRE", "nm-dhcp-state-expire" 
},
{ NM_DHCP_STATE_FAIL, "NM_DHCP_STATE_FAIL", "nm-dhcp-state-fail" },
{ __NM_DHCP_STATE_MAX, "__NM_DHCP_STATE_MAX", "--nm-dhcp-state-max" },
{ NM_DHCP_STATE_MAX, "NM_DHCP_STATE_MAX", "nm-dhcp-state-max" },
{ 0, NULL, NULL }
  };

client_start ()
\-- g_signal_connect (client, NM_DHCP_CLIENT_SIGNAL_STATE_CHANGED, G_CALLBACK 
(client_state_changed), self);

client_state_changed ()
\--  if (state >= NM_DHCP_STATE_TIMEOUT)
 remove_client (self, client);
  \-- g_signal_handlers_disconnect_by_func (client, 
client_state_changed, self);

/* Stopping the client is left up to the controlling device
* explicitly since we may want to quit NetworkManager but not 
terminate
* the DHCP client.
*/

   g_hash_table_remove (NM_DHCP_MANAGER_GET_PRIVATE
(self)->clients, client);


dhcp6_start_with_link_ready ()
\-- priv->dhcp6_client = nm_dhcp_manager_start_ip6
  if (priv->dhcp6_client) { 
priv->dhcp6_state_sigid = g_signal_connect (priv->dhcp6_client,

NM_DHCP_CLIENT_SIGNAL_STATE_CHANGED,
G_CALLBACK 
(dhcp6_state_changed),
self);
  }


dhcp6_state_changed ()
  switch (state) {
...
   case NM_DHCP_STATE_EXPIRE:
/* Ignore expiry before we even have a lease (NAK, old lease, etc) */
if (priv->ip6_state != IP_CONF)
  dhcp6_fail (self, FALSE);
   \-- dhcp6_cleanup(self,  CLEANUP_TYPE_DECONFIGURE, FALSE)
if (   cleanup_type == CLEANUP_TYPE_DECONFIGURE || cleanup_type 
== CLEANUP_TYPE_REMOVED)
   nm_dhcp_client_stop ()
   \-- NM_DHCP_CLIENT_GET_CLASS (self)->stop (self, release, 
priv->duid);
nm_log_info (LOGD_DHCP, "(%s): canceled DHCP 
transaction, DHCP client pid %d"
 if (priv->dhcp6_mode == 

[Touch-packages] [Bug 1533631] Re: Failed to renew DHCPv6 lease after suspend

2016-03-30 Thread TJ
Further debugging indicates that when the IPv6 lease file contains an
expired lease as its last entry dhclient 'depreferences' it (gives it
up) but doesn't go on to attempt to gain a replacement lease because NM
cancels (kills) the dhclient process as a result of the 'expires'
message.

NM starts "dhclient ... -6 ... -cf dhclient6-${IF}.conf ${IF}" but kills
it and deletes the config file immediately although it leaves the lease
file in place.

I managed to capture the .conf file by waiting for NM to close it and
then making a copy before it was deleted:

sudo touch /var/lib/NetworkManager/dhclient6-${IF}.conf
inotifywait -e CLOSE_NOWRITE,CLOSE dhclient6-${IF}.conf; cp 
dhclient6-${IF}.conf /tmp/

I then executed dhclient in debug mode (after moving the .conf file into
/etc/dhcp/ to avoid apparmor denying access to the file in /tmp/) and
found that after the 'depreference' there is a delay of several minutes
before dhclient requests a new lease:

$ sudo cp /tmp/dhclient6-${IF}.conf /etc/dhcp/

$ sudo /sbin/dhclient -d -6 -N -lf
/var/lib/NetworkManager/dhclient6-0775a2a6-a4a1-40bf-bd85-9c3068582dbc-
wlp3s0.lease -cf /etc/dhcp/dhclient6-wlp3s0.conf  wlp3s0 |& tee
/tmp/dhclient6.test.log

Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on Socket/wlp3s0
Sending on   Socket/wlp3s0
PRC: Confirming active lease (INIT-REBOOT).
XMT: Forming Confirm, 0 ms elapsed.
XMT:  X-- IA_NA 3b:bd:74:85
XMT:  | X-- Confirm Address 2a02:8011:2007::2
XMT:  V IA_NA appended.
XMT: Confirm on wlp3s0, interval 1020ms.
RCV: Reply message on wlp3s0 from fe80::ee43:f6ff:fe46:c080.
RCV:  X-- Server ID: 00:03:00:01:ec:43:f6:46:c0:80
message status code Success.
PRC: Bound to lease 00:03:00:01:ec:43:f6:46:c0:80.
PRC: Rebind event scheduled in -294538 seconds, to run for 17280 seconds.
PRC: Depreference scheduled in -277258 seconds.
PRC: Expiration scheduled in -277258 seconds.
PRC: Rebinding lease on wlp3s0.
PRC: Depreference scheduled in -277258 seconds.
PRC: Expiration scheduled in -277258 seconds.
PRC: Address 2a02:8011:2007::2 depreferred.
PRC: Expiration scheduled in -277258 seconds.
PRC: Address 2a02:8011:2007::2 expired.
PRC: Bound lease is devoid of active addresses.  Re-initializing.
PRC: Soliciting for leases (INIT)

... very very long delay (several minutes) ...

XMT: Forming Solicit, 0 ms elapsed.
XMT:  X-- IA_NA 3b:bd:74:85
XMT:  | X-- Request renew in  +3600
XMT:  | X-- Request rebind in +5400
XMT: Solicit on wlp3s0, interval 1080ms.
RCV: Advertise message on wlp3s0 from fe80::ee43:f6ff:fe46:c080.
RCV:  X-- IA_NA 3b:bd:74:85
RCV:  | X-- starts 1459366132
RCV:  | X-- t1 - renew  +43200
RCV:  | X-- t2 - rebind +69120
RCV:  | X-- [Options]
RCV:  | | X-- IAADDR 2a02:8011:2007::2
RCV:  | | | X-- Preferred lifetime 86400.
RCV:  | | | X-- Max lifetime 86400.
RCV:  X-- Server ID: 00:03:00:01:ec:43:f6:46:c0:80
RCV:  Advertisement recorded.
PRC: Selecting best advertised lease.
PRC: Considering best lease.
PRC:  X-- Initial candidate 00:03:00:01:ec:43:f6:46:c0:80 (s: 156, p: 0).
XMT: Forming Request, 0 ms elapsed.
XMT:  X-- IA_NA 3b:bd:74:85
XMT:  | X-- Requested renew  +3600
XMT:  | X-- Requested rebind +5400
XMT:  | | X-- IAADDR 2a02:8011:2007::2
XMT:  | | | X-- Preferred lifetime +7200
XMT:  | | | X-- Max lifetime +7500
XMT:  V IA_NA appended.
XMT: Request on wlp3s0, interval 1070ms.
RCV: Reply message on wlp3s0 from fe80::ee43:f6ff:fe46:c080.
RCV:  X-- IA_NA 3b:bd:74:85
RCV:  | X-- starts 1459366133
RCV:  | X-- t1 - renew  +43200
RCV:  | X-- t2 - rebind +69120
RCV:  | X-- [Options]
RCV:  | | X-- IAADDR 2a02:8011:2007::2
RCV:  | | | X-- Preferred lifetime 86400.
RCV:  | | | X-- Max lifetime 86400.
RCV:  X-- Server ID: 00:03:00:01:ec:43:f6:46:c0:80
PRC: Bound to lease 00:03:00:01:ec:43:f6:46:c0:80.
PRC: Renewal event scheduled in 43200 seconds, to run for 25920 seconds.
PRC: Depreference scheduled in 86400 seconds.
PRC: Expiration scheduled in 86400 seconds.

And it continues running.

In the Network Manager case though syslog shows that NM cancels (kills)
the dhclient process when dhclient reports the 'expire' for the out-of-
date lease:

Mar 30 20:08:42 hephaestion NetworkManager[1506]:   Activation (wlp3s0) 
Beginning DHCPv6 transaction (timeout in 45 seconds)
Mar 30 20:08:42 hephaestion NetworkManager[1506]:   dhclient started with 
pid 22416
Mar 30 20:08:42 hephaestion dhclient: XMT: Confirm on wlp3s0, interval 940ms.
Mar 30 20:08:42 hephaestion dhclient: RCV: Reply message on wlp3s0 from 
fe80::ee43:f6ff:fe46:c080.
Mar 30 20:08:42 hephaestion dhclient: message status code Success.
Mar 30 20:08:42 hephaestion NetworkManager[1506]: valid_lft 86400
Mar 30 20:08:42 hephaestion NetworkManager[1506]: preferred_lft 86400
Mar 30 20:08:42 hephaestion NetworkManager[1506]: address 
2a02:8011:2007::2
Mar 30 20:08:42 hephaestion NetworkManager[1506]: nameserver 

[Touch-packages] [Bug 1533631] Re: Failed to renew DHCPv6 lease after suspend

2016-03-30 Thread TJ
** Changed in: network-manager (Ubuntu)
   Importance: Undecided => High

** Also affects: isc-dhcp (Ubuntu)
   Importance: Undecided
   Status: New

** Changed in: isc-dhcp (Ubuntu)
   Importance: Undecided => High

** Changed in: isc-dhcp (Ubuntu)
   Status: New => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to network-manager in Ubuntu.
https://bugs.launchpad.net/bugs/1533631

Title:
  Failed to renew DHCPv6 lease after suspend

Status in isc-dhcp package in Ubuntu:
  Triaged
Status in network-manager package in Ubuntu:
  Confirmed

Bug description:
  After fixing IPv6 address assignment (#1469346), IPv6 works fine until
  sleep. On wake up ubuntu fails to renew its IPv6 lease:

  Jan 13 10:47:47 ubuntu dhclient: PRC: Renewing lease on wlp3s0.
  Jan 13 10:47:47 ubuntu dhclient: PRC: Rebinding lease on wlp3s0.
  Jan 13 10:47:47 ubuntu dhclient: XMT: Rebind on wlp3s0, interval 9890ms.
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed bound -> unknown
  Jan 13 10:47:47 ubuntu dhclient: PRC: Address 2a02:::::b44 
depreferred.
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed unknown -> expire
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): canceled DHCP 
transaction, DHCP client pid 1170
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed expire -> done

  I'm not sure that it's solely NetworkManager issue (dhclient could
  also be affected).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1533631/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1533631] Re: Failed to renew DHCPv6 lease after suspend

2016-03-22 Thread TJ
Looking at the files related to dhclient managed by Network Manager
under /var/lib/NetworkManager/ I noticed that although the new lease
file seems to contain the correct (in the future) timestamps the
"timestamps" file entry for that same lease UUID is still set to the
time the original lease expired.

$ ll dhclient6-0775a2a6-a4a1-40bf-bd85-9c3068582dbc-wlp3s0.lease
 -rw-r--r--  1 root root 1056 Mar 22 16:06 
dhclient6-0775a2a6-a4a1-40bf-bd85-9c3068582dbc-wlp3s0.lease

$ cat dhclient6-0775a2a6-a4a1-40bf-bd85-9c3068582dbc-wlp3s0.lease
default-duid "\000\004\301\253\223\321\035\340@\022e\036\025M97\347\361";
lease6 {
  interface "wlp3s0";
  ia-na 3b:bd:74:85 {
starts 1456324435;
renew 43200;
rebind 69120;
iaaddr 2a02:8011:2007::2 {
  starts 1456324435;
  preferred-life 86400;
  max-life 86400;
}
  }
  option dhcp6.client-id 0:4:c1:ab:93:d1:1d:e0:40:12:65:1e:15:4d:39:37:e7:f1;
  option dhcp6.server-id 0:3:0:1:ec:43:f6:46:c0:80;
  option dhcp6.name-servers 2a02:8010:1:0:212:23:3:100;
  option dhcp6.unknown-16 0:0:d:e9:0:c:64:73:6c:66:6f:72:75:6d:2e:6f:72:67;
}
$ date +%F-%T --date='@1456324435'
2016-02-24-14:33:55

$ date +%F-%T
2016-03-22-17:28:20

So the lease "starts" time is a month ago even though the lease file
update time is the time the address was depreferred.

The "timestamps" file entry for that UUID is:

$ grep 0775a2a6-a4a1-40bf-bd85-9c3068582dbc timestamps 
0775a2a6-a4a1-40bf-bd85-9c3068582dbc=1458662760

$ date +%F-%T --date='@1458662760'
2016-03-22-16:06:00

This is the time of the deprefer; presumably set when the lease was
originally issued.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to network-manager in Ubuntu.
https://bugs.launchpad.net/bugs/1533631

Title:
  Failed to renew DHCPv6 lease after suspend

Status in network-manager package in Ubuntu:
  Confirmed

Bug description:
  After fixing IPv6 address assignment (#1469346), IPv6 works fine until
  sleep. On wake up ubuntu fails to renew its IPv6 lease:

  Jan 13 10:47:47 ubuntu dhclient: PRC: Renewing lease on wlp3s0.
  Jan 13 10:47:47 ubuntu dhclient: PRC: Rebinding lease on wlp3s0.
  Jan 13 10:47:47 ubuntu dhclient: XMT: Rebind on wlp3s0, interval 9890ms.
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed bound -> unknown
  Jan 13 10:47:47 ubuntu dhclient: PRC: Address 2a02:::::b44 
depreferred.
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed unknown -> expire
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): canceled DHCP 
transaction, DHCP client pid 1170
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed expire -> done

  I'm not sure that it's solely NetworkManager issue (dhclient could
  also be affected).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1533631/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1533631] Re: Failed to renew DHCPv6 lease after suspend

2016-03-22 Thread TJ
After deleting the dhcp6${UUID}-${IF}.lease file and reconnecting the
interface the "starts" timestamp is now up to date. Not sure if this is
relevant to the internals of dhclient though.

$ cat dhclient6-0775a2a6-a4a1-40bf-bd85-9c3068582dbc-wlp3s0.lease 
default-duid "\000\001\000\001\036z\001X\000\037;\275t\205";
lease6 {
  interface "wlp3s0";
  ia-na 3b:bd:74:85 {
starts 1458668291;
renew 43200;
rebind 69120;
iaaddr 2a02:8011:2007::3 {
  starts 1458668291;
  preferred-life 86400;
  max-life 86400;
}
  }
  option dhcp6.client-id 0:1:0:1:1e:7a:1:58:0:1f:3b:bd:74:85;
  option dhcp6.server-id 0:3:0:1:ec:43:f6:46:c0:80;
  option dhcp6.name-servers 2a02:8010:1:0:212:23:3:100;
  option dhcp6.unknown-16 0:0:d:e9:0:c:64:73:6c:66:6f:72:75:6d:2e:6f:72:67;
}
$ date +%F-%T --date='@1458668291'
2016-03-22-17:38:11

$ grep 0775a2a6-a4a1-40bf-bd85-9c3068582dbc timestamps 
0775a2a6-a4a1-40bf-bd85-9c3068582dbc=1458668288

$ date +%F-%T --date='@1458668288'
2016-03-22-17:38:08

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to network-manager in Ubuntu.
https://bugs.launchpad.net/bugs/1533631

Title:
  Failed to renew DHCPv6 lease after suspend

Status in network-manager package in Ubuntu:
  Confirmed

Bug description:
  After fixing IPv6 address assignment (#1469346), IPv6 works fine until
  sleep. On wake up ubuntu fails to renew its IPv6 lease:

  Jan 13 10:47:47 ubuntu dhclient: PRC: Renewing lease on wlp3s0.
  Jan 13 10:47:47 ubuntu dhclient: PRC: Rebinding lease on wlp3s0.
  Jan 13 10:47:47 ubuntu dhclient: XMT: Rebind on wlp3s0, interval 9890ms.
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed bound -> unknown
  Jan 13 10:47:47 ubuntu dhclient: PRC: Address 2a02:::::b44 
depreferred.
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed unknown -> expire
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): canceled DHCP 
transaction, DHCP client pid 1170
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed expire -> done

  I'm not sure that it's solely NetworkManager issue (dhclient could
  also be affected).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1533631/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1533631] Re: Failed to renew DHCPv6 lease after suspend

2016-03-22 Thread TJ
Yes, seeing this too on 15.10 since around the first week of March, as
best I can tell, but irrespective of Suspend.

It looks like dhclient thinks/is told the new lease is 'depreferred' and
therefore quits, and the dhclient process is terminated, but the address
remains on the interface until the valid-lifetime expires.

Mar 22 16:06:02 hephaestion NetworkManager[1468]:   Activation (wlp3s0) 
Beginning DHCPv6 transaction (timeout in 45 seconds)
Mar 22 16:06:02 hephaestion NetworkManager[1468]:   dhclient started with 
pid 19221
Mar 22 16:06:03 hephaestion dhclient: XMT: Confirm on wlp3s0, interval 950ms.
Mar 22 16:06:03 hephaestion dhclient: RCV: Reply message on wlp3s0 from 
fe80::ee43:f6ff:fe46:c080.
Mar 22 16:06:03 hephaestion dhclient: message status code Success.
Mar 22 16:06:03 hephaestion NetworkManager[1468]: valid_lft 86400
Mar 22 16:06:03 hephaestion NetworkManager[1468]: preferred_lft 86400
Mar 22 16:06:03 hephaestion dhclient: PRC: Rebinding lease on wlp3s0.
Mar 22 16:06:03 hephaestion NetworkManager[1468]: address 
2a02:8011:2007::2
Mar 22 16:06:03 hephaestion NetworkManager[1468]: nameserver 
'2a02:8010:1:0:212:23:3:100'
Mar 22 16:06:03 hephaestion NetworkManager[1468]:   (wlp3s0): DHCPv6 
state changed unknown -> bound
Mar 22 16:06:03 hephaestion NetworkManager[1468]:   Policy set 
'wireless.lan.iam.tj' (wlp3s0) as default for IPv6 routing and DNS.
Mar 22 16:06:03 hephaestion NetworkManager[1468]:   Writing DNS 
information to /sbin/resolvconf
Mar 22 16:06:03 hephaestion dnsmasq[2433]: setting upstream servers from DBus
Mar 22 16:06:03 hephaestion dnsmasq[2433]: using nameserver 
2a02:8010:1:0:212:23:3:100#53
Mar 22 16:06:03 hephaestion dnsmasq[2433]: using nameserver 10.254.1.254#53
Mar 22 16:06:03 hephaestion nm-dispatcher: Dispatching action 'dhcp6-change' 
for wlp3s0
Mar 22 16:06:03 hephaestion dhclient: PRC: Address 2a02:8011:2007::2 
depreferred.
Mar 22 16:06:03 hephaestion NetworkManager[1468]:   (wlp3s0): DHCPv6 
state changed bound -> unknown
Mar 22 16:06:03 hephaestion NetworkManager[1468]:   (wlp3s0): DHCPv6 
state changed unknown -> expire
Mar 22 16:06:03 hephaestion NetworkManager[1468]:   (wlp3s0): canceled 
DHCP transaction, DHCP client pid 19221
Mar 22 16:06:03 hephaestion NetworkManager[1468]:   (wlp3s0): DHCPv6 
state changed expire -> done

$ ip -6 addr show dev wlp3s0
3: wlp3s0:  mtu 1500 state UP qlen 1000
inet6 2a02:8011:2007::2/128 scope global dynamic 
   valid_lft 82942sec preferred_lft 82942sec
inet6 fe80::21f:3bff:febd:7485/64 scope link 
   valid_lft forever preferred_lft forever

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to network-manager in Ubuntu.
https://bugs.launchpad.net/bugs/1533631

Title:
  Failed to renew DHCPv6 lease after suspend

Status in network-manager package in Ubuntu:
  Confirmed

Bug description:
  After fixing IPv6 address assignment (#1469346), IPv6 works fine until
  sleep. On wake up ubuntu fails to renew its IPv6 lease:

  Jan 13 10:47:47 ubuntu dhclient: PRC: Renewing lease on wlp3s0.
  Jan 13 10:47:47 ubuntu dhclient: PRC: Rebinding lease on wlp3s0.
  Jan 13 10:47:47 ubuntu dhclient: XMT: Rebind on wlp3s0, interval 9890ms.
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed bound -> unknown
  Jan 13 10:47:47 ubuntu dhclient: PRC: Address 2a02:::::b44 
depreferred.
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed unknown -> expire
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): canceled DHCP 
transaction, DHCP client pid 1170
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed expire -> done

  I'm not sure that it's solely NetworkManager issue (dhclient could
  also be affected).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1533631/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1533631] Re: Failed to renew DHCPv6 lease after suspend

2016-03-22 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: network-manager (Ubuntu)
   Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to network-manager in Ubuntu.
https://bugs.launchpad.net/bugs/1533631

Title:
  Failed to renew DHCPv6 lease after suspend

Status in network-manager package in Ubuntu:
  Confirmed

Bug description:
  After fixing IPv6 address assignment (#1469346), IPv6 works fine until
  sleep. On wake up ubuntu fails to renew its IPv6 lease:

  Jan 13 10:47:47 ubuntu dhclient: PRC: Renewing lease on wlp3s0.
  Jan 13 10:47:47 ubuntu dhclient: PRC: Rebinding lease on wlp3s0.
  Jan 13 10:47:47 ubuntu dhclient: XMT: Rebind on wlp3s0, interval 9890ms.
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed bound -> unknown
  Jan 13 10:47:47 ubuntu dhclient: PRC: Address 2a02:::::b44 
depreferred.
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed unknown -> expire
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): canceled DHCP 
transaction, DHCP client pid 1170
  Jan 13 10:47:47 ubuntu NetworkManager[796]:   (wlp3s0): DHCPv6 state 
changed expire -> done

  I'm not sure that it's solely NetworkManager issue (dhclient could
  also be affected).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1533631/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp