From dev-return-98226-archive-asf-public=cust-asf.ponee.io@qpid.apache.org Mon Oct 21 14:04:03 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id A8A3D180660 for ; Mon, 21 Oct 2019 16:04:02 +0200 (CEST) Received: (qmail 33737 invoked by uid 500); 21 Oct 2019 14:04:02 -0000 Mailing-List: contact dev-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list dev@qpid.apache.org Received: (qmail 33722 invoked by uid 99); 21 Oct 2019 14:04:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Oct 2019 14:04:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 0CE68E30BD for ; Mon, 21 Oct 2019 14:04:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 5DA877803DB for ; Mon, 21 Oct 2019 14:04:00 +0000 (UTC) Date: Mon, 21 Oct 2019 14:04:00 +0000 (UTC) From: "ASF GitHub Bot (Jira)" To: dev@qpid.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DISPATCH-1450) Add build option to enable thread sanitizer build MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DISPATCH-1450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16956127#comment-16956127 ] ASF GitHub Bot commented on DISPATCH-1450: ------------------------------------------ kgiusti commented on pull request #595: DISPATCH-1450: enable thread sanitizer (TSAN) run time checking URL: https://github.com/apache/qpid-dispatch/pull/595#discussion_r337035408 ########## File path: README ########## @@ -100,10 +100,62 @@ This does the following: - Run system tests on the installation in 'install'. -Using Valgrind -============== +Run Time Validation +=================== -If valgrind is installed and cmake option 'USE_VALGRIND' is 'ON' the tests will -be run with valgrind's memcheck debugger. You can set other types of test runner -or modify the valgrind flags by setting the TEST_RUNNER cmake variable. +The CTest test suite can be configured to enable extra run time +validation checks against the dispatch router. +Since run time validation slows down qdrouter considerably it is +disabled by default. It can be enabled by setting the RUNTIME_CHECK +build flag via the cmake command. + +Note well: Depending on your environment the ctest suite may time out +if validation is enabled due to the additional run time overhead it +adds. You can extend the default test time via the ctest "--timeout" +option. Example: + +ctest --timeout 1500 -VV + +The Qpid Dispatch Router test suite supports the following run time +validation tools: + +Valgrind Memcheck +----------------- +Runs qdrouterd under Valgrind's memcheck leak checker during the CTest +suite. This will cause tests to fail if a memory error is +encountered. Use the grinder tool (in the bin directory) to create a +summary of the errors found during the test run. + +The valgrind toolset must be installed in order to use memcheck. + +To enable memcheck set the RUNTIME_CHECK build flag to "memcheck": + +cmake .. -DRUNTIME_CHECK=memcheck + +If valgrind detects errors the qdrouterd process will exit with an +exit code of 42. This will be displayed in the CTest output. For +example: + +RuntimeError: Errors during teardown: +Process XXXX error: exit code 42, expected 0 + +GCC/Clang Thread Sanitizer (TSAN) +--------------------------------- +This option turns on extra run time threading verification. + +Applicable only to GCC versions >= 4.8 and Clang versions >= 4.1. + +To enable the thread sanitizer set the RUNTIME_CHECK build flag to "tsan": + +cmake .. -DRUNTIME_CHECK=tsan Review comment: Right now the level of optimization (-Ox) is determined by the build type. So, by default (RelWithDebInfo) this will supply -O2. the only target that does not enable optimization is Debug, which is by design. Running tsan on a Debug build is not a priority - we should be running tsan on optimized targets only. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org > Add build option to enable thread sanitizer build > ------------------------------------------------- > > Key: DISPATCH-1450 > URL: https://issues.apache.org/jira/browse/DISPATCH-1450 > Project: Qpid Dispatch > Issue Type: Test > Components: Tests > Affects Versions: 1.9.0 > Reporter: Ken Giusti > Assignee: Ken Giusti > Priority: Major > Labels: tsan > Fix For: Backlog, 1.10.0 > > > Update cmake to support building qdrouterd with thread sanitizing turned on (tsan). > This should be configurable via a cmake option (default to off). > See the proton cmake files for a guide. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org For additional commands, e-mail: dev-help@qpid.apache.org