Show a cover letter.

GET /api/1.1/covers/19448/?format=api
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 19448,
    "url": "https://patchwork.libcamera.org/api/1.1/covers/19448/?format=api",
    "web_url": "https://patchwork.libcamera.org/cover/19448/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20240123011249.22716-1-laurent.pinchart@ideasonboard.com>",
    "date": "2024-01-23T01:12:37",
    "name": "[v2,00/12] libcamera: Hardening against thread race conditions",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "mbox": "https://patchwork.libcamera.org/cover/19448/mbox/",
    "series": [
        {
            "id": 4157,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4157/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4157",
            "date": "2024-01-23T01:12:37",
            "name": "libcamera: Hardening against thread race conditions",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/4157/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/covers/19448/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 CEA42C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 23 Jan 2024 01:12:48 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B9CF762936;\n\tTue, 23 Jan 2024 02:12:47 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 622D861D46\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Jan 2024 02:12:46 +0100 (CET)",
            "from pendragon.ideasonboard.com (89-27-53-110.bb.dnainternet.fi\n\t[89.27.53.110])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C868BE4;\n\tTue, 23 Jan 2024 02:11:32 +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=\"EgyOMzaf\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1705972293;\n\tbh=QXS2LLJyme/qlJQczTtL6Qm7dcm6cXkEvzIe304Xo6I=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=EgyOMzafpS1b9zcdQpvZvg3ZcBKs4rEkZ5qhiVd+w+DA+vwBreK8HSSvMViXFZu8S\n\t6JrlMDRXVcnxoTQpBkeKOblPvBNfeky5nAtoMTpyaUxLN6L/61d/RXDoSM64WUQphH\n\tQocfEJJiCojdTsWtEQFkQfhKgCIC7OFC1Dlgb/C4=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Subject": "[PATCH v2 00/12] libcamera: Hardening against thread race conditions",
        "Date": "Tue, 23 Jan 2024 03:12:37 +0200",
        "Message-ID": "<20240123011249.22716-1-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "Hello,\n\nBug https://bugs.libcamera.org/show_bug.cgi?id=208 reports a race\ncondition that is ultimately due to incorrect usage of the libcamera\nmulti-threading infrastructure by the soft ISP code under development.\nInstead of blaming the author of that code, I believe it shows we're not\ndoing well enough at communicating the threading requirements. This\npatch series is an attempt to improve the situation.\n\nlibcamera has a threading model that is documented. In particular, the\ndocumentation classifies functions as thread-safe, thread-bound and\nreentrant. Patch 01/12 starts by fixing a minor issue in the\ndocumentation of a thread-bound function that does not contain the\ncorrect reference.\n\nPatch 02/12 is a drive-by improvement that is, strictly speaking,\nunrelated to this series, but was developed at the same time.\n\nThe next two patches fix a first thread-related issues with the\nObject::deleteLater() function. Patch 03/12 extends a unit test to\ndisplay the issue, and patch 04/12 fixes it.\n\nPatches 05/12 to 10/12 continue with fixing various kinds of incorrect\ndeletion of objects in unit tests. It turned out that all the race\nconditions related to this patch series are in unit tests, libcamera\nitself isn't (as far as I could see) affected. This is good news, even\nif it means we haven't been careful enough when writing unit tests,\nwhich calls for improvements in that area in the future.\n\nPatches 11/12 and 12/12 finally add assertions to complain loudly about\nincorrect deletion of Object instances (11/12) and incorrect calling\ncontexts of thread-bound functions (12/12).\n\nOnly the thread-bound members of Object subclasses have been hardened,\nmore work is needed to extend this to individual members of other\nclasses (currently only DeviceEnumerator::enumerate()), and to classes\nthat are marked as thread-bound at the class level (IPCUnixSocket and\nV4L2VideoDevice).\n\nCompared to v1, small issues reported during review have been addressed.\nPlease see individual patches for detailed changelogs.\n\nLaurent Pinchart (12):\n  libcamera: object: Fix thread-bound reference in documentation\n  libcamera: signal: Replace object.h inclusion with forward declatation\n  test: object-delete: Test deferred delete just before thread stops\n  libcamera: thread: Ensure deferred deletion of all objects before\n    stopping\n  test: event-thread: Destroy Object from correct thread context\n  test: message: Remove incorrect slow receiver test\n  test: message: Destroy Object from correct thread context\n  test: signal-threads: Destroy Object from correct thread context\n  test: timer-thread: Move timer start from wrong thread to separate\n    test\n  test: timer-thread: Destroy Object from correct thread context\n  libcamera: object: Document and ensure Object deletion constraints\n  libcamera: object: Add and use thread-bound assertion\n\n include/libcamera/base/object.h               |   2 +\n include/libcamera/base/signal.h               |   3 +-\n src/libcamera/base/bound_method.cpp           |   1 +\n src/libcamera/base/event_notifier.cpp         |   6 +\n src/libcamera/base/object.cpp                 |  55 ++++++++-\n src/libcamera/base/signal.cpp                 |   1 +\n src/libcamera/base/thread.cpp                 |   7 ++\n src/libcamera/base/timer.cpp                  |  10 +-\n test/event-thread.cpp                         |  38 ++++--\n test/ipa/ipa_interface_test.cpp               |   1 +\n test/meson.build                              |   9 +-\n test/message.cpp                              |  54 +++------\n test/object-delete.cpp                        |  30 ++++-\n test/signal-threads.cpp                       |  24 ++--\n test/timer-fail.cpp                           | 109 ++++++++++++++++++\n test/timer-thread.cpp                         |  37 ++----\n .../module_ipa_proxy.h.tmpl                   |   1 +\n 17 files changed, 281 insertions(+), 107 deletions(-)\n create mode 100644 test/timer-fail.cpp\n\n\nbase-commit: 6fb55e1e70426207e538a88b39081bdc644b6d87"
}