cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Implications?

From: Michael Wallner <mike_at_iworks.at>
Date: Sun, 17 Sep 2006 12:14:39 +0200

Daniel Stenberg wrote:
> On Sat, 16 Sep 2006, Michael Wallner wrote:
>
>> I'd really like to, but unfortunately that's not that easy.
>
> Can you try to tell us how it works?

It's basically equal to the example code already posted, mashed up
with lots of PHP extension related stuff... If it helps in any way:
http://cvs.php.net/viewvc.cgi/pecl/http/http_request_pool_api.c?view=markup

> I've now committed code that makes the connection cache grow with the
> amount of added handles, to improve connection re-use and pipelining (if
> enabled).

The problems still remain, but I noticed a valgrind error.

Please let me know if I can help in any better way,

-- 
Michael

mike_at_honeybadger:~/build/php-5.2-debug$ USE_ZEND_ALLOC=0 valgrind --db-attach=yes sapi/cli/php ~/cvs/pecl/http/tests/HttpRequestPool_003.php
==14429== Memcheck, a memory error detector.
==14429== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==14429== Using LibVEX rev 1471, a library for dynamic binary translation.
==14429== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
==14429== Using valgrind-3.1.0-Debian, a dynamic binary instrumentation framework.
==14429== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==14429== For more details, rerun with: -v
==14429==
-TEST
About to connect() to www.hp.com port 80
Expire at 1158486573 / 406238 (49372ms)
  Trying 192.6.165.119...
About to connect() to www.netcraft.com port 80
Expire at 1158486574 / 186070 (49919ms)
  Trying 83.138.189.100...
About to connect() to www.apple.com port 80
Expire at 1158486574 / 272349 (49747ms)
  Trying 17.254.0.91...
About to connect() to www.hotmail.com port 80
Expire at 1158486574 / 527697 (49902ms)
  Trying 212.162.1.125...
About to connect() to www.ieee.org port 80
Expire at 1158486574 / 627839 (49731ms)
  Trying 80.239.170.198...
About to connect() to www.wikipedia.org port 80
Expire at 1158486574 / 898552 (49942ms)
  Trying 145.97.39.155...
About to connect() to www.google.com port 80
Expire at 1158486574 / 957005 (49843ms)
  Trying 72.14.221.99...
About to connect() to www.cnet.com port 80
Expire at 1158486575 / 115615 (49952ms)
  Trying 216.239.122.220...
About to connect() to www.cert.org port 80
Expire at 1158486575 / 165276 (49926ms)
  Trying 192.88.209.244...
About to connect() to www.bbc.co.uk port 80
Expire at 1158486575 / 240953 (49844ms)
  Trying 212.58.227.76...
