View Issue Details

IDProjectCategoryView StatusLast Update
0016236CentOS-7curlpublic2019-07-02 15:55
Status newResolutionopen 
Platformx86_64OSCentOSOS Version7.6.1810
Product Version7.6.1810 
Target VersionFixed in Version 
Summary0016236: Frequent clone System-Calls with Apache, Perl and CURL with Threaded Resolver
- Apache 2.4.6 (httpd-2.4.6-88.el7.centos)
- Perl module for Apache (mod_perl-2.0.10-3.el7 from EPEL 7)
- CURL (curl and libcurl both 7.29.0-51.el7)

In this scenario:
- Apache is running in "prefork" MPM mode.
- Certain web-requests are processed by Perl.
- Certain of those result in calls to CURL.

This combination results in frequent 'clone' system-calls, as observed with 'strace' and GDB. GDB reveals that the primary cloner is libcurl. The CentOS 7 CURL .spec file specifies the '--enable-threaded-resolver' option for 'configure'. Rebuilding libcurl with --enable-ares instead of --enable-threaded-resolver eliminates the frequent 'clone' system-calls, but doing so means diverging from the CentOS 7 packages for curl and libcurl.

Is this a supported scenario? Are frequent 'clone' system-calls by libcurl in a multi-process (as opposed to a multi-threaded) server to be expected?

(In this particular scenario, the libcurl invocations are expected to block the processing of the web-request, so starting up one or more threads for DNS resolution and then tearing those threads down seems pretty needless; no useful work is happening on behalf of the web-request until the DNS resolution and the curl-result have been completed.)
Steps To ReproduceConfigure Apache to handle a web-request foo.cgi with a Perl file that invokes curl to get a resource from, then send a continuous, parallel stream of web-requests for foo.cgi for a few minutes. Watch with:

(strace -T -tt -f $(for i in $(pidof httpd); do echo -n "-p $i "; done) -e trace=clone &); sleep 60; killall strace
TagsNo tags attached.




2019-07-02 15:05

manager   ~0034764

CentOS is a rebuild of the sources used to create RHEL. We do not modify anything except to remove branding and logos. You will need to submit your request to Redhat via and if/when RH accepts it and incorporates it into RHEL and releases a patched version, then CentOS will pick it up and rebuild it.


2019-07-02 15:35

reporter   ~0034765

Thank you, TrevorH. I appreciate your time and had quite forgotten this fact.


2019-07-02 15:55

reporter   ~0034766

Please close the issue, at your convenience.


2019-07-02 15:55

reporter   ~0034767

Red Hat bug:

Issue History

Date Modified Username Field Change
2019-07-02 14:59 smillerffn New Issue
2019-07-02 15:05 TrevorH Note Added: 0034764
2019-07-02 15:35 smillerffn Note Added: 0034765
2019-07-02 15:55 smillerffn Note Added: 0034766
2019-07-02 15:55 smillerffn Note Added: 0034767