Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#3997 closed defect (fixed)

kea-dhcp4/kea-dhcp6 crash on exit when DDNS is enabled

Reported by: tmark Owned by: tmark
Priority: very high Milestone: Kea1.0-beta
Component: ddns Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 4 Add Hours to Ticket: 0
Total Hours: 4 Internal?: no


Both servers crash when shutting down, if DDNS updates are enabled. It is extremely easy to reproduce. Simply enable ddns in the server's config:

 ,"dhcp-ddns": {
      "enable-updates": true,
       "qualifying-suffix": ""

Start the server with or without keactrl, then stop the server. The
underlying issue is that IfaceMgr singleton is being destroyed before the D2ClientMgr instance which requires it. I am not certain why this took so long to surface.


Change History (5)

comment:1 Changed 5 years ago by tmark

  • Owner set to tmark
  • Status changed from new to accepted

comment:2 Changed 5 years ago by tmark

  • Owner changed from tmark to UnAssigned
  • Status changed from accepted to reviewing
  • Total Hours changed from 0 to 4

Rather that stopping it explicitly, the servers were relying on D2ClientMgr to stop itself during its own destruction. This was falling over during process wind-down because the IfaceMgr? singleton was being destroyed before the D2ClientMgr instance. The servers now
explicitly stop the manager in their destructors.


9xx.    [bug]       tmark
    Fixed a bug in both DHCPv4 and DHCPv6 servers that could cause them to crash
    during sever shutdown when DNS updates are enabled.
    (Trac #3997, git TBD)

This also fulfills ticket #3455

comment:3 Changed 5 years ago by marcin

  • Owner changed from UnAssigned to tmark

Reviewed ef1033c4c418c93eb814328dbccf6fd2d271d4ca

This change looks good. Other than replacing D2ClientErrors with D2ClientError in the following comment:

/// If D2ClientMgr encounters errors it may throw
/// D2ClientErrors.

you can go ahead and merge it.

comment:4 Changed 5 years ago by tmark

  • Resolution set to fixed
  • Status changed from reviewing to closed

Comments amended.
Changes merged with git ce91bdd78f420f64324c573a952ec804bc25e0d8
ChangeLog entry 989 added.

Ticket is complete.

comment:5 Changed 4 years ago by tomek

  • Milestone changed from Kea1.0 to Kea1.0-beta

Milestone renamed

Note: See TracTickets for help on using tickets.