Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99616 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8654 invoked from network); 22 Jun 2017 19:12:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jun 2017 19:12:20 -0000 Authentication-Results: pb1.pair.com smtp.mail=jakub.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jakub.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.170 as permitted sender) X-PHP-List-Original-Sender: jakub.php@gmail.com X-Host-Fingerprint: 209.85.161.170 mail-yw0-f170.google.com Received: from [209.85.161.170] ([209.85.161.170:34397] helo=mail-yw0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0A/16-52620-3961C495 for ; Thu, 22 Jun 2017 15:12:19 -0400 Received: by mail-yw0-f170.google.com with SMTP id e142so9631154ywa.1 for ; Thu, 22 Jun 2017 12:12:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=ON+4OaFw8O0JGkaIy3G05qW/ly8iDN8RMll4W8pACJw=; b=qjef0Zc5VU8q3Jy+vHECnPm/hN2ouGYW09lm0Mkpvf/EjI2hOwF21xUbvKBMO0Dzfo VT991suthLzxjI6FFxqfHzqJcOWCa8d9gFqIiE50eLkZ6/ru6u2HyKxPb2eA7gaK0pAH hihB/MT9UcI7ACDrJcKEmkJF7zNoEMSSCjzgorEFt2SkHTgaM0bVkbjeCM57e/gs0QVl laZ4ylOVuvoMkYl6h6WW5vXIsc3UgpJ3Gd+4uawzJ1VeJrv+EFBuSO1xaX8J3KLBTqng xBNeGk36mgZRjJDlBJ8q89e08rgf5c8zBbsddAD7QtCeqpbiUqj8lWpvd2tGODeq4rWV lS6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=ON+4OaFw8O0JGkaIy3G05qW/ly8iDN8RMll4W8pACJw=; b=Q3pPvgP2kIeXpw3l9TfjIAZlSUFrOL2q2TeEBakv/EOrA/ini2ADXrzWmnqWvnQMQY RaWiMWvEwWQEYEl16OC1611iRw5tOCruyLuDYL57npYILk1uTiE9mlYpuCvmz/9L4Vx3 NoB2BiPkYgnHjvxmS03sWg5qTNjo44H3lfPBtiejnsLe4v7/1wh7e+/SwrKIH4NOwrtU mSoSSpFtRc1XKqgPs5S4vMM4lgkjltnjCBDVbq06okn8qSlQanw89nz660rqDL2YoQ4P csl0+LWVilLed34MuuKTSpiJIXkZHZ3xlh8R5HrGRTQ3DWet//N1b6XVWBnurpccQb6e MKIQ== X-Gm-Message-State: AKS2vOzt48zjPf/9k0eOHGWeiPJykcCWEM4mTQOhz0zc0SEuTRai1oec PBMpiFA/qCJTPanSkVKqT2gU9E8QvA== X-Received: by 10.129.155.10 with SMTP id s10mr3232090ywg.315.1498158737005; Thu, 22 Jun 2017 12:12:17 -0700 (PDT) MIME-Version: 1.0 Sender: jakub.php@gmail.com Received: by 10.129.85.72 with HTTP; Thu, 22 Jun 2017 12:12:16 -0700 (PDT) In-Reply-To: References: Date: Thu, 22 Jun 2017 20:12:16 +0100 X-Google-Sender-Auth: zZS-ei9vQ67pAtWdzcNcdhQ9Ynw Message-ID: To: Nikita Popov Cc: Dmitry Stogov , PHP internals list Content-Type: multipart/alternative; boundary="94eb2c0b928256251b0552914375" Subject: Re: [PHP-DEV] Valgrind failures From: bukka@php.net (Jakub Zelenka) --94eb2c0b928256251b0552914375 Content-Type: text/plain; charset="UTF-8" Ah thanks I see! Just out of interest what changes actually caused it as it's master only? On Thu, Jun 22, 2017 at 7:51 PM, Nikita Popov wrote: > On Thu, Jun 22, 2017 at 8:45 PM, Jakub Zelenka wrote: > >> Hi Dmitry, >> >> I noticed that valgind reports a lot of memleaks for the master and it >> seems to be related to the freeing of registered classes on shutdown when >> running cli. I'm wondering if it can be related to your recent changes >> that >> were touching that parts. I haven't found the commit that caused but 7.1 >> is >> fine. If you don't think that it was related I will try to find it but >> wanted to check with you first. >> >> Here is a part of the output what I'm getting when running valgrind on >> debug build for master: >> >> valgrind --leak-check=full php ext/openssl/tests/openssl_dige >> st_basic.phpt >> ... >> ... (simillar info like this for all loaded extensions like the below) >> ... >> ==4101== 648 bytes in 9 blocks are definitely lost in loss record 69 of 70 >> ==4101== at 0x4C2DB9D: malloc (vg_replace_malloc.c:299) >> ==4101== by 0xB7DC7D: zend_register_functions (zend_API.c:2304) >> ==4101== by 0xB7F209: do_register_internal_class (zend_API.c:2714) >> ==4101== by 0xB7F400: zend_register_internal_class (zend_API.c:2762) >> ==4101== by 0xB7F2BF: zend_register_internal_class_ex >> (zend_API.c:2734) >> ==4101== by 0x64EFAC: zm_startup_dom (php_dom.c:643) >> ==4101== by 0xB7C211: zend_startup_module_ex (zend_API.c:1873) >> ==4101== by 0xB7C29B: zend_startup_module_zval (zend_API.c:1888) >> ==4101== by 0xB8B6B1: zend_hash_apply (zend_hash.c:1507) >> ==4101== by 0xB7C907: zend_startup_modules (zend_API.c:1999) >> ==4101== by 0xAB2E71: php_module_startup (main.c:2269) >> ==4101== by 0xC6B159: php_cli_startup (php_cli.c:431) >> ==4101== >> ==4101== 5,592 bytes in 78 blocks are definitely lost in loss record 70 of >> 70 >> ==4101== at 0x4C2DB9D: malloc (vg_replace_malloc.c:299) >> ==4101== by 0xB7DC7D: zend_register_functions (zend_API.c:2304) >> ==4101== by 0xB7CBB0: zend_register_module_ex (zend_API.c:2062) >> ==4101== by 0xB7CC8B: zend_register_internal_module (zend_API.c:2077) >> ==4101== by 0xAB242E: php_register_extensions (main.c:1996) >> ==4101== by 0xC6A834: php_register_internal_extensions >> (internal_functions_cli.c:114) >> ==4101== by 0xAB2E30: php_module_startup (main.c:2253) >> ==4101== by 0xC6B159: php_cli_startup (php_cli.c:431) >> ==4101== by 0xC6D40D: main (php_cli.c:1362) >> ==4101== >> ==4101== LEAK SUMMARY: >> ==4101== definitely lost: 9,968 bytes in 142 blocks >> ==4101== indirectly lost: 0 bytes in 0 blocks >> ==4101== possibly lost: 0 bytes in 0 blocks >> ==4101== still reachable: 1,518 bytes in 30 blocks >> ==4101== suppressed: 0 bytes in 0 blocks >> ==4101== Reachable blocks (those to which a pointer was found) are not >> shown. >> ==4101== To see them, rerun with: --leak-check=full --show-leak-kinds=all >> ==4101== >> ==4101== For counts of detected and suppressed errors, rerun with: -v >> ==4101== ERROR SUMMARY: 40 errors from 40 contexts (suppressed: 0 from 0) >> >> Please let me know! Or if anyone else has an idea about the changes that >> caused it that would be great. >> >> Currently it's quite difficult to use vlagrind and find the real issues >> though... >> >> Thanks >> >> Jakub >> > > These are arginfo leaks. If arginfo contains type hints, then it is copied > now, but not freed. There's an incomplete PR for this issue here: > https://github.com/php/php-src/pull/2462 > > Nikita > > --94eb2c0b928256251b0552914375--