View Issue Details

IDProjectCategoryView StatusLast Update
0001512libmicrohttpdinternal event looppublic2010-01-28 21:48
Reportercrusader Assigned ToChristian Grothoff  
PriorityimmediateSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product VersionGit master 
Summary0001512: If connection is not closed, CPU is at 100%
DescriptionIf the client doesn't close the connection explicit the CPU runs at 100 percent. If there is i.e. 4 requests, quad processors can reach 400%! I think this makes the internal select to get into an infinite while loop.
Additional InformationYou can reproduce it with libcurl by sending a request and after not closing the connection by calling curl_easy_cleanup, but put a getchar() or something to block the client.
TagsNo tags attached.
Attached Files
mhdtest.tar.gz (1,014 bytes)

Activities

Christian Grothoff

2009-11-15 14:29

manager   ~0003890

Can you provide a simple testcase (like a modification of one of those that we have in testcurl/)?

Christian Grothoff

2009-11-15 14:30

manager   ~0003891

Also, which version are you using?

crusader

2009-11-16 01:49

reporter   ~0003911

A VERY(!!) simple testcase uploaded. Compile then start. Before hitting any key, my processor runs at 100%.
I don't know the version I am running, but the revision number is 9312.

Christian Grothoff

2009-11-16 06:35

manager   ~0003915

Fixed in SVN 9555. Issue was that the code (after some recent refactoring???) failed to check for the special timeout value '0' (for infinity) and instead went select-crazy with timeout 0.

Issue History

Date Modified Username Field Change
2009-11-11 08:15 crusader New Issue
2009-11-15 14:29 Christian Grothoff Note Added: 0003890
2009-11-15 14:29 Christian Grothoff Status new => feedback
2009-11-15 14:30 Christian Grothoff Note Added: 0003891
2009-11-15 14:37 Christian Grothoff Assigned To => Christian Grothoff
2009-11-16 01:46 crusader File Added: mhdtest.tar.gz
2009-11-16 01:49 crusader Note Added: 0003911
2009-11-16 05:52 Christian Grothoff Status feedback => assigned
2009-11-16 05:58 Christian Grothoff Priority normal => immediate
2009-11-16 06:35 Christian Grothoff Status assigned => resolved
2009-11-16 06:35 Christian Grothoff Resolution open => fixed
2009-11-16 06:35 Christian Grothoff Note Added: 0003915
2010-01-28 21:48 Christian Grothoff Status resolved => closed
2013-05-06 12:53 Christian Grothoff Category internal select => libmicrohttpd internal select
2024-01-21 13:24 Christian Grothoff Category libmicrohttpd internal select => internal event loop