[{"id":18992,"web_url":"https://patchwork.libcamera.org/comment/18992/","msgid":"<YSEEBnOhQ7ohIYED@pendragon.ideasonboard.com>","date":"2021-08-21T13:47:50","subject":"Re: [libcamera-devel] [PATCH v1] test: gstreamer: Disable gstreamer\n\tregistry forks","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Vedant,\n\nThank you for the patch.\n\nOn Sat, Aug 21, 2021 at 02:22:33PM +0530, Vedant Paranjape wrote:\n> ASan needs to be loaded first before gstreamer is loaded. This was not\n> possible, so verify_asan_link_order was disabled. Better way to tackle\n> this issue was disabling forks on the gstreamer side.\n> \n> Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>\n> ---\n>  test/gstreamer/gstreamer_single_stream_test.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/test/gstreamer/gstreamer_single_stream_test.cpp b/test/gstreamer/gstreamer_single_stream_test.cpp\n> index 349dcfa4..7b0b7676 100644\n> --- a/test/gstreamer/gstreamer_single_stream_test.cpp\n> +++ b/test/gstreamer/gstreamer_single_stream_test.cpp\n> @@ -52,7 +52,7 @@ protected:\n>  #if defined(__SANITIZE_ADDRESS__) && !defined(__clang__) && __GNUC__ < 8\n>  \t\treturn TestSkip;\n>  #endif\n> -\t\tsetenv(\"ASAN_OPTIONS\", \"verify_asan_link_order=0\", 1);\n> +\t\tgst_registry_fork_set_enabled(false);\n\nWith this, we don't need to skip the test anymore even with gcc 7, as\nwhile the verify_asan_link_order option isn't available in gcc 7, it's\nnot required anymore with gst_registry_fork_set_enabled().\n\nThe commit message needs to be expanded, as it doesn't explain why\ngst_registry_fork_set_enabled() can replace verify_asan_link_order=0.\n\n>  \n>  \t\t/* Initialize GStreamer */\n>  \t\tg_autoptr(GError) errInit = NULL;","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 3AC31BD87D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 21 Aug 2021 13:48:01 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 87DE568895;\n\tSat, 21 Aug 2021 15:48:00 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 263E46025E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 21 Aug 2021 15:48:00 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 967FE8F;\n\tSat, 21 Aug 2021 15:47:59 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"KofAwiNo\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1629553679;\n\tbh=RzPN4SN6LAK3bMKbUy2BMKBKNjF+u+z0XOcZSOZdovw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=KofAwiNoNKFEjuZFWwL+xwSVu3/o7zjiuU6NUo0w75YW7udKeznuV7w38zQ51GJpB\n\tGgBrMqv0opCjD4qikMxm2bvUiab7VWXWzEZ377Gexw2wYqsp/IbKtJ1gfMelvBNpHx\n\tIgGZnzaIqU/IMuDepIH2RXBJ6GAfKKmQFNPtQJxU=","Date":"Sat, 21 Aug 2021 16:47:50 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Vedant Paranjape <vedantparanjape160201@gmail.com>","Message-ID":"<YSEEBnOhQ7ohIYED@pendragon.ideasonboard.com>","References":"<20210821085233.2997872-1-vedantparanjape160201@gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210821085233.2997872-1-vedantparanjape160201@gmail.com>","Subject":"Re: [libcamera-devel] [PATCH v1] test: gstreamer: Disable gstreamer\n\tregistry forks","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":18993,"web_url":"https://patchwork.libcamera.org/comment/18993/","msgid":"<CACGrz-NqQgS5-vLXSDuvcSirXN9Gw0PHQb5GyPF0dY9VBhR7zw@mail.gmail.com>","date":"2021-08-21T14:16:26","subject":"Re: [libcamera-devel] [PATCH v1] test: gstreamer: Disable gstreamer\n\tregistry forks","submitter":{"id":85,"url":"https://patchwork.libcamera.org/api/people/85/","name":"Vedant Paranjape","email":"vedantparanjape160201@gmail.com"},"content":"Hello Laurent,\n\nOn Sat, 21 Aug, 2021, 19:18 Laurent Pinchart, <\nlaurent.pinchart@ideasonboard.com> wrote:\n\n> Hi Vedant,\n>\n> Thank you for the patch.\n>\n> On Sat, Aug 21, 2021 at 02:22:33PM +0530, Vedant Paranjape wrote:\n> > ASan needs to be loaded first before gstreamer is loaded. This was not\n> > possible, so verify_asan_link_order was disabled. Better way to tackle\n> > this issue was disabling forks on the gstreamer side.\n> >\n> > Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>\n> > ---\n> >  test/gstreamer/gstreamer_single_stream_test.cpp | 2 +-\n> >  1 file changed, 1 insertion(+), 1 deletion(-)\n> >\n> > diff --git a/test/gstreamer/gstreamer_single_stream_test.cpp\n> b/test/gstreamer/gstreamer_single_stream_test.cpp\n> > index 349dcfa4..7b0b7676 100644\n> > --- a/test/gstreamer/gstreamer_single_stream_test.cpp\n> > +++ b/test/gstreamer/gstreamer_single_stream_test.cpp\n> > @@ -52,7 +52,7 @@ protected:\n> >  #if defined(__SANITIZE_ADDRESS__) && !defined(__clang__) && __GNUC__ < 8\n> >               return TestSkip;\n> >  #endif\n> > -             setenv(\"ASAN_OPTIONS\", \"verify_asan_link_order=0\", 1);\n> > +             gst_registry_fork_set_enabled(false);\n>\n> With this, we don't need to skip the test anymore even with gcc 7, as\n> while the verify_asan_link_order option isn't available in gcc 7, it's\n> not required anymore with gst_registry_fork_set_enabled().\n>\n\nBut the test still fails due to memory leaks in Gstreamer. This only fixes\nthe Asan being loaded after gstreamer.\n\nThe commit message needs to be expanded, as it doesn't explain why\n> gst_registry_fork_set_enabled() can replace verify_asan_link_order=0.\n>\n\nI understand why we need to use verify asan link, but I don't understand\nwhy disabling the child helper process while building the registry makes\nsure that Asan is the first DLL to load.\nIf you could clarify that.\n\n>\n> >               /* Initialize GStreamer */\n> >               g_autoptr(GError) errInit = NULL;\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\n\n\n>\nRegards,\n*Vedant Paranjape*","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 81350BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 21 Aug 2021 14:16:40 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D543A605A9;\n\tSat, 21 Aug 2021 16:16:39 +0200 (CEST)","from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com\n\t[IPv6:2607:f8b0:4864:20::b36])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C7E9D6025E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 21 Aug 2021 16:16:38 +0200 (CEST)","by mail-yb1-xb36.google.com with SMTP id n126so11155237ybf.6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 21 Aug 2021 07:16:38 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"qswbIaaz\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=fsh+F12rIVJDuhCJB9/38lcH02SS5DETeY+UM1E+bfE=;\n\tb=qswbIaazD8amYX3h4gBuMXNowfRkaay/FuJJlHut71FpZYfIecu4lJeIXcIFCtVKEk\n\tQnVRSDXHDhM5ROMxtCnscH/LQIxEhnB367xIpyNU+TxwuvewvgL+HnfuVIUEd19e3EHv\n\t+4vF8Gz+ZQgNHTxf0rmSLJMio+1HPJ72yF1KFvnZlC6g9IfA2F5RVj3drb2qoqsLOFTI\n\teVQn14aHESp05BXiSShS0PWSp+ICBToBQ2K4R6vjICDIDIRfdJr4LkZn+oDNTtniICS8\n\tpYoxH/Fu1Bc2HCrQ2TgejqJ17Urlqfo6iazjG9N1+xzvXESEd/HEGJkxyWiMYzK8xc/0\n\t+u+w==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=fsh+F12rIVJDuhCJB9/38lcH02SS5DETeY+UM1E+bfE=;\n\tb=SApTChWzCxS6ZwooPHg5rSEpStOIu5Ce8lPxXE9lUEelMXEkDnv8sYzvc/+CrdIGEl\n\tf42Gn7IovNGsmLw5SluMNvLbNUgFWyuglKHOor1C4jGZefwEzPI6w6GurY66FM7uyXpP\n\tTmN1f5mOCad9VXUXsQU63HeDrT503OtTHJhXuYnM9VJ7OPl2p4rtX5xuQKfRNzFIeI3y\n\tf2jhRiv2ofKWx2biXeuUWhYoxjXZ2WBe0DKHHp/c3kz3h/C0VLXbyGV1wECL82/JWkBg\n\t1SuAM7QgU1GV2/XNWopycCX/hsY3aeIJcB9lWssDvudMICJus0APsP9kGcnlJl9jXAWY\n\tEbyw==","X-Gm-Message-State":"AOAM530VOKgK9TsPn1kBv5IvASR17ZaN64XKk3HxwN7wEmWo91g1qNxZ\n\tsEwrkCYfFzQp5vmXTaMGbiCpyQSpwJX8aEJf3Fk=","X-Google-Smtp-Source":"ABdhPJwzgyhG00L7938bR6Nb01TewK9IuxgNDI6/CNqANOJUDLg0ScnR5o13oeQVNCb+zbyPxyU8fHLSw33CcMx/eAQ=","X-Received":"by 2002:a25:db0c:: with SMTP id g12mr30511563ybf.6.1629555397433;\n\tSat, 21 Aug 2021 07:16:37 -0700 (PDT)","MIME-Version":"1.0","References":"<20210821085233.2997872-1-vedantparanjape160201@gmail.com>\n\t<YSEEBnOhQ7ohIYED@pendragon.ideasonboard.com>","In-Reply-To":"<YSEEBnOhQ7ohIYED@pendragon.ideasonboard.com>","From":"Vedant Paranjape <vedantparanjape160201@gmail.com>","Date":"Sat, 21 Aug 2021 19:46:26 +0530","Message-ID":"<CACGrz-NqQgS5-vLXSDuvcSirXN9Gw0PHQb5GyPF0dY9VBhR7zw@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"multipart/alternative; boundary=\"0000000000009b1ce105ca126eef\"","Subject":"Re: [libcamera-devel] [PATCH v1] test: gstreamer: Disable gstreamer\n\tregistry forks","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]