DPDK-dev Archive on lore.kernel.org
 help / color / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Subject: [dpdk-dev] DPDK with -fsanitize=thread failure
Date: Fri, 31 Jul 2020 12:32:29 -0700
Message-ID: <20200731123229.5657922b@hermes.lan> (raw)

Tried running DPDK under Address Sanitizer with the thread data race
option, and ran into something that needs some discussion.
Is this just an ASAN bug?

The fatal log is:

==================
WARNING: ThreadSanitizer: data race (pid=28275)
  Write of size 1 at 0xfffff5000580 by main thread:
    #0 pthread_barrier_destroy <null> (libtsan.so.0+0x314b3)
    #1 rte_ctrl_thread_create <null> (librte_eal.so.20.0+0x2f9db)
    #2 rte_eal_intr_init <null> (librte_eal.so.20.0+0x1e573)
    #3 rte_eal_init <null> (librte_eal.so.20.0+0xcb9b)
    #4 <null> <null> (dpdk-backplane+0xb2ab)
    #5 main <null> (dpdk-backplane+0xa1ab)

  Previous read of size 1 at 0xfffff5000580 by thread T3:
    #0 pthread_barrier_wait <null> (libtsan.so.0+0x315cf)
    #1 rte_thread_init <null> (librte_eal.so.20.0+0x2f44f)
    #2 <null> <null> (libtsan.so.0+0x2cc63)

  Location is heap block of size 48 at 0xfffff5000570 allocated by main thread:
    #0 malloc <null> (libtsan.so.0+0x2e4ef)
    #1 rte_ctrl_thread_create <null> (librte_eal.so.20.0+0x2f873)
    #2 rte_eal_intr_init <null> (librte_eal.so.20.0+0x1e573)
    #3 rte_eal_init <null> (librte_eal.so.20.0+0xcb9b)
    #4 <null> <null> (dpdk-backplane+0xb2ab)
    #5 main <null> (dpdk-backplane+0xa1ab)

  Thread T3 'eal-intr-thread' (tid=28284, running) created by main thread at:
    #0 pthread_create <null> (libtsan.so.0+0x2f5a7)
    #1 rte_ctrl_thread_create <null> (librte_eal.so.20.0+0x2f8bb)
    #2 rte_eal_intr_init <null> (librte_eal.so.20.0+0x1e573)
    #3 rte_eal_init <null> (librte_eal.so.20.0+0xcb9b)
    #4 <null> <null> (dpdk-backplane+0xb2ab)
    #5 main <null> (dpdk-backplane+0xa1ab)

SUMMARY: ThreadSanitizer: data race (/lib/libtsan.so.0+0x314b3) in pthread_barrier_destroy
==================


The code is:

	pthread_barrier_init(&params->configured, NULL, 2);
	ret = pthread_create(thread, attr, ctrl_thread_init, (void *)params);
...
	ret = pthread_barrier_wait(&params->configured);
	if (ret == PTHREAD_BARRIER_SERIAL_THREAD) {
		pthread_barrier_destroy(&params->configured);



	

                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200731123229.5657922b@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK-dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dpdk-dev/0 dpdk-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dpdk-dev dpdk-dev/ https://lore.kernel.org/dpdk-dev \
		dev@dpdk.org
	public-inbox-index dpdk-dev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git