Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/101078/?format=api
http://patches.dpdk.org/api/patches/101078/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211011145430.6587-1-david.marchand@redhat.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20211011145430.6587-1-david.marchand@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20211011145430.6587-1-david.marchand@redhat.com", "date": "2021-10-11T14:54:30", "name": "test/service: fix race in attr check", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "f224dd85bccc857c33ce6c2e8c3b5dad55874d92", "submitter": { "id": 1173, "url": "http://patches.dpdk.org/api/people/1173/?format=api", "name": "David Marchand", "email": "david.marchand@redhat.com" }, "delegate": { "id": 24651, "url": "http://patches.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20211011145430.6587-1-david.marchand@redhat.com/mbox/", "series": [ { "id": 19527, "url": "http://patches.dpdk.org/api/series/19527/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=19527", "date": "2021-10-11T14:54:30", "name": "test/service: fix race in attr check", "version": 1, "mbox": "http://patches.dpdk.org/series/19527/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/101078/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/101078/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id C7D3BA034F;\n\tMon, 11 Oct 2021 16:54:46 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B75004111B;\n\tMon, 11 Oct 2021 16:54:46 +0200 (CEST)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by mails.dpdk.org (Postfix) with ESMTP id D29C2410DA\n for <dev@dpdk.org>; Mon, 11 Oct 2021 16:54:45 +0200 (CEST)", "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id\n us-mta-578-Bdy0W42FNFSA06hfStDSOQ-1; Mon, 11 Oct 2021 10:54:42 -0400", "from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com\n [10.5.11.13])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 405201926DA1;\n Mon, 11 Oct 2021 14:54:41 +0000 (UTC)", "from dmarchan.remote.csb (unknown [10.40.192.75])\n by smtp.corp.redhat.com (Postfix) with ESMTP id CD7E860938;\n Mon, 11 Oct 2021 14:54:38 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1633964085;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=DdZ2aiAuwG1dL9Av4HtzwH13UD3K8L7sPKxeT78ZRGM=;\n b=cCEnfRjL4YgZi6gMrTdIqR1MtYBeoYI5SdobSJrvRyUsWRwdqACBdXPI9ZERER9jmpnSng\n S6uQMUzQyhB2SuHNY352PSWpfJ/7bGotoxGQBfnsrxBwo5B6/xZJuVMrMoaBv6llAvts4H\n Ek6sWmpK+1YcDD4H2QcKTWid0HcSGCs=", "X-MC-Unique": "Bdy0W42FNFSA06hfStDSOQ-1", "From": "David Marchand <david.marchand@redhat.com>", "To": "dev@dpdk.org", "Cc": "aconole@redhat.com, stable@dpdk.org,\n Harry van Haaren <harry.van.haaren@intel.com>,\n Kevin Laatz <kevin.laatz@intel.com>", "Date": "Mon, 11 Oct 2021 16:54:30 +0200", "Message-Id": "<20211011145430.6587-1-david.marchand@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.13", "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com", "X-Mimecast-Spam-Score": "0", "X-Mimecast-Originator": "redhat.com", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain; charset=\"US-ASCII\"", "Subject": "[dpdk-dev] [PATCH] test/service: fix race in attr check", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "The CI reported rare (and cryptic) failures like:\n\nRTE>>service_autotest\n + ------------------------------------------------------- +\n + Test Suite : service core test suite\n + ------------------------------------------------------- +\n + TestCase [ 0] : unregister_all succeeded\n + TestCase [ 1] : service_name succeeded\n + TestCase [ 2] : service_get_by_name succeeded\nService dummy_service Summary\n dummy_service: stats 1\tcalls 0\tcycles 0\tavg: 0\nService dummy_service Summary\n dummy_service: stats 0\tcalls 0\tcycles 0\tavg: 0\n + TestCase [ 3] : service_dump succeeded\n + TestCase [ 4] : service_attr_get failed\n + TestCase [ 5] : service_lcore_attr_get succeeded\n + TestCase [ 6] : service_probe_capability succeeded\n + TestCase [ 7] : service_start_stop succeeded\n + TestCase [ 8] : service_lcore_add_del succeeded\n + TestCase [ 9] : service_lcore_start_stop succeeded\n + TestCase [10] : service_lcore_en_dis_able succeeded\n + TestCase [11] : service_mt_unsafe_poll succeeded\n + TestCase [12] : service_mt_safe_poll succeeded\nperf test for MT Safe: 42.7 cycles per call\n + TestCase [13] : service_app_lcore_mt_safe succeeded\nperf test for MT Unsafe: 73.3 cycles per call\n + TestCase [14] : service_app_lcore_mt_unsafe succeeded\n + TestCase [15] : service_may_be_active succeeded\n + TestCase [16] : service_active_two_cores succeeded\n + ------------------------------------------------------- +\n + Test Suite Summary : service core test suite\n + ------------------------------------------------------- +\n + Tests Total : 17\n + Tests Skipped : 0\n + Tests Executed : 17\n + Tests Unsupported: 0\n + Tests Passed : 16\n + Tests Failed : 1\n + ------------------------------------------------------- +\nTest Failed\nRTE>>\nstderr:\nEAL: Detected CPU lcores: 16\nEAL: Detected NUMA nodes: 2\nEAL: Detected static linkage of DPDK\nEAL: Multi-process socket /var/run/dpdk/service_autotest/mp_socket\nEAL: Selected IOVA mode 'PA'\nEAL: No available 1048576 kB hugepages reported\nEAL: VFIO support initialized\nEAL: Device 0000:03:00.0 is not NUMA-aware, defaulting socket to 0\nAPP: HPET is not enabled, using TSC as default timer\nEAL: Test assert service_attr_get line 340 failed: attr_get() call didn't\n get call count (zero)\n\nAccording to API, trying to stop a service lcore is not possible if this\nlcore is the only one associated to a service.\nDoing this will result in a -EBUSY return code from\nrte_service_lcore_stop() which the service_attr_get subtest was not\nchecking.\nThis left the service lcore running, and a race existed with the main\nlcore on checking the service attributes which triggered this CI\nfailure.\n\nTo fix this, dissociate the service lcore with current service.\n\nOnce fixed this first issue, a race still exists, because the\nwait_slcore_inactive helper added in a previous fix was not\npaired with a check that the service lcore _did_ stop.\n\nAdd missing check on rte_service_lcore_may_be_active.\n\nFixes: 4d55194d76a4 (\"service: add attribute get function\")\nFixes: 52bb6be259ff (\"test/service: fix race condition on stopping lcore\")\nCc: stable@dpdk.org\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\n---\n app/test/test_service_cores.c | 8 +++++++-\n 1 file changed, 7 insertions(+), 1 deletion(-)", "diff": "diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.c\nindex ece104054e..6821dca0e6 100644\n--- a/app/test/test_service_cores.c\n+++ b/app/test/test_service_cores.c\n@@ -318,10 +318,16 @@ service_attr_get(void)\n \tTEST_ASSERT_EQUAL(1, cycles_gt_zero,\n \t\t\t\"attr_get() failed to get cycles (expected > zero)\");\n \n-\trte_service_lcore_stop(slcore_id);\n+\tTEST_ASSERT_EQUAL(0, rte_service_map_lcore_set(id, slcore_id, 0),\n+\t\t\t\"Disabling valid service and core failed\");\n+\tTEST_ASSERT_EQUAL(0, rte_service_lcore_stop(slcore_id),\n+\t\t\t\"Failed to stop service lcore\");\n \n \twait_slcore_inactive(slcore_id);\n \n+\tTEST_ASSERT_EQUAL(0, rte_service_lcore_may_be_active(slcore_id),\n+\t\t\t \"Service lcore not stopped after waiting.\");\n+\n \tTEST_ASSERT_EQUAL(0, rte_service_attr_get(id, attr_calls, &attr_value),\n \t\t\t\"Valid attr_get() call didn't return success\");\n \tTEST_ASSERT_EQUAL(1, (attr_value > 0),\n", "prefixes": [] }{ "id": 101078, "url": "