DPDK patches and discussions
 help / color / Atom feed
* [dpdk-dev] DPDK with -fsanitize=thread failure
@ 2020-07-31 19:32 Stephen Hemminger
  0 siblings, 0 replies; only message in thread
From: Stephen Hemminger @ 2020-07-31 19:32 UTC (permalink / raw)
  To: dev

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);



	

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-31 19:32 [dpdk-dev] DPDK with -fsanitize=thread failure Stephen Hemminger

DPDK patches and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dev/0 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 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


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