Opened 10 years ago

Closed 10 years ago

#107 closed defect (fixed)

hanging auth

Reported by: jreed Owned by: UnAssigned
Priority: medium Milestone: 02. Running, functional authoritative-only server
Component: Unclassified Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity:
Sub-Project: Feature Depending on Ticket:
Estimated Difficulty: Add Hours to Ticket:
Total Hours: Internal?:


dig works for udp query.

telnet to it (so TCP).

dig no longer works.
;; connection timed out; no servers could be reached

close telnet.

State is:

tcp 0 0 CLOSE_WAIT

tcp 0 0 FIN_WAIT_2

near 100% load


2168 reed 26 0 3300K 3676K CPU/0 2:03 98.83% 98.83% b10-auth

Still can't query over udp.

That is built with:
/* #undef HAVE_BOOSTLIB */
(so not using boost::asio)


Change History (5)

comment:1 Changed 10 years ago by jreed

I was able to repeat this on FreeBSD, Linux and NetBSD all built with the BOOSTLIB.

But when I rebuilt with HAVE_BOOSTLIB on NetBSD, the problem went away. I can still do udp and tcp queries with tcp is blocked on both ipv6 and ipv4.

See ticket #108.

comment:2 Changed 10 years ago by shane

  • Owner set to UnAssigned
  • Priority changed from blocker to major
  • Status changed from new to assigned

This was a bug with never stopping a read on TCP.

Changeset 1540 fixes the infinite loop:

However, any client can connect and just hang the server, so this is only a *very* partial solution.

Reducing priority to "major" since one can use Boost to get a working server.

comment:3 Changed 10 years ago by shane

At Jinmei's suggestion, I also handled some errors in recv() and send(). Plus a note that the function is extremely dangerous!

Chnage set 1544.

comment:4 Changed 10 years ago by jreed

With new fixes, it still blocks as expected, but when tcp connection is closed, then b10-auth recovers. Don't see high load either.

comment:5 Changed 10 years ago by shane

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

The specific bug has been fixed. Will be made irrelevant by our move to asio.

Note: See TracTickets for help on using tickets.