Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/34737/?format=api
http://patches.dpdk.org/api/patches/34737/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1517336497-17943-1-git-send-email-harry.van.haaren@intel.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": "<1517336497-17943-1-git-send-email-harry.van.haaren@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1517336497-17943-1-git-send-email-harry.van.haaren@intel.com", "date": "2018-01-30T18:21:37", "name": "[dpdk-dev] test: fix debug autotest with eal cleanup addition", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "40c4c0ceddefb5f3c23754fca193bcdd16ff3711", "submitter": { "id": 317, "url": "http://patches.dpdk.org/api/people/317/?format=api", "name": "Van Haaren, Harry", "email": "harry.van.haaren@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1517336497-17943-1-git-send-email-harry.van.haaren@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/34737/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/34737/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 4BE381B66F;\n\tTue, 30 Jan 2018 19:21:45 +0100 (CET)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id 80EEA1B662\n\tfor <dev@dpdk.org>; Tue, 30 Jan 2018 19:21:43 +0100 (CET)", "from fmsmga008.fm.intel.com ([10.253.24.58])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t30 Jan 2018 10:21:42 -0800", "from silpixa00398672.ir.intel.com ([10.237.223.111])\n\tby fmsmga008.fm.intel.com with ESMTP; 30 Jan 2018 10:21:40 -0800" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.46,435,1511856000\"; d=\"scan'208\";a=\"14240557\"", "From": "Harry van Haaren <harry.van.haaren@intel.com>", "To": "dev@dpdk.org", "Cc": "pbhagavatula@caviumnetworks.com,\n\tHarry van Haaren <harry.van.haaren@intel.com>, thomas@monjalon.net", "Date": "Tue, 30 Jan 2018 18:21:37 +0000", "Message-Id": "<1517336497-17943-1-git-send-email-harry.van.haaren@intel.com>", "X-Mailer": "git-send-email 2.7.4", "Subject": "[dpdk-dev] [PATCH] test: fix debug autotest with eal cleanup\n\taddition", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Before this patch, the debug_autotest would call fork(),\ncall rte_panic() or rte_exit() in the child process, and\nexamine the return code to verify that rte_panic() and\nrte_exit() were correctly reporting failures.\n\nWith the inclusion of the rte_eal_cleanup() patch, rte_exit()\nwas modified to cleanly tear-down EAL allocations. Currently\nonly one library (service cores) is allocared by EAL at startup\nand should be cleaned up. This library has a check on a normal\n(non-hugepage) variable to protect against double cleanup. The\nservice cores finalize() function itself frees back hugepage mem.\n\nGiven the fork() approach from the unit test, and the fact that\nthe double-free check is on an ordinary variable, causes multiple\nchild processed (fork()-ed from the unit-test runner) to attempt\nto free the huge-page memory multiple times. The variable to\nprotect against double-cleanup was not effective, as the fork()\nwould restore it to show initialized in the next child.\n\nThe solution is to call rte_service_finalize() *before* calling\nfork(), which results in the service cores double-cleanup variable\nto be zero before the fork(), and hence the child processes never\nfree the hugepage service-cores memory (correct behaviour, as the\nunit-test suite is still running, and owns the hugepages).\n\nFixes: aec9c13c5257 (\"eal: add function to release internal resources\")\n\nReported-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>\nSigned-off-by: Harry van Haaren <harry.van.haaren@intel.com>\n\n---\n\nCc: thomas@monjalon.net\n\nPlease consider for including in RC2 as this fixes the\ncurrently failing debug_autotest.\n---\n test/test/test_debug.c | 6 ++++++\n 1 file changed, 6 insertions(+)", "diff": "diff --git a/test/test/test_debug.c b/test/test/test_debug.c\nindex dd0de44..faf2cf5 100644\n--- a/test/test/test_debug.c\n+++ b/test/test/test_debug.c\n@@ -10,6 +10,7 @@\n #include <rte_debug.h>\n #include <rte_common.h>\n #include <rte_eal.h>\n+#include <rte_service_component.h>\n \n #include \"test.h\"\n \n@@ -50,6 +51,11 @@ test_exit_val(int exit_val)\n \tint pid;\n \tint status;\n \n+\t/* manually cleanup EAL memory, as the fork() below would otherwise\n+\t * cause the same hugepages to be free()-ed multiple times.\n+\t */\n+\trte_service_finalize();\n+\n \tpid = fork();\n \n \tif (pid == 0)\n", "prefixes": [ "dpdk-dev" ] }{ "id": 34737, "url": "