{"id":15258,"url":"https://patchwork.libcamera.org/api/1.1/covers/15258/?format=json","web_url":"https://patchwork.libcamera.org/cover/15258/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20220107125506.1477795-1-kieran.bingham@ideasonboard.com>","date":"2022-01-07T12:55:04","name":"[libcamera-devel,0/2] libcamera: pipeline_handler: Prepare requests","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/1.1/people/4/?format=json","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/cover/15258/mbox/","series":[{"id":2882,"url":"https://patchwork.libcamera.org/api/1.1/series/2882/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2882","date":"2022-01-07T12:55:04","name":"libcamera: pipeline_handler: Prepare requests","version":1,"mbox":"https://patchwork.libcamera.org/series/2882/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/15258/comments/","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 09EE3BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  7 Jan 2022 12:55:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4D9B460928;\n\tFri,  7 Jan 2022 13:55:12 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B235060868\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  7 Jan 2022 13:55:10 +0100 (CET)","from Monstersaurus.ksquared.org.uk.beta.tailscale.net\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4267D8D7;\n\tFri,  7 Jan 2022 13:55:10 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"rN8N/Sv6\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1641560110;\n\tbh=f/fCvJQQx9vy7lq1nmGOR+dE/9AGHpK2IHB1mV9HgiA=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=rN8N/Sv6VgD4IhKpdsEFLfvrsozhc25naiJpodR41OVQrZNJm+g3DL8bsIIK5DD9R\n\tz25zH/JWdzAQXMhYiHI6sY1VkFUyfduN9QFofeqtJS5+BG4yXxEC3XZeS6Z/QxqsUN\n\t5dPTjm6qG6M9N5mWIezSLst9ERtiyCnitDlIrr0s=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"libcamera devel <libcamera-devel@lists.libcamera.org>","Date":"Fri,  7 Jan 2022 12:55:04 +0000","Message-Id":"<20220107125506.1477795-1-kieran.bingham@ideasonboard.com>","X-Mailer":"git-send-email 2.32.0","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 0/2] libcamera: pipeline_handler: Prepare\n\trequests","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Provide a new call on pipeline handlers allowing the Camera to prepare a\nrequest and associate the request with the pipeline handler after it is\nconstructed.\n\nThis allows us to perform one-time operations such as connecting\nrelevant signals on the request to the pipeline handler.\n\nUse this new call to move the prepared signal connection away from\nqueueRequest where it was repeatedly connecting the signal, leading to\nbugs which exhibited excessively long shutdown times when any\nsubstantial number of frames had been processed. This is reported to\nhave taken more than 10 minutes to close down the pipeline after a 2\nhour capture run.\n\nFinally add an assertion to the signal connection to ensure that we\ncatch and prevent this from happening again. We only have a limited\nexpectation of the size of slot lists, so if this is exceeded it likely\nexposes a bug. If we come across a use case that requires substantial\nconections here, it can be revisted then.\n\nThis underlying bug was identified from :\n https://github.com/raspberrypi/libcamera-apps/issues/217\n\nAnd should resolve the issue there.\n\n\nNote that the assertion preventing excessive slot usage already breaks\nthe CTS tests on CrOS and may indicate either we really need more slots,\nor that other slot leaks are occuring.\n\nKieran Bingham (2):\n  libcamera: pipeline_handler: Prepare requests\n  libcamera: base: signal: Prevent excessive slot usage\n\n include/libcamera/internal/pipeline_handler.h |  1 +\n src/libcamera/base/signal.cpp                 |  8 ++++++++\n src/libcamera/camera.cpp                      | 14 ++++++++++---\n src/libcamera/pipeline_handler.cpp            | 20 ++++++++++++++++---\n 4 files changed, 37 insertions(+), 6 deletions(-)"}