You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@stdcxx.apache.org by "Travis Vitek (JIRA)" <ji...@apache.org> on 2008/02/15 23:18:08 UTC

[jira] Updated: (STDCXX-449) [ITC/Linux] std::string Write -> Read data-race errors

     [ https://issues.apache.org/jira/browse/STDCXX-449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Travis Vitek updated STDCXX-449:
--------------------------------

    Description: 
Running the Intel Thread Checker on the string thread safety tests 21.string.cons.mt and 21.string.push_back.mt produces errors suggesting potential thread safety problems even though the tests run successfully to completion. See the text output below:

{noformat}
$ tcheck_cl -w 200 ./21.string.cons.mt --nloops=100 --nthreads=2
Intel(R) Thread Checker 3.1 command line instrumentation driver (24400)
Copyright (c) 2007 Intel Corporation. All rights reserved.
Building project

Running:  /build/sebor/stdcxx-icc-9.1_042-15s/tests/21.string.cons.mt --nloops=100 --nthreads=2

# INFO (S1) (10 lines):
# TEXT: 
# COMPILER: Intel C++, __INTEL_COMPILER = 910, __INTEL_COMPILER_BUILD_DATE = 20060706, __EDG_VERSION__ = 306
# ENVIRONMENT: i386 running linux-elf 2.4.20 with glibc 2.3
# FILE: 21.string.cons.mt.cpp
# COMPILED: Jun 13 2007, 13:00:49
# COMMENT: thread safety
############################################################

# CLAUSE: lib.string.cons

# INFO (S1) (3 lines):
# TEXT: testing std::string with 2 threads, 100 iterations each
# CLAUSE: lib.string.cons

# INFO (S1) (3 lines):
# TEXT: testing std::wstring with 2 threads, 100 iterations each
# CLAUSE: lib.string.cons

# +-----------------------+----------+----------+----------+
# | DIAGNOSTIC            |  ACTIVE  |   TOTAL  | INACTIVE |
# +-----------------------+----------+----------+----------+
# | (S1) INFO             |        3 |        3 |       0% |
# | (S7) ASSERTION        |        0 |       16 |     100% |
# +-----------------------+----------+----------+----------+

Application finished

________________________________________________________________________________________________________________________________________________________________________________________________________
|ID |Short Description    |Severity   |Cou|Context[Best]      |Description                                                                                 |1st Access[Best]    |2nd Access[Best]      |
|   |                     |Name       |nt |                   |                                                                                            |                    |                      |
________________________________________________________________________________________________________________________________________________________________________________________________________
|1  |Write -> Read        |Error      |128|[21.string.cons.mt,|Memory read at "_strref.h":159 conflicts with a prior memory write at [21.string.cons.mt,   |[21.string.cons.mt, |"_strref.h":159       |
|   |data-race            |           |   |0xadf0]            |0x3475f] (flow dependence)                                                                  |0x3475f]            |                      |
________________________________________________________________________________________________________________________________________________________________________________________________________
|2  |Read -> Write        |Error      |5  |[21.string.cons.mt,|Memory write at [21.string.cons.mt, 0x3475f] conflicts with a prior memory read at          |"_strref.h":159     |[21.string.cons.mt,   |
|   |data-race            |           |   |0x34755]           |"_strref.h":159 (anti dependence)                                                           |                    |0x3475f]              |
________________________________________________________________________________________________________________________________________________________________________________________________________
|3  |Thread termination   |Information|1  |Whole Program 1    |Thread termination at "thread.cpp":76 - includes stack allocation of 10.004 MB and use of   |"thread.cpp":76     |"thread.cpp":76       |
|   |                     |           |   |                   |4.516 KB                                                                                    |                    |                      |
________________________________________________________________________________________________________________________________________________________________________________________________________
|4  |Thread termination   |Information|1  |Whole Program 2    |Thread termination at "thread.cpp":76 - includes stack allocation of 10.004 MB and use of   |"thread.cpp":76     |"thread.cpp":76       |
|   |                     |           |   |                   |4.516 KB                                                                                    |                    |                      |
________________________________________________________________________________________________________________________________________________________________________________________________________
|5  |Read -> Write        |Error      |7  |[21.string.cons.mt,|Memory write at [21.string.cons.mt, 0x3475f] conflicts with a prior memory read at          |"_strref.h":159     |[21.string.cons.mt,   |
|   |data-race            |           |   |0x34755]           |"_strref.h":159 (anti dependence)                                                           |                    |0x3475f]              |
________________________________________________________________________________________________________________________________________________________________________________________________________
|6  |Thread termination   |Information|1  |Whole Program 3    |Thread termination at "thread.cpp":76 - includes stack allocation of 10.004 MB and use of   |"thread.cpp":76     |"thread.cpp":76       |
|   |                     |           |   |                   |4.516 KB                                                                                    |                    |                      |
________________________________________________________________________________________________________________________________________________________________________________________________________
|7  |Thread termination   |Information|1  |Whole Program 4    |Thread termination at "thread.cpp":76 - includes stack allocation of 10.004 MB and use of   |"thread.cpp":76     |"thread.cpp":76       |
|   |                     |           |   |                   |4.516 KB                                                                                    |                    |                      |
________________________________________________________________________________________________________________________________________________________________________________________________________
|8  |Thread termination   |Information|1  |Whole Program 5    |Thread termination at "21.string.cons.mt.cpp":237 - includes stack allocation of 10 MB and  |"21.string.cons.mt.c|"21.string.cons.mt.cpp|
|   |                     |           |   |                   |use of 8.578 KB                                                                             |pp":237             |":237                 |
________________________________________________________________________________________________________________________________________________________________________________________________________

{noformat}

  was:
Running the Intel Thread Checker on the string thread safety tests 21.string.cons.mt and 21.string.push_back.mt produces errors suggesting potential thread safety problems even though the tests run successfully to completion. See the text output below:

$ tcheck_cl -w 200 ./21.string.cons.mt --nloops=100 --nthreads=2
Intel(R) Thread Checker 3.1 command line instrumentation driver (24400)
Copyright (c) 2007 Intel Corporation. All rights reserved.
Building project

Running:  /build/sebor/stdcxx-icc-9.1_042-15s/tests/21.string.cons.mt --nloops=100 --nthreads=2

# INFO (S1) (10 lines):
# TEXT: 
# COMPILER: Intel C++, __INTEL_COMPILER = 910, __INTEL_COMPILER_BUILD_DATE = 20060706, __EDG_VERSION__ = 306
# ENVIRONMENT: i386 running linux-elf 2.4.20 with glibc 2.3
# FILE: 21.string.cons.mt.cpp
# COMPILED: Jun 13 2007, 13:00:49
# COMMENT: thread safety
############################################################

# CLAUSE: lib.string.cons

# INFO (S1) (3 lines):
# TEXT: testing std::string with 2 threads, 100 iterations each
# CLAUSE: lib.string.cons

# INFO (S1) (3 lines):
# TEXT: testing std::wstring with 2 threads, 100 iterations each
# CLAUSE: lib.string.cons

# +-----------------------+----------+----------+----------+
# | DIAGNOSTIC            |  ACTIVE  |   TOTAL  | INACTIVE |
# +-----------------------+----------+----------+----------+
# | (S1) INFO             |        3 |        3 |       0% |
# | (S7) ASSERTION        |        0 |       16 |     100% |
# +-----------------------+----------+----------+----------+

Application finished

________________________________________________________________________________________________________________________________________________________________________________________________________
|ID |Short Description    |Severity   |Cou|Context[Best]      |Description                                                                                 |1st Access[Best]    |2nd Access[Best]      |
|   |                     |Name       |nt |                   |                                                                                            |                    |                      |
________________________________________________________________________________________________________________________________________________________________________________________________________
|1  |Write -> Read        |Error      |128|[21.string.cons.mt,|Memory read at "_strref.h":159 conflicts with a prior memory write at [21.string.cons.mt,   |[21.string.cons.mt, |"_strref.h":159       |
|   |data-race            |           |   |0xadf0]            |0x3475f] (flow dependence)                                                                  |0x3475f]            |                      |
________________________________________________________________________________________________________________________________________________________________________________________________________
|2  |Read -> Write        |Error      |5  |[21.string.cons.mt,|Memory write at [21.string.cons.mt, 0x3475f] conflicts with a prior memory read at          |"_strref.h":159     |[21.string.cons.mt,   |
|   |data-race            |           |   |0x34755]           |"_strref.h":159 (anti dependence)                                                           |                    |0x3475f]              |
________________________________________________________________________________________________________________________________________________________________________________________________________
|3  |Thread termination   |Information|1  |Whole Program 1    |Thread termination at "thread.cpp":76 - includes stack allocation of 10.004 MB and use of   |"thread.cpp":76     |"thread.cpp":76       |
|   |                     |           |   |                   |4.516 KB                                                                                    |                    |                      |
________________________________________________________________________________________________________________________________________________________________________________________________________
|4  |Thread termination   |Information|1  |Whole Program 2    |Thread termination at "thread.cpp":76 - includes stack allocation of 10.004 MB and use of   |"thread.cpp":76     |"thread.cpp":76       |
|   |                     |           |   |                   |4.516 KB                                                                                    |                    |                      |
________________________________________________________________________________________________________________________________________________________________________________________________________
|5  |Read -> Write        |Error      |7  |[21.string.cons.mt,|Memory write at [21.string.cons.mt, 0x3475f] conflicts with a prior memory read at          |"_strref.h":159     |[21.string.cons.mt,   |
|   |data-race            |           |   |0x34755]           |"_strref.h":159 (anti dependence)                                                           |                    |0x3475f]              |
________________________________________________________________________________________________________________________________________________________________________________________________________
|6  |Thread termination   |Information|1  |Whole Program 3    |Thread termination at "thread.cpp":76 - includes stack allocation of 10.004 MB and use of   |"thread.cpp":76     |"thread.cpp":76       |
|   |                     |           |   |                   |4.516 KB                                                                                    |                    |                      |
________________________________________________________________________________________________________________________________________________________________________________________________________
|7  |Thread termination   |Information|1  |Whole Program 4    |Thread termination at "thread.cpp":76 - includes stack allocation of 10.004 MB and use of   |"thread.cpp":76     |"thread.cpp":76       |
|   |                     |           |   |                   |4.516 KB                                                                                    |                    |                      |
________________________________________________________________________________________________________________________________________________________________________________________________________
|8  |Thread termination   |Information|1  |Whole Program 5    |Thread termination at "21.string.cons.mt.cpp":237 - includes stack allocation of 10 MB and  |"21.string.cons.mt.c|"21.string.cons.mt.cpp|
|   |                     |           |   |                   |use of 8.578 KB                                                                             |pp":237             |":237                 |
________________________________________________________________________________________________________________________________________________________________________________________________________




> [ITC/Linux] std::string Write -> Read data-race errors
> ------------------------------------------------------
>
>                 Key: STDCXX-449
>                 URL: https://issues.apache.org/jira/browse/STDCXX-449
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 21. Strings
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4, 4.2.0
>         Environment: Intel Thread Checker 3.1 on Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
>            Reporter: Martin Sebor
>            Priority: Minor
>             Fix For: 4.2.1
>
>         Attachments: 21.string.cons.mt.itc-report.html
>
>
> Running the Intel Thread Checker on the string thread safety tests 21.string.cons.mt and 21.string.push_back.mt produces errors suggesting potential thread safety problems even though the tests run successfully to completion. See the text output below:
> {noformat}
> $ tcheck_cl -w 200 ./21.string.cons.mt --nloops=100 --nthreads=2
> Intel(R) Thread Checker 3.1 command line instrumentation driver (24400)
> Copyright (c) 2007 Intel Corporation. All rights reserved.
> Building project
> Running:  /build/sebor/stdcxx-icc-9.1_042-15s/tests/21.string.cons.mt --nloops=100 --nthreads=2
> # INFO (S1) (10 lines):
> # TEXT: 
> # COMPILER: Intel C++, __INTEL_COMPILER = 910, __INTEL_COMPILER_BUILD_DATE = 20060706, __EDG_VERSION__ = 306
> # ENVIRONMENT: i386 running linux-elf 2.4.20 with glibc 2.3
> # FILE: 21.string.cons.mt.cpp
> # COMPILED: Jun 13 2007, 13:00:49
> # COMMENT: thread safety
> ############################################################
> # CLAUSE: lib.string.cons
> # INFO (S1) (3 lines):
> # TEXT: testing std::string with 2 threads, 100 iterations each
> # CLAUSE: lib.string.cons
> # INFO (S1) (3 lines):
> # TEXT: testing std::wstring with 2 threads, 100 iterations each
> # CLAUSE: lib.string.cons
> # +-----------------------+----------+----------+----------+
> # | DIAGNOSTIC            |  ACTIVE  |   TOTAL  | INACTIVE |
> # +-----------------------+----------+----------+----------+
> # | (S1) INFO             |        3 |        3 |       0% |
> # | (S7) ASSERTION        |        0 |       16 |     100% |
> # +-----------------------+----------+----------+----------+
> Application finished
> ________________________________________________________________________________________________________________________________________________________________________________________________________
> |ID |Short Description    |Severity   |Cou|Context[Best]      |Description                                                                                 |1st Access[Best]    |2nd Access[Best]      |
> |   |                     |Name       |nt |                   |                                                                                            |                    |                      |
> ________________________________________________________________________________________________________________________________________________________________________________________________________
> |1  |Write -> Read        |Error      |128|[21.string.cons.mt,|Memory read at "_strref.h":159 conflicts with a prior memory write at [21.string.cons.mt,   |[21.string.cons.mt, |"_strref.h":159       |
> |   |data-race            |           |   |0xadf0]            |0x3475f] (flow dependence)                                                                  |0x3475f]            |                      |
> ________________________________________________________________________________________________________________________________________________________________________________________________________
> |2  |Read -> Write        |Error      |5  |[21.string.cons.mt,|Memory write at [21.string.cons.mt, 0x3475f] conflicts with a prior memory read at          |"_strref.h":159     |[21.string.cons.mt,   |
> |   |data-race            |           |   |0x34755]           |"_strref.h":159 (anti dependence)                                                           |                    |0x3475f]              |
> ________________________________________________________________________________________________________________________________________________________________________________________________________
> |3  |Thread termination   |Information|1  |Whole Program 1    |Thread termination at "thread.cpp":76 - includes stack allocation of 10.004 MB and use of   |"thread.cpp":76     |"thread.cpp":76       |
> |   |                     |           |   |                   |4.516 KB                                                                                    |                    |                      |
> ________________________________________________________________________________________________________________________________________________________________________________________________________
> |4  |Thread termination   |Information|1  |Whole Program 2    |Thread termination at "thread.cpp":76 - includes stack allocation of 10.004 MB and use of   |"thread.cpp":76     |"thread.cpp":76       |
> |   |                     |           |   |                   |4.516 KB                                                                                    |                    |                      |
> ________________________________________________________________________________________________________________________________________________________________________________________________________
> |5  |Read -> Write        |Error      |7  |[21.string.cons.mt,|Memory write at [21.string.cons.mt, 0x3475f] conflicts with a prior memory read at          |"_strref.h":159     |[21.string.cons.mt,   |
> |   |data-race            |           |   |0x34755]           |"_strref.h":159 (anti dependence)                                                           |                    |0x3475f]              |
> ________________________________________________________________________________________________________________________________________________________________________________________________________
> |6  |Thread termination   |Information|1  |Whole Program 3    |Thread termination at "thread.cpp":76 - includes stack allocation of 10.004 MB and use of   |"thread.cpp":76     |"thread.cpp":76       |
> |   |                     |           |   |                   |4.516 KB                                                                                    |                    |                      |
> ________________________________________________________________________________________________________________________________________________________________________________________________________
> |7  |Thread termination   |Information|1  |Whole Program 4    |Thread termination at "thread.cpp":76 - includes stack allocation of 10.004 MB and use of   |"thread.cpp":76     |"thread.cpp":76       |
> |   |                     |           |   |                   |4.516 KB                                                                                    |                    |                      |
> ________________________________________________________________________________________________________________________________________________________________________________________________________
> |8  |Thread termination   |Information|1  |Whole Program 5    |Thread termination at "21.string.cons.mt.cpp":237 - includes stack allocation of 10 MB and  |"21.string.cons.mt.c|"21.string.cons.mt.cpp|
> |   |                     |           |   |                   |use of 8.578 KB                                                                             |pp":237             |":237                 |
> ________________________________________________________________________________________________________________________________________________________________________________________________________
> {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Updated: (STDCXX-449) [ITC/Linux] std::string Write -> Read data-race errors

Posted by Martin Sebor <se...@roguewave.com>.
Travis Vitek (JIRA) wrote:
>      [ https://issues.apache.org/jira/browse/STDCXX-449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
> 
> Travis Vitek updated STDCXX-449:
> --------------------------------
> 
>     Description: 
> Running the Intel Thread Checker on the string thread safety tests 21.string.cons.mt and 21.string.push_back.mt produces errors suggesting potential thread safety problems even though the tests run successfully to completion. See the text output below:
> 
> {noformat}

Aren't you glad we have enabled Wiki formatting? ;-)

Martin