Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99615 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6321 invoked from network); 22 Jun 2017 18:51:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jun 2017 18:51:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.48 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.214.48 mail-it0-f48.google.com Received: from [209.85.214.48] ([209.85.214.48:36612] helo=mail-it0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AC/B5-52620-9911C495 for ; Thu, 22 Jun 2017 14:51:05 -0400 Received: by mail-it0-f48.google.com with SMTP id m47so55020145iti.1 for ; Thu, 22 Jun 2017 11:51:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=p/YvoeMAZt8nRQN6KqUlkKFnIddpAQygkuSz7/6WB64=; b=fb1SwneIIonXULQrNzVX6b9vKJS6Nz0xjc9lC3YOK9Rq6AGPHh+Zc5P2LIrF1BixBP hG4700gkTxfd+1uUF1md/U7iGTE/nbTd4j+H65DFZVsyONqMplltofIzYoiJjwYUK+m2 oz0/mZ9pUbDr2qY2RdzeuR/JI3Czzc0foDYdmpSB5UzE8ZzD49ZKdqqSlCI3Zj8UWDkq hwSzAk1ybSexmMbcPro7GCI6N9e8fGgjfdjkggJEB+lRUnDwbgt2VCWKrQXB7VnMdSpu oOLbNNTzGUs4KUJKOAKUe6BZezOcrQUWWRtIK6ygldEgBTtq606sOPNl3DYNXIHSSojb PYWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=p/YvoeMAZt8nRQN6KqUlkKFnIddpAQygkuSz7/6WB64=; b=rt7v5GJgM/zQgxHYzG4Eb9WmfCz8c/0x/SxvL6KVLHVEnpIjUHCfupoWbjINdBjzBP M6D9vX/zZ1rpra5DPVlCa5YLE/hlV/74/UMcuFMvAGMHzYkiP0sOXOlBNTJreerRydhz LpYmmHSHbcSgIqqXb/OPYN1HCO9ikBX6kbK6TR3fSgv3PWJ0Oq/SjKYfkcr5D9mMS6bE lapYygArcmK5D4ZzHA+jB1ilsHZTNA/mdfEzbOOpj8Kjg5HILSosV127eBeh/NuuNdJA uPaDnY4g50K5kERA7uPcRQimiDmFNlJL+i4WsYf6VJ40rbuff4CmwA2kh/kaJSAHqmlh bhng== X-Gm-Message-State: AKS2vOyEbQwNunu68LmRsrDESr6goPAm0vErFgatrB5T7k1v2B3zQtU7 GGH/03MiUbvO01XY7buFne7JciOtxQu0 X-Received: by 10.36.23.146 with SMTP id 140mr3539481ith.88.1498157462800; Thu, 22 Jun 2017 11:51:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.33.134 with HTTP; Thu, 22 Jun 2017 11:51:02 -0700 (PDT) In-Reply-To: References: Date: Thu, 22 Jun 2017 20:51:02 +0200 Message-ID: To: Jakub Zelenka Cc: Dmitry Stogov , PHP internals list Content-Type: multipart/alternative; boundary="001a11437764636719055290f789" Subject: Re: [PHP-DEV] Valgrind failures From: nikita.ppv@gmail.com (Nikita Popov) --001a11437764636719055290f789 Content-Type: text/plain; charset="UTF-8" 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_digest_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 --001a11437764636719055290f789--