ID:               24557
 Updated by:       [EMAIL PROTECTED]
 Reported By:      wmeler at wp-sa dot pl
-Status:           Open
+Status:           Closed
 Bug Type:         Network related
 Operating System: RH 7.3
 PHP Version:      4CVS-2003-07-09 (stable)
 Assigned To:      wez
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

If you find any more streams related bugs please open a seperate
report, it'll be much easier for us to track bugs that way :).


Previous Comments:
------------------------------------------------------------------------

[2003-07-28 04:34:48] wmeler at wp-sa dot pl

There are sill some issues with streams.
Now pfsockopen causes segfaults on php4-STABLE-200307280730 :

./configure ---disable-all --enable-debug

....


./make

.....


./sapi/cli/php -r
'$f=pfsockopen("www.php.net",80,$errno,$errmsg,2);fputs($f,"SHIT\r\n\r\n");fpassthru($f);fclose($f);'

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>301 Moved Permanently</TITLE>
</HEAD><BODY>
<H1>Moved Permanently</H1>
The document has moved <A HREF="http://www.php.net/";>here</A>.<P>
</BODY></HTML>
Segmentation fault (core dumped)



./gdb -c core sapi/php/cli
bt
#0  0x40128c25 in __libc_free (mem=0x816c038) at malloc.c:3155
#1  0x80f8edb in zend_hash_apply_deleter (ht=0x8143314, p=0x816c148)
    at /tmp/php4-STABLE-200307280730/Zend/zend_hash.c:601
#2  0x80f90ea in zend_hash_graceful_reverse_destroy (ht=0x8143314)
    at /tmp/php4-STABLE-200307280730/Zend/zend_hash.c:664
#3  0x80fab99 in zend_destroy_rsrc_list (ht=0x8143314)
    at /tmp/php4-STABLE-200307280730/Zend/zend_list.c:233
#4  0x80f30fb in zend_shutdown ()
    at /tmp/php4-STABLE-200307280730/Zend/zend.c:555
#5  0x80c284b in php_module_shutdown ()
    at /tmp/php4-STABLE-200307280730/main/main.c:1281
#6  0x8109c73 in main (argc=3, argv=0xbffff974)
    at /tmp/php4-STABLE-200307280730/sapi/cli/php_cli.c:877
#7  0x400c4507 in __libc_start_main (main=0x81091b8 <main>, argc=3,
    ubp_av=0xbffff974, init=0x8059760 <_init>, fini=0x810a250 <_fini>,
    rtld_fini=0x4000dc14 <_dl_fini>, stack_end=0xbffff96c)
    at ../sysdeps/generic/libc-start.c:129


And I think you really should review php_stream_close usage. I'm sure
that pclose function would cause the same problems as fclose caused
before. All places that user can make reference to resource should use
zend_list_delete.

------------------------------------------------------------------------

[2003-07-27 13:46:10] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.



------------------------------------------------------------------------

[2003-07-11 04:48:45] [EMAIL PROTECTED]

So, you patched your web server, you patched PHP and compiled it in the
unsupported maintainer thread-safe mode and expect me to fix the
segfault? :-)

Maybe its better for you to ask questions on the internals list if you
are developing your own SAPI.

Not a bug in any of the supported PHP configurations, so we are not
going to fix it.

------------------------------------------------------------------------

[2003-07-10 08:49:04] [EMAIL PROTECTED]

Assigned to the father of streams. :)


------------------------------------------------------------------------

[2003-07-10 01:54:24] wmeler at wp-sa dot pl

I enable ZTS, because I use threads. I have one IO thread  and more PHP
threads. As I said, it isn't pure thttpd and PHP. My web server has
quite nice architecture - I have queues, processors, queue overflow
control etc.

About configure parameters - I use the same compilation on another web
aplications and it is working well. Difference is that they don't use
socket streams. They use oci8 and ldap without any problems. As far I
know oracle ldap functions doesn't perform well and we use iplanet
libraries with success. No problems with that.

I can reduce config.nice by only few modules (ftp zlib gdbm gettext
xml). Others are needed by my app.

Anyway - don't you think that these STREAM_DEBUG messages are strange?

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/24557

-- 
Edit this bug report at http://bugs.php.net/?id=24557&edit=1

Reply via email to