On Mon, 2002-01-07 at 19:20, Melvyn Sopacua wrote:
> At 16:11 1/7/2002 +0000, [EMAIL PROTECTED] wrote:
>
> >ID: 14848
> >User updated by: [EMAIL PROTECTED]
> >Reported By: [EMAIL PROTECTED]
> >Status: Open
> >Bug Type: Reproducible crash
> >Operating System: Linux
>
> The crash is created due to shell limits, as this creates 157/159M of
> memory in an instant.
> $ ulimit -d
> 393216
>
> $ php -d max_execution_time=900 -q -e ./crashtest.php
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.1//EN"
> "http://www.w3.org/1999/xhtml">
>
> <html>
> <head>
> <title>Untitled</title>
> </head>
>
> <body>
>
> OK!
>
>
> </body>
> </html>
>
> $ ulimit -d 65536
>
> $ php -d max_execution_time=900 -q -e ./crashtest.php
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.1//EN"
> "http://www.w3.org/1999/xhtml">
>
> <html>
> <head>
> <title>Untitled</title>
> </head>
>
> <body>
>
> FATAL: emalloc(): Unable to allocate 32 bytes
> Segmentation fault (core dumped)
>
>
> In a web environment it also kept 'unwinding' CPU time slowly - like 30
> secs and only freed
> 5 megs:
> PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
> 18974 nobody 18 0 152M 157M sleep 1:25 0.00% 0.00% httpd
>
> Only after a SIGHUP on Apache, the memory will be freed.
> Tested with CVS/php4-200201050300.
I don't have any limits set....
ulimit -a shows the following
core file size (blocks) 1000000
data seg size (kbytes) unlimited
file size (blocks) unlimited
max locked memory (kbytes) unlimited
max memory size (kbytes) unlimited
open files 1024
pipe size (512 bytes) 8
stack size (kbytes) 8192
cpu time (seconds) unlimited
max user processes 4095
virtual memory (kbytes) unlimited
And if I launch the test
$ php -d max_execution_time=900 -q -e ./test.php
OK!
PHP Fatal error: Maximum execution time of 30 seconds exceeded in
Unknown on line 0
<br>
<b>Fatal error</b>: Maximum execution time of 30 seconds exceeded in
<b>Unknown</b> on line <b>0</b><br>
Segmentation fault (core dumped)
Backtrace:
#0 chunk_free (ar_ptr=0x4026b520, p=0x8debfb0) at malloc.c:3180
3180 malloc.c: No such file or directory.
in malloc.c
(gdb) bt
#0 chunk_free (ar_ptr=0x4026b520, p=0x8debfb0) at malloc.c:3180
#1 0x401b9ba8 in __libc_free (mem=0x8debfb8) at malloc.c:3154
#2 0x080e3dcd in _efree (ptr=0x8debfc4) at zend_alloc.c:246
#3 0x080e420b in shutdown_memory_manager (silent=1, clean_cache=1) at
zend_alloc.c:469
#4 0x0806361a in php_module_shutdown () at main.c:1005
#5 0x0806228d in main (argc=6, argv=0xbffff854) at cgi_main.c:788
#6 0x40159306 in __libc_start_main (main=0x8061978 <main>, argc=6,
ubp_av=0xbffff854, init=0x80600c4 <_init>, fini=0x810ffe0 <_fini>,
rtld_fini=0x4000d2dc <_dl_fini>, stack_end=0xbffff84c) at
../sysdeps/generic/libc-start.c:129
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]