Connected to www.hp.com (192.6.165.119) port 80
Connected to www.netcraft.com (83.138.189.100) port 80
Connected to www.apple.com (17.254.0.91) port 80
Connected to www.hotmail.com (212.162.1.125) port 80
Connected to www.ieee.org (80.239.170.198) port 80
Connected to www.wikipedia.org (145.97.39.155) port 80
Connected to www.google.com (72.14.221.99) port 80
Connected to www.cnet.com (216.239.122.220) port 80
Connected to www.cert.org (192.88.209.244) port 80
Connection #0: send pipe size = 1
Connection #1: send pipe size = 1
Connection #2: send pipe size = 1
Connection #3: send pipe size = 1
Connection #4: send pipe size = 1
Connection #5: send pipe size = 1
Connection #6: send pipe size = 1
Connection #7: send pipe size = 1
Connection #8: send pipe size = 1
Connected to www.bbc.co.uk (212.58.227.76) port 80
Connection #9: send pipe size = 1
Connection #0: recv pipe size = 1
Connection #1: recv pipe size = 1
Connection #2: recv pipe size = 1
Connection #3: recv pipe size = 1
Connection #4: recv pipe size = 1
Connection #5: recv pipe size = 1
Connection #6: recv pipe size = 1
Connection #7: recv pipe size = 1
Connection #8: recv pipe size = 1
==14429== Conditional jump or move depends on uninitialised value(s)
==14429== at 0x45AE3A9: multi_runsingle (multi.c:1063)
==14429== by 0x45AF856: curl_multi_perform (multi.c:1255)
==14429== by 0x82D9D76: _http_request_pool_perform (http_request_pool_api.c:295)
==14429== by 0x82DFDA9: zim_HttpRequestPool_socketPerform (http_requestpool_object.c:363)
==14429== by 0x839604B: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:200)
==14429== by 0x8397025: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:322)
==14429== by 0x8395AE3: execute (zend_vm_execute.h:92)
==14429== by 0x83962A4: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:234)
==14429== by 0x8397025: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:322)
==14429== by 0x8395AE3: execute (zend_vm_execute.h:92)
==14429== by 0x83962A4: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:234)
==14429== by 0x8397025: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:322)
==14429==
==14429== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- n
==14429==
==14429== Conditional jump or move depends on uninitialised value(s)
==14429== at 0x45AE3AB: multi_runsingle (multi.c:1063)
==14429== by 0x45AF856: curl_multi_perform (multi.c:1255)
==14429== by 0x82D9D76: _http_request_pool_perform (http_request_pool_api.c:295)
==14429== by 0x82DFDA9: zim_HttpRequestPool_socketPerform (http_requestpool_object.c:363)
==14429== by 0x839604B: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:200)
==14429== by 0x8397025: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:322)
==14429== by 0x8395AE3: execute (zend_vm_execute.h:92)
==14429== by 0x83962A4: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:234)
==14429== by 0x8397025: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:322)
==14429== by 0x8395AE3: execute (zend_vm_execute.h:92)
==14429== by 0x83962A4: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:234)
==14429== by 0x8397025: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:322)
==14429==
==14429== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- n
==14429==
==14429== Conditional jump or move depends on uninitialised value(s)
==14429== at 0x45AE3C6: multi_runsingle (multi.c:1063)
==14429== by 0x45AF856: curl_multi_perform (multi.c:1255)
==14429== by 0x82D9D76: _http_request_pool_perform (http_request_pool_api.c:295)
==14429== by 0x82DFDA9: zim_HttpRequestPool_socketPerform (http_requestpool_object.c:363)
==14429== by 0x839604B: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:200)
==14429== by 0x8397025: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:322)
==14429== by 0x8395AE3: execute (zend_vm_execute.h:92)
==14429== by 0x83962A4: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:234)
==14429== by 0x8397025: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:322)
==14429== by 0x8395AE3: execute (zend_vm_execute.h:92)
==14429== by 0x83962A4: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:234)
==14429== by 0x8397025: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:322)
==14429==
==14429== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- n
==14429==
==14429== Conditional jump or move depends on uninitialised value(s)
==14429== at 0x45AE3C8: multi_runsingle (multi.c:1063)
==14429== by 0x45AF856: curl_multi_perform (multi.c:1255)
==14429== by 0x82D9D76: _http_request_pool_perform (http_request_pool_api.c:295)
==14429== by 0x82DFDA9: zim_HttpRequestPool_socketPerform (http_requestpool_object.c:363)
==14429== by 0x839604B: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:200)
==14429== by 0x8397025: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:322)
==14429== by 0x8395AE3: execute (zend_vm_execute.h:92)
==14429== by 0x83962A4: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:234)
==14429== by 0x8397025: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:322)
==14429== by 0x8395AE3: execute (zend_vm_execute.h:92)
==14429== by 0x83962A4: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:234)
==14429== by 0x8397025: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:322)
==14429==
==14429== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- n
==14429==
==14429== Conditional jump or move depends on uninitialised value(s)
==14429== at 0x45AE3E4: multi_runsingle (multi.c:1063)
==14429== by 0x45AF856: curl_multi_perform (multi.c:1255)
==14429== by 0x82D9D76: _http_request_pool_perform (http_request_pool_api.c:295)
==14429== by 0x82DFDA9: zim_HttpRequestPool_socketPerform (http_requestpool_object.c:363)
==14429== by 0x839604B: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:200)
==14429== by 0x8397025: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:322)
==14429== by 0x8395AE3: execute (zend_vm_execute.h:92)
==14429== by 0x83962A4: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:234)
==14429== by 0x8397025: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:322)
==14429== by 0x8395AE3: execute (zend_vm_execute.h:92)
==14429== by 0x83962A4: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:234)
==14429== by 0x8397025: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:322)
==14429==
==14429== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- n
==14429==
==14429== Conditional jump or move depends on uninitialised value(s)
==14429== at 0x45AE3EA: multi_runsingle (multi.c:1063)
==14429== by 0x45AF856: curl_multi_perform (multi.c:1255)
==14429== by 0x82D9D76: _http_request_pool_perform (http_request_pool_api.c:295)
==14429== by 0x82DFDA9: zim_HttpRequestPool_socketPerform (http_requestpool_object.c:363)
==14429== by 0x839604B: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:200)
==14429== by 0x8397025: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:322)
==14429== by 0x8395AE3: execute (zend_vm_execute.h:92)
==14429== by 0x83962A4: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:234)
==14429== by 0x8397025: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:322)
==14429== by 0x8395AE3: execute (zend_vm_execute.h:92)
==14429== by 0x83962A4: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:234)
==14429== by 0x8397025: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:322)
==14429==
==14429== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- n
==14429==
==14429== Conditional jump or move depends on uninitialised value(s)
==14429== at 0x45AE405: multi_runsingle (multi.c:1063)
==14429== by 0x45AF856: curl_multi_perform (multi.c:1255)
==14429== by 0x82D9D76: _http_request_pool_perform (http_request_pool_api.c:295)
==14429== by 0x82DFDA9: zim_HttpRequestPool_socketPerform (http_requestpool_object.c:363)
==14429== by 0x839604B: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:200)
==14429== by 0x8397025: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:322)
==14429== by 0x8395AE3: execute (zend_vm_execute.h:92)
==14429== by 0x83962A4: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:234)
==14429== by 0x8397025: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:322)
==14429== by 0x8395AE3: execute (zend_vm_execute.h:92)
==14429== by 0x83962A4: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:234)
==14429== by 0x8397025: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:322)
==14429==
==14429== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- n
Ignoring the response-body
Expire cleared
Connection #1 to host www.netcraft.com left intact
Issue another request to this URL: 'http://news.netcraft.com/'
Expire cleared
Closing connection #3
Issue another request to this URL: 'http://login.live.com/login.srf?id=2&svc=mail&cbid=24325&msppjph=1&tw=0&fs=1&fsa=1&fsat=1296000&lc=1033&_lang=EN'
Expire cleared
Connection #4 to host www.ieee.org left intact
Issue another request to this URL: 'http://www.ieee.org/portal/site'
Ignoring the response-body
Expire cleared
Connection #6 to host www.google.com left intact
Issue another request to this URL: 'http://www.google.at/'
About to connect() to news.netcraft.com port 80
Expire at 1158486582 / 380934 (49931ms)
  Trying 83.138.189.100...
