Community
cancel
Showing results for 
Search instead for 
Did you mean: 
memaher
Beginner
61 Views

tbb22 vs Intel ThreadChecker

Just been running my application through Intel ThreadChecker (Linux) and I'm finding an awful lot of errors emerging from libtbbmalloc.so and libtbb.

Is this normal?

cheers,

Mat

------------------------------------------------
Intel Thread Checker 3.1 command line instrumentation driver (27583) Copyright (c) 2007 Intel Corporation. All rights reserved. ID Short Description Severity Name Count Context[Best] Description 1st Access[Best] 2nd Access[Best]
1 Write -> Read data-race Error 120 [libtbb.so.2, 0x1018c] Memory read at [libtbb.so.2, 0x101bd] conflicts with a prior memory write at [libtbb.so.2, 0x10022] (flow dependence) [libtbb.so.2, 0x10022] [libtbb.so.2, 0x101bd]
2 Write -> Read data-race Error 8 [libtbbmalloc.so.2, 0x91b6] Memory read at [libtbbmalloc.so.2, 0x9283] conflicts with a prior memory write at [libtbbmalloc.so.2, 0x92ba] (flow dependence) [libtbbmalloc.so.2, 0x92ba] [libtbbmalloc.so.2, 0x9283]
3 Write -> Write data-race Error 8 [libtbbmalloc.so.2, 0x91b6] Memory write at [libtbbmalloc.so.2, 0x9283] conflicts with a prior memory write at [libtbbmalloc.so.2, 0x92ba] (output dependence) [libtbbmalloc.so.2, 0x92ba] [libtbbmalloc.so.2, 0x9283]
4 Write -> Read data-race Error 8 [libtbbmalloc.so.2, 0x91b6] Memory read at [libtbbmalloc.so.2, 0x9408] conflicts with a prior memory write at [libtbbmalloc.so.2, 0x9444] (flow dependence) [libtbbmalloc.so.2, 0x9444] [libtbbmalloc.so.2, 0x9408]
5 Write -> Write data-race Error 8 [libtbbmalloc.so.2, 0x91b6] Memory write at [libtbbmalloc.so.2, 0x9444] conflicts with a prior memory write at [libtbbmalloc.so.2, 0x9444] (output dependence) [libtbbmalloc.so.2, 0x9444] [libtbbmalloc.so.2, 0x9444]
6 Write -> Write data-race Error 20 [libtbbmalloc.so.2, 0x9ace] Memory write at [libtbbmalloc.so.2, 0x9b9f] conflicts with a prior memory write at [libtbbmalloc.so.2, 0x9b9f] (output dependence) [libtbbmalloc.so.2, 0x9b9f] [libtbbmalloc.so.2, 0x9b9f]


0 Kudos
4 Replies
robert-reed
Valued Contributor II
61 Views

Quoting - memaher
Just been running my application through Intel ThreadChecker (Linux) and I'm finding an awful lot of errors emerging from libtbbmalloc.so and libtbb.

Is this normal?
I suspect that these are probably false positives, resulting from Intel Thread Checker not recognizing the synchronization constructs used in the TBB code and so reporting lock management as race conditions. I know we reported similar issues in Intel Parallel Inspector as we were testing compatibility prior to release. Did you try building your TBB application using the macro TBB_USE_THREADING_TOOLS? That is supposed to be the mechanism to enable embedded API calls stipulating those constructs as safe for the purposes of Intel Thread Checker and IntelParallel Inspector. If you're still seeing complaints about TBB after invoking that compilation switch, they are most likely to be bugs.
memaher
Beginner
61 Views


I am indeed using TBB_USE_THREADING_TOOLS when building.

I've just constructed a test application (for a seperate report to ThreadChecker tech support) which does the following:

1) create 2x tbb_threads
2) in each thread, construct a pipeline
3) each pipeline contains 5 identical filters, which do a printf()
4) terminate the pipeline after a count reaches 20

that'll be 97 errors reported...

When you say its a bug, is it a bug in TBB or a bug in ThreadChecker (or a bug in the way I'm using things)?

Mat
RafSchietekat
Black Belt
61 Views

"which do a printf()"
That should be superfluous information... unless you didn't use a lock?

(Added after #4) Note to self: don't just guess...

Anton_Pegushin
New Contributor II
61 Views

Quoting - memaher

I am indeed using TBB_USE_THREADING_TOOLS when building.

I've just constructed a test application (for a seperate report to ThreadChecker tech support) which does the following:

1) create 2x tbb_threads
2) in each thread, construct a pipeline
3) each pipeline contains 5 identical filters, which do a printf()
4) terminate the pipeline after a count reaches 20

that'll be 97 errors reported...

When you say its a bug, is it a bug in TBB or a bug in ThreadChecker (or a bug in the way I'm using things)?

Mat
Hello Mat,

so unfortunately this is a bug in Thread Checker. It's an annoying one, but it has an easy fix. Please go to the "bin" directory of your Thread Checker install. By default it's in /opt/intel/itt/tcheck/bin/32(e). There is a file named tcheck10.ini, which is a configuration file, which, among other things, states which levels of instrumentation to use for known system and user modules. If you search for "tbb" in tcheck10.ini, you'll find the following 4 lines (under "user modules":

libtbb.so=as_api
libtbb_debug.so=as_api
libtbbmalloc.so=as_api
libtbbmalloc_debug.so=as_api

The problem with these lines is that the modules names are outdated. The ones reported in your original list all end with .so.2. And so should the ones in tcheck10.ini. So go ahead and change these four lines to:

libtbb.so.2=as_api
libtbb_debug.so.2=as_api
libtbbmalloc.so.2=as_api
libtbbmalloc_debug.so.2=as_api

This is it! The next time you run Thread Checker you will not see threading errors reported for these modules.
Reply