Opened 7 years ago

Closed 7 years ago

#2979 closed defect (fixed)

perfdhcp segfaults

Reported by: stephen Owned by: marcin
Priority: low Milestone: Sprint-DHCP-20130703
Component: perfdhcp Version:
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: 0 Internal?: no


Perfdhcp process segmentation faults on 90% of tries when running with 10k+ clients.

Client: Fedora 18; perfdhcp built from bind10-1.0.0.

Server: Redhat 6.4; dhcp-4.2.5 built from source; tested in both single and failover modes.

Command ran: ./perfdhcp -l em2 -R 16000 -n 16000 -r 100

Further details (including core dump) can be obtained from ISC internal support ticket 6043.


Change History (7)

comment:1 Changed 7 years ago by marcin

  • Sub-Project changed from DNS to DHCP

comment:2 Changed 7 years ago by marcin

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

comment:3 Changed 7 years ago by mcnally

The customer who reported the initial problem has posted an update and a suggested code fix on ISC Support Ticket 6043. Please see his comments there and consider whether his fix is suitable for adoption.

comment:4 Changed 7 years ago by marcin

  • Owner changed from marcin to UnAssigned
  • Status changed from assigned to reviewing

Provided patch does not resolve the actual problem. In practice, it prevents the program from entering the section of the code where the actual bug is. The culprit section is responsible for garbage collecting timed out packets. When packet is considered timed out, it is erased from the list where sent packets are tracked. The internal pointer used to track the next sent packet is not updated on removal of the timed out packet. In some cases it may cause the internal pointer to invalidate and lead to undefined behaviour. The proper fix updates the internal pointer to point to a valid element on the list on removal of the element it points to.

Please review this fix on the trac2979 branch.

Proposed !Changelog entry

6XX.	[bug]		marcin
	perfdhcp: Fixed a bug in whereby the application was sporadically
	crashing when timed out packets were garbage collected.
	(Trac #2979, git abcd)

comment:5 Changed 7 years ago by stephen

  • Owner changed from UnAssigned to stephen

comment:6 Changed 7 years ago by stephen

  • Owner changed from stephen to marcin

Reviewed commit 9a2922daaac4af5b378144b518a1b1fec767c798

Looks OK, please merge.

comment:7 Changed 7 years ago by marcin

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

Merged with commit 6d42b333f446eccc9d0204bcc04df38fed0c31db

Note: See TracTickets for help on using tickets.