Opened 7 years ago

Closed 7 years ago

#2719 closed defect (fixed)

b10-dhcp6 server dies if lease request arrive and there are no Dhcp6 subnets configured

Reported by: tmark Owned by: tomek
Priority: very high Milestone: Sprint-DHCP-20130214
Component: dhcp6 Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: Very High
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: yes

Description

When there are no subnet6 entries and v6 requests arrive the b10-dhcp6 server dies with the following debug output:

2013-02-11 21:24:22.388 ERROR [b10-dhcp6.dhcp6/19479] DHCP6_SUBNET_SELECTION_FAILED failed to select a subnet for incoming packet, src=%1 type=%2 @@Excess logger placeholders still exist@@
b10-dhcp6: /usr/include/boost/smart_ptr/shared_ptr.hpp:418: T* boost::shared_ptr< <template-parameter-1-1> >::operator->() const [with T = isc::dhcp::Subnet6]: Assertion `px != 0' failed.
2013-02-11 21:24:22.391 INFO [b10-init.init/19459] BIND10_PROCESS_ENDED process 19479 of b10-dhcp6 ended with status 6

Subtickets

Change History (11)

comment:1 Changed 7 years ago by jwright

  • Defect Severity changed from High to Very High
  • Milestone New Tasks deleted
  • Priority changed from medium to very high

This should be fixed BEFORE the 1.0.0 release that occur Thurs 2013-02-14. We don't want to expose the user to this issue.

comment:2 Changed 7 years ago by tomek

  • Owner set to tomek
  • Status changed from new to assigned

The issue was debugged as problem in handleRenew(). It assumed that subnet is always non-NULL, which sadly Tom proved not to be the case. There's another small fix regarding parameters passed to DHCP6_SUBNET_SELECTION_FAILED.

Code is ready for testing and review.

comment:3 Changed 7 years ago by tomek

  • Owner changed from tomek to tmark
  • Status changed from assigned to reviewing

comment:4 Changed 7 years ago by tmark

  • Owner changed from tmark to tomek

Prior to installing the fix , and using a simple test setup of a single dhclient against the server, I reproduced the issue. Then I pulled the fix, compiled, and installed with no issues. Rerunning the test, the server gracefully handles this situation without crashing. Lastly, I added subnet6 configuration and reran the test. The server handed leases correctly.

The code changes appear correct, however the commentary immediately qyuestions the logging level, which currently is "ERROR". Per the guidelines it should be "WARN".

comment:5 Changed 7 years ago by tomek

Ok, unnecessary comment removed, log message changed to WARN.

If there are no other suggested changes, I suppose the fix is ready for merge, right?

comment:6 Changed 7 years ago by tomek

  • Owner changed from tomek to tmark

comment:7 Changed 7 years ago by tmark

  • Owner changed from tmark to tomek

Looks good.

comment:8 Changed 7 years ago by tomek

  • Component changed from Unclassified to dhcp6
  • Milestone set to Sprint-DHCP-20130214
  • Resolution set to fixed
  • Status changed from reviewing to closed
  • Sub-Project changed from DNS to DHCP

Code merged. Closing.

comment:9 Changed 7 years ago by jwright

  • Resolution fixed deleted
  • Status changed from closed to reopened

Jeremy and I were talking about whether or not this needs a unit test. Seems like a simple unit test around method handleRenew(), passing in NULL subnet param, would do the trick.

comment:10 Changed 7 years ago by jwright

After discussion with Jeremy, myself, Tomek and Thomas, we agreed to let this one stay closed (so that ticket state matches change logs for upcoming release), and generate a new ticket to track writing a uni test for this issue. That new ticket is Ticket #2721: http://bind10.isc.org/ticket/2721.

comment:11 Changed 7 years ago by jwright

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.