DPDK patches and discussions
 help / color / mirror / 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, other threads:[~2020-08-01  2:49 UTC | newest]

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).