public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug network/14001] New: getaddrinfo sometimes slow in multithreaded programs
@ 2012-04-20  8:52 wfpeltz at yahoo dot de
  2012-04-20  9:34 ` [Bug network/14001] " wfpeltz at yahoo dot de
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: wfpeltz at yahoo dot de @ 2012-04-20  8:52 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14001

             Bug #: 14001
           Summary: getaddrinfo sometimes slow in multithreaded programs
           Product: glibc
           Version: 2.15
            Status: NEW
          Severity: normal
          Priority: P2
         Component: network
        AssignedTo: unassigned@sourceware.org
        ReportedBy: wfpeltz@yahoo.de
    Classification: Unclassified


Created attachment 6352
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6352
test program

If two or more threads invoke getaddrinfo for the same node at (about) the same
time, the program hangs for 5 seconds (Fedora 17 x64_64, glibc 2.15) or for an
integral multiple of 5 seconds (Fedora 16 x64_64, glibc 2.14) before delivering
the correct result.

I have attached a short test program. You can try something like this:

time ./getaddrinfo_test www.amazon.com
(Amazon is one of the "slowest" hosts under Fedora 16. It often hangs for 20 or
25 seconds.)

If you specify a second argument, the second thread invokes getaddrinfo with
that second argument as "node". If the two nodes differ, the program never
hangs.

The program also doesn't hang if the node is "localhost". Under Fedora 17, it
doesn't hang if it is executed for a second time with the same node shortly
after the first execution. But under Fedora 16 it hangs even in this case.

One program that is affected by this bug is Privoxy. It starts a new thread for
each request, and if someone opens a web page the browser sends many requests
to the proxy for all the elements on the web page which in most cases go to the
same server. It doesn't cache the result of getaddrinfo. (Should it? I don't
think so.)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug network/14001] getaddrinfo sometimes slow in multithreaded programs
  2012-04-20  8:52 [Bug network/14001] New: getaddrinfo sometimes slow in multithreaded programs wfpeltz at yahoo dot de
@ 2012-04-20  9:34 ` wfpeltz at yahoo dot de
  2012-04-20 10:54 ` wfpeltz at yahoo dot de
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: wfpeltz at yahoo dot de @ 2012-04-20  9:34 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14001

Winfried Peltz <wfpeltz at yahoo dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wfpeltz at yahoo dot de

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug network/14001] getaddrinfo sometimes slow in multithreaded programs
  2012-04-20  8:52 [Bug network/14001] New: getaddrinfo sometimes slow in multithreaded programs wfpeltz at yahoo dot de
  2012-04-20  9:34 ` [Bug network/14001] " wfpeltz at yahoo dot de
@ 2012-04-20 10:54 ` wfpeltz at yahoo dot de
  2013-10-13  7:47 ` neleai at seznam dot cz
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: wfpeltz at yahoo dot de @ 2012-04-20 10:54 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14001

Winfried Peltz <wfpeltz at yahoo dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #6352|0                           |1
        is obsolete|                            |

--- Comment #1 from Winfried Peltz <wfpeltz at yahoo dot de> 2012-04-20 10:53:51 UTC ---
Created attachment 6353
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6353
new test program

Sorry, there was a bug in my first test program. It didn't work correctly with
2 arguments. But this changes nothing I wrote above.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug network/14001] getaddrinfo sometimes slow in multithreaded programs
  2012-04-20  8:52 [Bug network/14001] New: getaddrinfo sometimes slow in multithreaded programs wfpeltz at yahoo dot de
  2012-04-20  9:34 ` [Bug network/14001] " wfpeltz at yahoo dot de
  2012-04-20 10:54 ` wfpeltz at yahoo dot de
@ 2013-10-13  7:47 ` neleai at seznam dot cz
  2013-11-06 11:25 ` neleai at seznam dot cz
  2014-06-25 11:14 ` fweimer at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: neleai at seznam dot cz @ 2013-10-13  7:47 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=14001

Ondrej Bilka <neleai at seznam dot cz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |UNCONFIRMED
                 CC|                            |neleai at seznam dot cz
     Ever confirmed|1                           |0

--- Comment #2 from Ondrej Bilka <neleai at seznam dot cz> ---
I cannot replicate this issue on 2.17. Attached program has same latency as
without multiple threads.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug network/14001] getaddrinfo sometimes slow in multithreaded programs
  2012-04-20  8:52 [Bug network/14001] New: getaddrinfo sometimes slow in multithreaded programs wfpeltz at yahoo dot de
                   ` (2 preceding siblings ...)
  2013-10-13  7:47 ` neleai at seznam dot cz
@ 2013-11-06 11:25 ` neleai at seznam dot cz
  2014-06-25 11:14 ` fweimer at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: neleai at seznam dot cz @ 2013-11-06 11:25 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=14001

Ondrej Bilka <neleai at seznam dot cz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #3 from Ondrej Bilka <neleai at seznam dot cz> ---
I cannot duplicate this issue.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug network/14001] getaddrinfo sometimes slow in multithreaded programs
  2012-04-20  8:52 [Bug network/14001] New: getaddrinfo sometimes slow in multithreaded programs wfpeltz at yahoo dot de
                   ` (3 preceding siblings ...)
  2013-11-06 11:25 ` neleai at seznam dot cz
@ 2014-06-25 11:14 ` fweimer at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: fweimer at redhat dot com @ 2014-06-25 11:14 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=14001

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-06-25 11:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-20  8:52 [Bug network/14001] New: getaddrinfo sometimes slow in multithreaded programs wfpeltz at yahoo dot de
2012-04-20  9:34 ` [Bug network/14001] " wfpeltz at yahoo dot de
2012-04-20 10:54 ` wfpeltz at yahoo dot de
2013-10-13  7:47 ` neleai at seznam dot cz
2013-11-06 11:25 ` neleai at seznam dot cz
2014-06-25 11:14 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).