Patch Detail
Show a patch.
GET /api/patches/18341/?format=api
{ "id": 18341, "url": "https://patchwork.libcamera.org/api/patches/18341/?format=api", "web_url": "https://patchwork.libcamera.org/patch/18341/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20230305230603.3697024-2-dev@flowerpot.me>", "date": "2023-03-05T23:06:03", "name": "[libcamera-devel,1/1] fix: pipeline handlers: Stop exponential explosive calls to createPipelineHandlers", "commit_ref": "a146e05125fdac75b8ffb6a818e00a446cec65dd", "pull_url": null, "state": "accepted", "archived": false, "hash": "94ba6cd3d2f4d3e66f7786b6fefbd51d6e2ef83a", "submitter": { "id": 154, "url": "https://patchwork.libcamera.org/api/people/154/?format=api", "name": "Sophie Friedrich", "email": "dev@flowerpot.me" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/18341/mbox/", "series": [ { "id": 3789, "url": "https://patchwork.libcamera.org/api/series/3789/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3789", "date": "2023-03-05T23:06:02", "name": "fix: pipeline handlers: Stop exponential calls to `createPipelineHandlers`", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3789/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/18341/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/18341/checks/", "tags": {}, "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 1DB4DBE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 5 Mar 2023 23:06:59 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C2B0562676;\n\tMon, 6 Mar 2023 00:06:58 +0100 (CET)", "from mout-p-201.mailbox.org (mout-p-201.mailbox.org\n\t[80.241.56.171])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CEA076261A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 6 Mar 2023 00:06:56 +0100 (CET)", "from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby mout-p-201.mailbox.org (Postfix) with ESMTPS id 4PVHQk3DFZz9sbF;\n\tMon, 6 Mar 2023 00:06:54 +0100 (CET)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1678057618;\n\tbh=OXCQBEdhIybGXgYB5OXHUckasntp5bKLKuImz2BMVN4=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=R2gaSVEKhqm7Uky4t8kFqCU/hcjkoJ0Ux65vp6RWMNpWzLtI0+BwA0w91Ekw/eQmP\n\tPwzkOQ2xNMI68Wus/XJfiO6aYJeTKOSUOLV4d/GaDPd5l1b4hm48QE20r/DCuarCJp\n\tFToG55ZU63y8MrXDQZXQfmHi6boqNik1HbcIRAQ44il8YemlE/ihh9udqBMo/BeKwz\n\tY0G+vBFmuMpD18deGNhhmsFOepKC14fhZ+Xv4WYPvO2GH8bmBmYqE2+ShQJsXbAFol\n\tC3V/Gjvbd1YEuR1YwJC/5h2NdVcdcuKWNxGbxgYOATjrQTcgDdpwnmbP6LhDnDdtDK\n\tD8ku6/hTq2U+g==", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=flowerpot.me;\n\ts=MBO0001; t=1678057614;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=tRwjoB9L9HJ1MTKvBxQhNunVjymqKUMDMm07saz9dRk=;\n\tb=O8fErpidD9VZwLLiLG2H2ZGQnWQu46NT2I7lsLEdE8ZKXdNpJJG17fDy138HwVlVaxkiDi\n\t+1NgeKtkFBtdCz7YDfOE6B0CaEVFctj29M3pnPsd6aszVpQGp7vdZiZQCpTUOg+0vvFK8w\n\tSXkuPubT3ZQttwCI7wXfzwN1dcQusH26TVRB8lYB2AelUHzRcUrfRVL2hpaGduFhbjbUQB\n\td2RnhcLnHkLMqFjYrfxmNKPYNLNgcBBuwCVQw9uP0GPkyZC38PiLNqH/X4d/ZcOTVeN/9/\n\tMrRsz6HFBCnAe4PF0c31YTRAsLzLpESvL2/pVb1VSC6S59Y6iWqrIkaDBxu6qg==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=flowerpot.me\n\theader.i=@flowerpot.me header.b=\"O8fErpid\"; \n\tdkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 6 Mar 2023 00:06:03 +0100", "Message-Id": "<20230305230603.3697024-2-dev@flowerpot.me>", "In-Reply-To": "<20230305230603.3697024-1-dev@flowerpot.me>", "References": "<20230305230603.3697024-1-dev@flowerpot.me>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 1/1] fix: pipeline handlers: Stop\n\texponential explosive calls to createPipelineHandlers", "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>", "From": "Sophie Friedrich via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Sophie Friedrich <dev@flowerpot.me>", "Cc": "Sophie Friedrich <dev@flowerpot.me>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Currently the method `createPipelineHandlers` registered itself to the\n`devicesAdded` signal at the end of each call. As the Signal object\nsupports multiple non-unique listeners connected to it, the former\nmethod would be called exponentially often with each new emitted event\non `devicesAdded` (i.e. with udev plugging in a new camera)\n\nBy attaching the `createPipelineHandlers` function to `devicesAdded` during\nthe first call to it / init of the `CameraManager::Private` this effect\nis prevented.\n\nSigned-off-by: Sophie Friedrich <dev@flowerpot.me>\n---\n src/libcamera/camera_manager.cpp | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)", "diff": "diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\nindex b1785f75..c1edefda 100644\n--- a/src/libcamera/camera_manager.cpp\n+++ b/src/libcamera/camera_manager.cpp\n@@ -131,6 +131,7 @@ int CameraManager::Private::init()\n \t\treturn -ENODEV;\n \n \tcreatePipelineHandlers();\n+\tenumerator_->devicesAdded.connect(this, &Private::createPipelineHandlers);\n \n \treturn 0;\n }\n@@ -165,8 +166,6 @@ void CameraManager::Private::createPipelineHandlers()\n \t\t\t\t<< \"\\\" matched\";\n \t\t}\n \t}\n-\n-\tenumerator_->devicesAdded.connect(this, &Private::createPipelineHandlers);\n }\n \n void CameraManager::Private::cleanup()\n", "prefixes": [ "libcamera-devel", "1/1" ] }