Hi!
I downloaded a fresh copy of PHP-5.2.6 and configured it with
--disable-all --enable-debug --with-mssql. PHP -v gives:
PHP 5.2.6 (cli) (built: Oct 15 2008 10:30:23) (DEBUG)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
Valgrinds output from the same sample script:
==21018== Memcheck, a memory error detector.
==21018== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==21018== Using LibVEX rev 1854, a library for dynamic binary translation.
==21018== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==21018== Using valgrind-3.3.1, a dynamic binary instrumentation framework.
==21018== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==21018== For more details, rerun with: -v
==21018==
==21018== My PID = 21018, parent PID = 2824. Prog and args are:
==21018== ./php
==21018== /var/www/asta/testcases/TestMsSQL.php
==21018==
==21018== Conditional jump or move depends on uninitialised value(s)
==21018== at 0x400B4E0: _dl_relocate_object (in /lib/ld-2.5.so)
==21018== by 0x4004027: dl_main (in /lib/ld-2.5.so)
==21018== by 0x4014A05: _dl_sysdep_start (in /lib/ld-2.5.so)
==21018== by 0x4000C2F: _dl_start (in /lib/ld-2.5.so)
==21018== by 0x4000816: (within /lib/ld-2.5.so)
==21018==
==21018== Conditional jump or move depends on uninitialised value(s)
==21018== at 0x400B1C2: _dl_relocate_object (in /lib/ld-2.5.so)
==21018== by 0x4004027: dl_main (in /lib/ld-2.5.so)
==21018== by 0x4014A05: _dl_sysdep_start (in /lib/ld-2.5.so)
==21018== by 0x4000C2F: _dl_start (in /lib/ld-2.5.so)
==21018== by 0x4000816: (within /lib/ld-2.5.so)
==21018==
==21018== Conditional jump or move depends on uninitialised value(s)
==21018== at 0x400B971: _dl_relocate_object (in /lib/ld-2.5.so)
==21018== by 0x4004027: dl_main (in /lib/ld-2.5.so)
==21018== by 0x4014A05: _dl_sysdep_start (in /lib/ld-2.5.so)
==21018== by 0x4000C2F: _dl_start (in /lib/ld-2.5.so)
==21018== by 0x4000816: (within /lib/ld-2.5.so)
==21018==
==21018== Conditional jump or move depends on uninitialised value(s)
==21018== at 0x400B079: _dl_relocate_object (in /lib/ld-2.5.so)
==21018== by 0x400413D: dl_main (in /lib/ld-2.5.so)
==21018== by 0x4014A05: _dl_sysdep_start (in /lib/ld-2.5.so)
==21018== by 0x4000C2F: _dl_start (in /lib/ld-2.5.so)
==21018== by 0x4000816: (within /lib/ld-2.5.so)
==21018==
==21018== Conditional jump or move depends on uninitialised value(s)
==21018== at 0x400B081: _dl_relocate_object (in /lib/ld-2.5.so)
==21018== by 0x400413D: dl_main (in /lib/ld-2.5.so)
==21018== by 0x4014A05: _dl_sysdep_start (in /lib/ld-2.5.so)
==21018== by 0x4000C2F: _dl_start (in /lib/ld-2.5.so)
==21018== by 0x4000816: (within /lib/ld-2.5.so)
==21018==
==21018== Conditional jump or move depends on uninitialised value(s)
==21018== at 0x400B1C2: _dl_relocate_object (in /lib/ld-2.5.so)
==21018== by 0x400413D: dl_main (in /lib/ld-2.5.so)
==21018== by 0x4014A05: _dl_sysdep_start (in /lib/ld-2.5.so)
==21018== by 0x4000C2F: _dl_start (in /lib/ld-2.5.so)
==21018== by 0x4000816: (within /lib/ld-2.5.so)
==21018==
==21018== Conditional jump or move depends on uninitialised value(s)
==21018== at 0x400B4E0: _dl_relocate_object (in /lib/ld-2.5.so)
==21018== by 0x401251F: dl_open_worker (in /lib/ld-2.5.so)
==21018== by 0x400E3B1: _dl_catch_error (in /lib/ld-2.5.so)
==21018== by 0x4011E48: _dl_open (in /lib/ld-2.5.so)
==21018== by 0x42065C0: do_dlopen (in /lib/libc-2.5.so)
==21018== by 0x400E3B1: _dl_catch_error (in /lib/ld-2.5.so)
==21018== by 0x4206764: __libc_dlopen_mode (in /lib/libc-2.5.so)
==21018== by 0x41E11F6: __nss_lookup_function (in /lib/libc-2.5.so)
==21018== by 0x41E128F: __nss_lookup (in /lib/libc-2.5.so)
==21018== by 0x41E3025: __nss_passwd_lookup (in /lib/libc-2.5.so)
==21018== by 0x418FBFE: getpwuid_r@@GLIBC_2.1.2 (in /lib/libc-2.5.so)
==21018== by 0x408D637: tds_get_homedir (threadsafe.c:394)
==21018==
==21018== Conditional jump or move depends on uninitialised value(s)
==21018== at 0x400B1C2: _dl_relocate_object (in /lib/ld-2.5.so)
==21018== by 0x401251F: dl_open_worker (in /lib/ld-2.5.so)
==21018== by 0x400E3B1: _dl_catch_error (in /lib/ld-2.5.so)
==21018== by 0x4011E48: _dl_open (in /lib/ld-2.5.so)
==21018== by 0x42065C0: do_dlopen (in /lib/libc-2.5.so)
==21018== by 0x400E3B1: _dl_catch_error (in /lib/ld-2.5.so)
==21018== by 0x4206764: __libc_dlopen_mode (in /lib/libc-2.5.so)
==21018== by 0x41E11F6: __nss_lookup_function (in /lib/libc-2.5.so)
==21018== by 0x41E128F: __nss_lookup (in /lib/libc-2.5.so)
==21018== by 0x41E3025: __nss_passwd_lookup (in /lib/libc-2.5.so)
==21018== by 0x418FBFE: getpwuid_r@@GLIBC_2.1.2 (in /lib/libc-2.5.so)
==21018== by 0x408D637: tds_get_homedir (threadsafe.c:394)
==21018==
==21018== ERROR SUMMARY: 31 errors from 8 contexts (suppressed: 0 from 0)
==21018== malloc/free: in use at exit: 0 bytes in 0 blocks.
==21018== malloc/free: 6,407 allocs, 6,407 frees, 1,518,308 bytes allocated.
==21018== For counts of detected errors, rerun with: -v
==21018== All heap blocks were freed -- no leaks are possible.
Says "no leaks are possible"... :)
So I guess that the suscpected leak was in some modules that was now
excluded, or maybe this issue has been fixed in PHP 5.2.6? I'm gonna try
exactly the same expiriment on the Ubuntu machine also...
/Krister Karlsröm
Ilia Alshanetsky wrote:
Can you try to compile PHP with --disable-all --enable-debug and a flag
for the mssql extension, then try to run valgrind. From the output it
seems there maybe errors in dl() library.
On 14-Oct-08, at 4:15 AM, Krister Karlström wrote:
Hi,
I run the script on a server in our production environment, a
slackware server with a self compiled PHP from source. The PHP version
was 5.2.5.
php-v gives the following:
PHP 5.2.5 (cli) (built: Mar 28 2008 12:02:55)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
I found the problem on a development server which was running Ubuntu
and apperently also the Suhosin patch (the latest available packet
from Ubuntu).
/Krister Karlström
Pierre Joye wrote:
hi,
On Tue, Oct 14, 2008 at 8:46 AM, Krister Karlström
<[EMAIL PROTECTED]> wrote:
About this bug #44872, I run my small sample script (posted on the bug
reporting page) through valgrind and got the attached output. I'm
not sure
whether this shows that there's a leak in the mssql extension or if
this is
normal. Valgrind said that 853 bytes where definitely lost, does
this mean
that there is a memory leak? Hopefully someone who is better to analyze
valgrinds output than me can tell the answer... Here's the full
output from
valgrind:
That's exactly why it is not as easy that some may say. This report
shows the (expected sometimes) warnings with dl and something related
to the SNMP extension. The scripts in the bug report were using mysqli
and mssql, with all kind of possible extensions (zend optimizer,
debugger, etc.) and patches applied.
Did you run it using a self compiled php? Which version?
Cheers,
--
* Ing. Krister Karlström, Zend Certified Engineer *
* Systemutvecklare, IT-Centralen *
* Arcada - Nylands Svenska Yrkeshögskola *
* Jan-Magnus Janssons plats 1, 00550 Helsingfors, Finland *
* Tel: +358(20)7699699 GSM: +358(50)5328390 *
* E-mail: [EMAIL PROTECTED] *
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php