|  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
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
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-04-22 19:49 UTC] bishopx at quick dot cz
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:
..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).


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-22 19:58 UTC]
Please try using this CVS snapshot:
For Windows:

 [2006-04-22 20:26 UTC] bishopx at quick dot cz
I already tried, crashing..
 [2006-04-22 20:30 UTC]
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 for *NIX and 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	
 	[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]	

.. this looks like a thread created in php_curl.

I suggest to implement debug tracing like this one:
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]
Well, the backtrace is obviously invalid and doesn't add any helpful information..

>I suggest to implement debug tracing like this one:
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-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 25 17:01:27 2024 UTC