This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug network/15946] getaddrinfo() writes DNS queries to random file descriptors under high load
- From: "jirka at fud dot cz" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 29 Jan 2015 02:43:12 +0000
- Subject: [Bug network/15946] getaddrinfo() writes DNS queries to random file descriptors under high load
- Auto-submitted: auto-generated
- References: <bug-15946-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=15946
Jiri Hruska <jirka at fud dot cz> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
CC| |jirka at fud dot cz
Resolution|--- |FIXED
--- Comment #14 from Jiri Hruska <jirka at fud dot cz> ---
That's a bug in the attached test case, though, not in glibc any more.
Line 122 should have `m = -1` instead of `m = 0`. Otherwise if the very first
dup() call fails, the close loop below will still do one iteration and close
somebody else's random file descriptor at fds[0].
To verify this, you can add the following before the `break` at line 158:
if (errno == EMFILE) {
+ if (m == 0)
+ printf("Yo Dawg I herd you like bugs so I put a bug in your bug.c\n");
break;
} else {
When running the program now, every alleged error was preceded by this message
just before, and I wasn't able to trigger the bug at all when the code was
corrected as suggested above.
Marking as RESOLVED/FIXED again.
--
You are receiving this mail because:
You are on the CC list for the bug.