Expire cleared
Connection #2 to host www.apple.com left intact
Pipe broke: handle 0x4aa4a50
Re-using existing connection! (#4) with host www.ieee.org
Connected to www.ieee.org (80.239.170.198) port 80
Expire cleared
Closing connection #5
About to connect() to www.google.at port 80
Expire at 1158486582 / 469134 (49941ms)
  Trying 72.14.221.99...
Expire cleared
Connection #8 to host www.cert.org left intact
Connection #9: recv pipe size = 1
Connected to news.netcraft.com (83.138.189.100) port 80
Connection #4: send pipe size = 1
Connection #3: send pipe size = 1
Connected to www.google.at (72.14.221.99) port 80
Expire cleared
Closing connection #0
Connection #5: send pipe size = 1
Connection #4: recv pipe size = 2
Expire cleared
Connection #9 to host www.bbc.co.uk left intact
Connection #3: recv pipe size = 1
Connection #5: recv pipe size = 1

Warning: HttpRequestPool::socketPerform(): couldn't connect to server; (http://www.hotmail.com/) in /home/mike/cvs/pecl/http/tests/HttpRequestPool_003.php on line 62
200 http://www.hp.com 55463
200 http://www.apple.com 8499
302 http://www.hotmail.com 0
403 http://www.wikipedia.org 1072
200 http://www.cert.org 15732
200 http://www.bbc.co.uk 43898
About to connect() to www.newslink.org port 80
Expire at 1158486583 / 768597 (49929ms)
  Trying 207.227.119.160...
About to connect() to www.dell.com port 80
Expire at 1158486583 / 841926 (49795ms)
  Trying 143.166.83.38...
About to connect() to www.heise.de port 80
Expire at 1158486584 / 48698 (49928ms)
  Trying 193.99.144.85...
About to connect() to www.usatoday.com port 80
Expire at 1158486584 / 122187 (49707ms)
  Trying 209.97.46.5...
About to connect() to www.oracle.com port 80
Expire at 1158486584 / 416403 (49912ms)
  Trying 141.146.8.66...
About to connect() to www.mit.edu port 80
Expire at 1158486584 / 506134 (49920ms)
  Trying 18.7.22.83...
Expire cleared
Connection #3 to host news.netcraft.com left intact
Connection #4 to host www.ieee.org left intact
Expire cleared
Connection #5 to host www.google.at left intact
Connected to www.newslink.org (207.227.119.160) port 80
Connected to www.dell.com (143.166.83.38) port 80
Connected to www.heise.de (193.99.144.85) port 80
Connected to www.usatoday.com (209.97.46.5) port 80
Connection #0: send pipe size = 1
Connection #10: send pipe size = 1
Connection #11: send pipe size = 1
Connection #12: send pipe size = 1
Connection #0: recv pipe size = 1
Connection #10: recv pipe size = 1
Connection #11: recv pipe size = 1
Connection #12: recv pipe size = 1
304 http://www.netcraft.com 0
304 http://www.ieee.org 0
200 http://www.google.com 2962
Connected to www.oracle.com (141.146.8.66) port 80
Connected to www.mit.edu (18.7.22.83) port 80
About to connect() to www.sky.com port 80
Expire at 1158486584 / 723577 (49823ms)
  Trying 195.173.72.67...
Closing connection #1
==14429==
==14429== Invalid write of size 1
==14429== at 0x459BF07: signalPipeClose (url.c:1867)
==14429== by 0x459C00C: Curl_disconnect (url.c:1772)
==14429== by 0x459D6FB: ConnectionKillOne (url.c:2047)
==14429== by 0x459FFF6: Curl_connect (url.c:2087)
==14429== by 0x45AE505: multi_runsingle (multi.c:793)
==14429== by 0x45AF856: curl_multi_perform (multi.c:1255)
==14429== by 0x82D9D76: _http_request_pool_perform (http_request_pool_api.c:295)
==14429== by 0x82DFDA9: zim_HttpRequestPool_socketPerform (http_requestpool_object.c:363)
==14429== by 0x839604B: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:200)
==14429== by 0x8397025: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:322)
==14429== by 0x8395AE3: execute (zend_vm_execute.h:92)
==14429== by 0x83962A4: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:234)
==14429== Address 0x4ABB23E is 34,038 bytes inside a block of size 34,100 free'd
==14429== at 0x401CFCF: free (vg_replace_malloc.c:235)
==14429== by 0x459D907: Curl_close (url.c:322)
==14429== by 0x45ABEFF: curl_easy_cleanup (easy.c:494)
==14429== by 0x82E37D7: _http_curl_free (http_request_api.c:212)
==14429== by 0x82E394D: _http_request_dtor (http_request_api.c:248)
==14429== by 0x82E3A13: _http_request_free (http_request_api.c:270)
==14429== by 0x82D34EA: _http_request_object_free (http_request_object.c:472)
==14429== by 0x8393A14: zend_objects_store_del_ref_by_handle (zend_objects_API.c:203)
==14429== by 0x839379F: zend_objects_store_del_ref (zend_objects_API.c:165)
==14429== by 0x836C0C9: _zval_dtor_func (zend_variables.c:52)
==14429== by 0x835D6A6: _zval_dtor (zend_variables.h:35)
==14429== by 0x835D950: _zval_ptr_dtor (zend_execute_API.c:409)
==14429==
==14429== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- y
starting debugger
==14429== starting debugger with cmd: /usr/bin/gdb -nw /proc/14430/fd/1014 14430
GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".

