Opened 4 years ago

Closed 4 years ago

#4293 closed defect (fixed)

[Kea 1.0.0] error "failed to unregister timer 'memfile-lfc'" on shutdown

Reported by: nicolas.chaigneau Owned by: stephen
Priority: medium Milestone: Kea1.1
Component: Unclassified Version: 1.0.0
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 2 Internal?: no


Whenever Kea is shut down, there is the following error message in the logs:

2016-02-03 09:20:14.299 ERROR [kea-dhcp4.dhcpsrv/28964] DHCPSRV_MEMFILE_LFC_UNREGISTER_TIMER_FAILED failed to unregister timer 'memfile-lfc': unable to unregister non existing timer 'memfile-lfc'


Change History (5)

comment:1 Changed 4 years ago by hschempf

  • Milestone changed from Kea-proposed to Kea1.1

Per team meeting Feb 11, accept 1.1 Med

comment:2 Changed 4 years ago by stephen

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

comment:3 Changed 4 years ago by stephen

  • Owner changed from stephen to Unassigned
  • Status changed from accepted to reviewing
  • Total Hours changed from 0 to 2

The message is issued from the LFCSetup destructor when it fails to unregister the timer it registered as part of the LFC setup. The destructor gets executed both at a reconfiguration and at shutdown. The message is being issued because during shutdown, another component unregisters all timers as part of its shutdown activity, and that is happening before the LFCSetup destructor is called.

One possibile way of dealing with this would be to have a global shutdown flag that components could use to see if they were being called in the context of the program shutting down. However, this seems excessive for what is really a warning condition - if the timer does not exist when a call is made to deregister it, the absence may well have been due to a problem. However, after the call, the final state is as desired - there is no timer with the specified name.

The easiest solution (and the one taken) is to make the message a debug message. If we have timer problems, debug can be enabled to track the issues down.

Intended ChangeLog entry is:

Made DHCPSRV_MEMFILE_LFC_UNREGISTER_TIMER_FAILED a debug message as the condition
leading to it (trying to unregister a timer that is not registered) does not have
an adverse effect on the operation of Kea.

comment:4 Changed 4 years ago by marcin

  • Owner changed from Unassigned to stephen

I reviewed commit bb60a92508662cd714e8b3de2fb60d1baa2ac236

There is a extraneous "time" in the following comment: src/lib/dhcpsrv/dhcpsrv_messages.mes: "There are several reasons
why this could occur, although the most likely cause is that the system is being shut down and some other component has unregistered time timer."

Other changes look good. After correcting the commentary please merge.

comment:5 Changed 4 years ago by stephen

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

Merged in commit 06204c5d347d0df359af69974c155d0fa9725b44

Note: See TracTickets for help on using tickets.