php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37171 crashes when using curl_multi_*
Submitted: 2006-04-22 19:49 UTC Modified: 2006-04-30 01:00 UTC
Votes:3
Avg. Score:4.7 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:2 (100.0%)
From: bishopx at quick dot cz Assigned:
Status: No Feedback Package: cURL related
PHP Version: 5.1.3RC3 OS: win32
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bishopx at quick dot cz
New email:
PHP Version: OS:

 

 [2006-04-22 19:49 UTC] bishopx at quick dot cz
Description:
------------
php_curl.dll is the cause of frequent crashes when using curl_multi_*() functions, especially curl*_close() and curl_multi_remove_handle(). However, even other functions sometimes cause a crash (I removed the above ones). The situation in the latest snapshots remains the same.

It looks like a poor thread synchronisation.

Apache 2.2.x used.

Reproduce code:
---------------
This should work fine: http://php.net/manual/en/function.curl-multi-exec.php#48813
..but you may have to increase the number of links in $connomains, or change them to pictures.

Expected result:
----------------
The code doesn't crash the webserver.

Actual result:
--------------
The code often crashes the webserver (not always).

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-22 19:58 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip


 [2006-04-22 20:26 UTC] bishopx at quick dot cz
I already tried, crashing..
 [2006-04-22 20:30 UTC] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2006-04-22 21:47 UTC] bishopx at quick dot cz
This is the call stack generated in VC8 using debug symbols for VC6, so the info is incomplete. However, I was able to decipher from asm that it crashes when reading the pointer curl_llist_element *e, the second argument of Curl_llist_insert_next(), hence the error:
Unhandled exception at 0x013d0c78 (php_curl.dll) in httpd.exe: 0xC0000005: Access violation reading location 0x00000008.

>	php_curl.dll!_Curl_llist_insert_next()  + 0x48 bytes	
 	php_curl.dll!_Curl_hash_add()  + 0x71 bytes	
 	php_curl.dll!_Curl_cache_addr()  + 0x6b bytes	
 	php_curl.dll!_Curl_addrinfo4_callback()  + 0x82 bytes	
 	php_curl.dll!_Curl_addrinfo4_callback()  + 0x14 bytes	
 	php_curl.dll!_Curl_getaddrinfo()  + 0x2af bytes	
 	ntdll.dll!7c91056d() 	
 	[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]	
 	kernel32.dll!7c80b50b() 	
 	ntdll.dll!7c91056d() 	
 	kernel32.dll!7c8399f3() 	

.. this looks like a thread created in php_curl.

I suggest to implement debug tracing like this one: http://www.codeproject.com/debug/extendedtrace.asp
This would greatly improve the feedback from users, because there would be no need for installing Visual Studio or compiling the source. Only 2 things are needed: pdb files and dbghelp.dll (a text file is generated).
 [2006-04-22 22:31 UTC] tony2001@php.net
Well, the backtrace is obviously invalid and doesn't add any helpful information..

>I suggest to implement debug tracing like this one:
>http://www.codeproject.com/debug/extendedtrace.asp
Sure. If you can do it - please, do.
Unfortunately I don't use windows, so I've no clue what's this all about..

Are you able to reproduce it with Apache1 ?
Did you try with PHP CLI ?
 [2006-04-30 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Oct 21 11:01:24 2020 UTC