Attaching to program: /proc/14430/fd/1014, process 14430
Reading symbols from /usr/lib/valgrind/x86-linux/vgpreload_core.so...done.
Loaded symbols for /usr/lib/valgrind/x86-linux/vgpreload_core.so
Reading symbols from /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so...done.
Loaded symbols for /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so
Reading symbols from /lib/tls/i686/cmov/libcrypt.so.1...done.
Loaded symbols for /lib/tls/i686/cmov/libcrypt.so.1
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /usr/lib/libtidy-0.99.so.0...done.
Loaded symbols for /usr/lib/libtidy-0.99.so.0
Reading symbols from /lib/libbz2.so.1.0...done.
Loaded symbols for /lib/libbz2.so.1.0
Reading symbols from /lib/tls/i686/cmov/libresolv.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libresolv.so.2
Reading symbols from /lib/tls/i686/cmov/libm.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libm.so.6
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /lib/tls/i686/cmov/libnsl.so.1...done.
Loaded symbols for /lib/tls/i686/cmov/libnsl.so.1
Reading symbols from /usr/lib/libgssapi_krb5.so.2...done.
Loaded symbols for /usr/lib/libgssapi_krb5.so.2
Reading symbols from /usr/lib/libkrb5.so.3...done.
Loaded symbols for /usr/lib/libkrb5.so.3
Reading symbols from /usr/lib/libk5crypto.so.3...done.
Loaded symbols for /usr/lib/libk5crypto.so.3
Reading symbols from /usr/lib/libkrb5support.so.0...done.
Loaded symbols for /usr/lib/libkrb5support.so.0
Reading symbols from /lib/libcom_err.so.2...done.
Loaded symbols for /lib/libcom_err.so.2
Reading symbols from /usr/lib/i686/cmov/libssl.so.0.9.8...done.
Loaded symbols for /usr/lib/i686/cmov/libssl.so.0.9.8
Reading symbols from /usr/lib/i686/cmov/libcrypto.so.0.9.8...done.
Loaded symbols for /usr/lib/i686/cmov/libcrypto.so.0.9.8
Reading symbols from /usr/lib/libmysqlclient_r.so.14...done.
Loaded symbols for /usr/lib/libmysqlclient_r.so.14
Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...done.
[Thread debugging using libthread_db enabled]
[New Thread 74565088 (LWP 14429)]
Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0
Reading symbols from /usr/lib/libxml2.so.2...done.
Loaded symbols for /usr/lib/libxml2.so.2
Reading symbols from /usr/local/lib/libcurl.so.3...done.
Loaded symbols for /usr/local/lib/libcurl.so.3
Reading symbols from /usr/lib/libidn.so.11...done.
Loaded symbols for /usr/lib/libidn.so.11
Reading symbols from /lib/tls/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/tls/i686/cmov/libnss_files.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_files.so.2
Reading symbols from /lib/tls/i686/cmov/libnss_dns.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_dns.so.2
0x0459bf07 in signalPipeClose (pipe=0x4ad4b28) at url.c:1867
1867 data->state.pipe_broke = TRUE;
(gdb) bt
#0 0x0459bf07 in signalPipeClose (pipe=0x4ad4b28) at url.c:1867
#1 0x0459c00d in Curl_disconnect (conn=0x4ad07b8) at url.c:1772
#2 0x0459d6fc in ConnectionKillOne (data=0x4cf9940) at url.c:2047
#3 0x0459fff7 in Curl_connect (data=0x4cf9940, in_connect=0x4d037d4, asyncp=0xbeef50d6 "", protocol_done=0xbeef50d5 "") at url.c:2087
#4 0x045ae506 in multi_runsingle (multi=0x4a3dec8, easy=0x4d037c8) at multi.c:793
#5 0x045af857 in curl_multi_perform (multi_handle=0x4a3dec8, running_handles=0x4ab2d48) at multi.c:1255
#6 0x082d9d77 in _http_request_pool_perform (pool=0x4a3de54, tsrm_ls=0x471d188) at /home/mike/cvs/php-5.2/ext/http/http_request_pool_api.c:295
#7 0x082dfdaa in zim_HttpRequestPool_socketPerform (ht=0, return_value=0x4d11e58, return_value_ptr=0x0, this_ptr=0x4a3de08, return_value_used=1, tsrm_ls=0x471d188)
    at /home/mike/cvs/php-5.2/ext/http/http_requestpool_object.c:363
#8 0x0839604c in zend_do_fcall_common_helper_SPEC (execute_data=0xbeef56e4, tsrm_ls=0x471d188) at zend_vm_execute.h:200
#9 0x08397026 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbeef56e4, tsrm_ls=0x471d188) at zend_vm_execute.h:322
#10 0x08395ae4 in execute (op_array=0x4a32c08, tsrm_ls=0x471d188) at zend_vm_execute.h:92
#11 0x083962a5 in zend_do_fcall_common_helper_SPEC (execute_data=0xbeef5b54, tsrm_ls=0x471d188) at zend_vm_execute.h:234
#12 0x08397026 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbeef5b54, tsrm_ls=0x471d188) at zend_vm_execute.h:322
#13 0x08395ae4 in execute (op_array=0x4a2a950, tsrm_ls=0x471d188) at zend_vm_execute.h:92
#14 0x083962a5 in zend_do_fcall_common_helper_SPEC (execute_data=0xbeef5e94, tsrm_ls=0x471d188) at zend_vm_execute.h:234
#15 0x08397026 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbeef5e94, tsrm_ls=0x471d188) at zend_vm_execute.h:322
#16 0x08395ae4 in execute (op_array=0x4a27a00, tsrm_ls=0x471d188) at zend_vm_execute.h:92
#17 0x083962a5 in zend_do_fcall_common_helper_SPEC (execute_data=0xbeef6184, tsrm_ls=0x471d188) at zend_vm_execute.h:234
#18 0x08397026 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbeef6184, tsrm_ls=0x471d188) at zend_vm_execute.h:322
#19 0x08395ae4 in execute (op_array=0x4a1e5a8, tsrm_ls=0x471d188) at zend_vm_execute.h:92
#20 0x0836f35e in zend_execute_scripts (type=8, tsrm_ls=0x471d188, retval=0x0, file_count=3) at /home/mike/cvs/php-5.2/Zend/zend.c:1095
#21 0x0830a3f0 in php_execute_script (primary_file=0xbeef857c, tsrm_ls=0x471d188) at /home/mike/cvs/php-5.2/main/main.c:1759
#22 0x083f4986 in main (argc=2, argv=0xbeef86b4) at /home/mike/cvs/php-5.2/sapi/cli/php_cli.c:1097
(gdb) l
1862 curr = pipe->head;
1863 while (curr) {
1864 struct curl_llist_element *next = curr->next;
1865 struct SessionHandle *data = (struct SessionHandle *) curr->ptr;
1866
1867 data->state.pipe_broke = TRUE;
1868
1869 Curl_llist_remove(pipe, curr, NULL);
1870 curr = next;
1871 }
(gdb) p *pipe
$1 = {head = 0x4aff968, tail = 0x4aff968, dtor = 0x459dd47 <llist_dtor>, size = 1}
(gdb) p *curr
$2 = {ptr = 0x4ab2d48, prev = 0x0, next = 0x0}
(gdb) p *(struct SessionHandle*)data
No symbol "data" in current context.
(gdb) p *(struct SessionHandle*)curr->ptr
$3 = {dns = {hostcache = 0x0, hostcachetype = HCACHE_NONE}, multi = 0x0, share = 0x0, reqdata = {pathbuffer = 0x4b30d48 "/", path = 0x4b30d48 "/", newurl = 0x0, keep = {
      size = 0, bytecountp = 0x4afc6f0, maxdownload = 0, writebytecountp = 0x0, bytecount = 0, writebytecount = 0, headerbytecount = 138, deductheadercount = 0, start = {
        tv_sec = 1158486532, tv_usec = 582817}, now = {tv_sec = 1158486533, tv_usec = 764001}, header = 0 '\0', badheader = HEADER_NORMAL, headerline = 4,
      hbufp = 0x4abb2b2 "", hbuflen = 2, str = 0x4ab3206 "", str_start = 0x4ab3204 "\r\n", end_ptr = 0x4abb2b2 "", p = 0x4abb2b2 "", content_range = 0 '\0', offset = 0,
      httpcode = 304, httpversion = 11, start100 = {tv_sec = 0, tv_usec = 0}, write_after_100_header = 0 '\0', wait100_after_headers = 0 '\0', content_encoding = 0,
      zlib_init = 0 '\0', z = {next_in = 0x0, avail_in = 0, total_in = 0, next_out = 0x0, avail_out = 0, total_out = 0, msg = 0x0, state = 0x0, zalloc = 0, zfree = 0,
        opaque = 0x0, data_type = 0, adler = 0, reserved = 0}, timeofdoc = 0, bodywrites = 0,
      buf = 0x4ab317c "HTTP/1.1 304 Not Modified\r\nDate: Sun, 17 Sep 2006 09:48:48 GMT\r\nServer: Apache/1.3.27 (Unix) mod_perl/1.27\r\nETag: \"6794-6f04-4509480d\"\r\n\r\n", uploadbuf = 0x4ab717d "", maxfd = 7, keepon = 0, upload_done = 0 '\0', ignorebody = 0 '\0', ignorecl = 1 '\001'}, upload_present = 0, upload_fromhere = 0x0, size = -1,
    bytecountp = 0x4afc6f0, maxdownload = -1, writebytecountp = 0x0, use_range = 0 '\0', rangestringalloc = 0 '\0', range = 0x0, resume_from = 0, proto = {http = 0x4afc6d8,
      https = 0x4afc6d8, ftp = 0x4afc6d8, tftp = 0x4afc6d8, file = 0x4afc6d8, telnet = 0x4afc6d8, generic = 0x4afc6d8}}, set = {err = 0x4716f80, debugdata = 0x4ab0c88,
    errorbuffer = 0x4ab0d08 "", proxyuserpwd = 0x0, proxyport = 0, out = 0x47170e0, in = 0x0, writeheader = 0x0, set_url = 0x4abb678 "http://www.netcraft.com/",
    set_proxy = 0x0, use_port = 0, userpwd = 0x0, httpauth = 1, proxyauth = 1, set_range = 0x0, followlocation = 1, maxredirs = 5, set_referer = 0x0, free_referer = 0 '\0',
    useragent = 0x84939e0 "PECL::HTTP/1.3.0dev (PHP/5.2.0RC2-dev)", encoding = 0x0, postfields = 0x0, postfieldsize = 0, ftpport = 0x0, device = 0x0, localport = 0,
    localportrange = 0, fwrite = 0x82e359d <http_curl_dummy_callback>, fwrite_header = 0, fread = 0x82eaea2 <http_curl_read_callback>, fprogress = 0, fdebug = 0,
    ioctl = 0x82eb225 <http_curl_ioctl_callback>, fsockopt = 0, sockopt_client = 0x0, convfromnetwork = 0, convtonetwork = 0, convfromutf8 = 0, progress_client = 0x0,
    ioctl_client = 0x0, timeout = 50, connecttimeout = 50, ftp_response_timeout = 0, infilesize = 0, low_speed_limit = 0, low_speed_time = 0,
    max_send_speed = 589473313504362496, max_recv_speed = 589473313504362496, set_resume_from = 0, cookie = 0x0, headers = 0x4abc960, httppost = 0x0, cert = 0x0,
    cert_type = 0x0, key = 0x0, key_type = 0x0, key_passwd = 0x0, cookiejar = 0x0, cookiesession = 0 '\0', crlf = 0 '\0', ftp_account = 0x0, ftp_alternative_to_user = 0x0,
    quote = 0x0, postquote = 0x0, prequote = 0x0, source_quote = 0x0, source_prequote = 0x0, source_postquote = 0x0, telnet_options = 0x0,
    timecondition = CURL_TIMECOND_IFMODSINCE, timevalue = 1158253700, closepolicy = CURLCLOSEPOLICY_NONE, httpreq = HTTPREQ_GET, customrequest = 0x0, httpversion = 0,
    auth_host = 0x0, krb4_level = 0x0, ssl = {version = 0, certverifyresult = 0, verifypeer = 0, verifyhost = 0, CApath = 0x0, CAfile = 0x0, random_file = 0x0,
      egdsocket = 0x0, cipher_list = 0x0, numsessions = 5, fsslctx = 0, fsslctxp = 0x0, sessionid = 1 '\001'}, proxytype = CURLPROXY_HTTP, dns_cache_timeout = 60,
    buffer_size = 0, private_data = 0x4ab0c88 "", one_easy = 0x0, http200aliases = 0x0, ip_version = 0, max_filesize = 0, source_url = 0x0, source_userpwd = 0x0,
    ftp_filemethod = FTPFILE_MULTICWD, printhost = 0 '\0', get_filetime = 1 '\001', tunnel_thru_httpproxy = 0 '\0', prefer_ascii = 0 '\0', ftp_append = 0 '\0',
    ftp_list_only = 0 '\0', ftp_create_missing_dirs = 0 '\0', ftp_use_port = 0 '\0', hide_progress = 1 '\001', http_fail_on_error = 0 '\0', http_follow_location = 1 '\001',
    http_disable_hostname_check_before_authentication = 0 '\0', include_header = 0 '\0', http_set_referer = 0 '\0', http_auto_referer = 1 '\001', opt_no_body = 0 '\0',
    set_port = 0 '\0', upload = 0 '\0', use_netrc = CURL_NETRC_IGNORED, netrc_file = 0x0, verbose = 0 '\0', krb4 = 0 '\0', reuse_forbid = 0 '\0', reuse_fresh = 0 '\0',
    ftp_use_epsv = 1 '\001', ftp_use_eprt = 1 '\001', ftp_ssl = CURLFTPSSL_NONE, ftpsslauth = CURLFTPAUTH_DEFAULT, no_signal = 1 '\001', global_dns_cache = 0 '\0',
    tcp_nodelay = 0 '\0', ignorecl = 0 '\0', ftp_skip_ip = 0 '\0', connect_only = 0 '\0'}, change = {url = 0x4b08260 "http://news.netcraft.com/", url_alloc = 1 '\001',
    url_changed = 0 '\0', proxy = 0x0, proxy_alloc = 0 '\0', referer = 0x4b08300 "http://www.netcraft.com/", referer_alloc = 1 '\001', cookielist = 0x0}, cookies = 0x0,
  progress = {lastshow = 1158486534, size_dl = 0, size_ul = 0, downloaded = 0, uploaded = 0, current_speed = 0, callback = 0 '\0', width = 0, flags = 16,
    timespent = 11.245684000000001, dlspeed = 0, ulspeed = 0, t_nslookup = 0.069071999999999995, t_connect = 0.16509399999999999, t_pretransfer = 0.20247299999999999,
    t_starttransfer = 1.382684, t_redirect = 8.8440899999999996, start = {tv_sec = 1158486523, tv_usec = 342252}, t_startsingle = {tv_sec = 1158486532, tv_usec = 380357},
    speeder = {0, 0, 0, 0, 0, 0}, speeder_time = {{tv_sec = 1158486533, tv_usec = 764017}, {tv_sec = 1158486534, tv_usec = 587936}, {tv_sec = 0, tv_usec = 0}, {tv_sec = 0,
        tv_usec = 0}, {tv_sec = 0, tv_usec = 0}, {tv_sec = 0, tv_usec = 0}}, speeder_c = 0}, state = {used_interface = Curl_if_multi, connc = 0x0, keeps_speed = {
      tv_sec = 1158486533, tv_usec = 764001}, lastconnect = 3, headerbuff = 0x4abb2b0 "\r\n", headersize = 256,
    buffer = "HTTP/1.1 304 Not Modified\r\nDate: Sun, 17 Sep 2006 09:48:48 GMT\r\nServer: Apache/1.3.27 (Unix) mod_perl/1.27\r\nETag: \"6794-6f04-4509480d\"\r\n\r\n\000ransfer-Encoding: chunked\r\nContent-Type: text/html; charset=i"..., uploadbuffer = '\0' <repeats 16384 times>, current_speed = -1, this_is_a_follow = 1 '\001',
    is_in_pipeline = 0 '\0', first_host = 0x4afbe78 "www.netcraft.com", session = 0x0, sessionage = 1, scratch = 0x0, errorbuf = 0 '\0', os_errno = 0, prev_signal = 0,
    allow_port = 0 '\0', digest = {nonce = 0x0, cnonce = 0x0, realm = 0x0, algo = 0, stale = 0 '\0', opaque = 0x0, qop = 0x0, algorithm = 0x0, nc = 0}, proxydigest = {
      nonce = 0x0, cnonce = 0x0, realm = 0x0, algo = 0, stale = 0 '\0', opaque = 0x0, qop = 0x0, algorithm = 0x0, nc = 0}, authhost = {want = 1, picked = 0, avail = 0,
      done = 1 '\001', multi = 0 '\0'}, authproxy = {want = 1, picked = 0, avail = 0, done = 1 '\001', multi = 0 '\0'}, authproblem = 0 '\0', engine = 0x0, expiretime = {
      tv_sec = 0, tv_usec = 0}, timenode = {smaller = 0x0, larger = 0x0, same = 0x0, key = -1, payload = 0x4ab2d48}, most_recent_ftp_entrypath = 0x0,
    ftp_trying_alternative = 0 '\0', expect100header = 0 '\0', pipe_broke = 0 '\0', cancelled = 0 '\0', prev_block_had_trailing_cr = 0 '\0', crlf_conversions = 0,
    shared_conn = 0x0}, info = {httpcode = 304, httpproxycode = 0, httpversion = 11, filetime = -1, header_size = 351, request_size = 436, proxyauthavail = 0,
    httpauthavail = 0, numconnects = 2, contenttype = 0x4b082b0 "text/html; charset=iso-8859-1"}, magic = 0}
(gdb) f 6
#6 0x082d9d77 in _http_request_pool_perform (pool=0x4a3de54, tsrm_ls=0x471d188) at /home/mike/cvs/php-5.2/ext/http/http_request_pool_api.c:295
295 while (CURLM_CALL_MULTI_PERFORM == curl_multi_perform(pool->ch, &pool->unfinished));
(gdb) l
290 PHP_HTTP_API int _http_request_pool_perform(http_request_pool *pool TSRMLS_DC)
291 {
292 CURLMsg *msg;
293 int remaining = 0;
294
295 while (CURLM_CALL_MULTI_PERFORM == curl_multi_perform(pool->ch, &pool->unfinished));
296
297 while ((msg = curl_multi_info_read(pool->ch, &remaining))) {
298 if (CURLMSG_DONE == msg->msg) {
299 if (CURLE_OK != msg->data.result) {
(gdb) p *pool
$4 = {ch = 0x4a3dec8, finished = {head = 0x0, tail = 0x0, count = 0, size = 4, dtor = 0x836c472 <_zval_ptr_dtor_wrapper>, persistent = 0 '\0', traverse_ptr = 0x0},
  handles = {head = 0x4a74988, tail = 0x4d11dd8, count = 10, size = 4, dtor = 0x836c472 <_zval_ptr_dtor_wrapper>, persistent = 0 '\0', traverse_ptr = 0x0}, unfinished = 10}
(gdb) q
The program is running. Quit anyway (and detach it)? (y or n) y
Received on 2006-09-17