Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

RDT_assertion failed: 0, file ../src/rde/lockset.c, line 493

807578Apr 26 2007 — edited May 31 2007
The following assertion occurs with the Feb 2007 thread analyzer
(Sun Solaris 10 11/06 SPARC with all the patches required by
Sun Studio C++ Feb 2007)

% collect -r all tntnet -c tntnet.conf
WARNING: Target `tntnet' is not instrumented for datarace detection;
reported datarace data may be misleading
Creating experiment database tha.6.er ...
2007-04-26 13:33:16.09216 [19660.1] INFO tntnet.tntnet - create 5 worker threads
RDT_assertion failed: 0, file ../src/rde/lockset.c, line 493
% CC -V
CC: Sun C++ 5.9 SunOS_sparc Build40_1 2007/02/08
%

For the "WARNING: Target `tntnet' is not instrumented for datarace detection",
I look through the large build output for cxxtools, tntnet, and the myfirstproject.so
shared library and as far as I can see, every .o, .so in cxxtools, tntnet, and
myfirstproject.so is compiled and linked with -mt -xinstrument=datarace.

But no need to take my word for it, the testcase is:

1. Need to fix SC12_02_07/SUNWspro/prod/include/CC/Cstd/stdcomp.h
(I will explain why in the Sun Studio C++ forum):

/% diff -wc /h/goanna/0/SC12_02_07/SUNWspro/prod/include/CC/Cstd/orig/stdcomp.h /h/goanna/0/SC12_02_07/SUNWspro/prod/include/CC/Cstd/stdcomp.h
*** /h/goanna/0/SC12_02_07/SUNWspro/prod/include/CC/Cstd/orig/stdcomp.h Thu Feb 8 23:18:51 2007
--- /h/goanna/0/SC12_02_07/SUNWspro/prod/include/CC/Cstd/stdcomp.h Thu Apr 19 14:57:28 2007
***************
*** 1304,1311 ****
/* #define RWSTDNO_BAD_CAST 1 */
/* #define RWSTD_NO_BAD_CAST 1 */

! #define RWSTDNO_MEMBER_TEMPLATES 1
! #define RWSTD_NO_MEMBER_TEMPLATES 1
#define RWSTDNO_FRIEND_TEMPLATES 1
#define RWSTD_NO_FRIEND_TEMPLATES 1

--- 1304,1311 ----
/* #define RWSTDNO_BAD_CAST 1 */
/* #define RWSTD_NO_BAD_CAST 1 */

! /* #define RWSTDNO_MEMBER_TEMPLATES 1 */
! /* #define RWSTD_NO_MEMBER_TEMPLATES 1 */
#define RWSTDNO_FRIEND_TEMPLATES 1
#define RWSTD_NO_FRIEND_TEMPLATES 1

***************
*** 1406,1415 ****

#define RWSTDNO_INIT_CONST_TEMPLATE_REF_ARG 1
#define RWSTD_NO_INIT_CONST_TEMPLATE_REF_ARG 1
! #define RWSTDNO_CLASS_PARTIAL_SPEC 1
! #define RWSTD_NO_CLASS_PARTIAL_SPEC 1
! #define RWSTDNO_FUNC_PARTIAL_SPEC 1
! #define RWSTD_NO_FUNC_PARTIAL_SPEC 1

/* #define RWSTDNO_OVERLOAD_OF_TEMPLATE_FUNCTION 1 */
/* #define RWSTD_NO_OVERLOAD_OF_TEMPLATE_FUNCTION 1 */
--- 1406,1415 ----

#define RWSTDNO_INIT_CONST_TEMPLATE_REF_ARG 1
#define RWSTD_NO_INIT_CONST_TEMPLATE_REF_ARG 1
! /* #define RWSTDNO_CLASS_PARTIAL_SPEC 1 */
! /* #define RWSTD_NO_CLASS_PARTIAL_SPEC 1 */
! /* #define RWSTDNO_FUNC_PARTIAL_SPEC 1 */
! /* #define RWSTD_NO_FUNC_PARTIAL_SPEC 1 */

/* #define RWSTDNO_OVERLOAD_OF_TEMPLATE_FUNCTION 1 */
/* #define RWSTD_NO_OVERLOAD_OF_TEMPLATE_FUNCTION 1 */
/%

2. Download and install the latest autotools (automake, autoconf, libtool, gettext).

3. download and unpack cxxtools 1.4.3.5 and tntnet 1.5.3.4 from:
http://www.tntnet.org/download.hms

4. grep pthread **/Makefile.am, remove -lpthread and -pthread.

5. Make the following changes to Makefile.am files:
% grep "Wc," **/Makefile.am
cxxtools-1.4.3.5/Makefile.am:AM_CXXFLAGS=-Wc,-xinstrument=datarace
cxxtools-1.4.3.5/src/Makefile.am:libcxxtools_la_CXXFLAGS = -Wc,-xinstrument=datarace
tntnet-1.5.3.4/framework/cgi/Makefile.am:libtntnet_cgi_la_CXXFLAGS = -Wc,-xinstrument=datarace
tntnet-1.5.3.4/framework/common/Makefile.am:libtntnet_la_CXXFLAGS = -Wc,-xinstrument=datarace
tntnet-1.5.3.4/framework/defcomp/Makefile.am:tntnet_la_CXXFLAGS = -Wc,-xinstrument=datarace
tntnet-1.5.3.4/sdk/tools/common/Makefile.am:libtntnet_sdk_la_CXXFLAGS = -Wc,-xinstrument=datarace
%
This is because libtools removes all compiler options it does not know
about unless they are prefixed with -Wc.

6. Set env vars:

% env | egrep "(CC|FLAGS)"
CXXFLAGS=-g -mt -xinstrument=datarace
CXX=CC
CC=cc
CXXCPP=CC -E
CPPFLAGS=-I/usr/sfw/include -I/where_you_want_it/tntnet/cxxtools-1.4.3.5/include
LDFLAGS=-g -mt -xinstrument=datarace -L/usr/sfw/lib
%

7. In cxxtools-1.4.3.5:
autoreconf install force
./configure --prefix=/where_you_want_it/tntnet
make

8. As root:
make install

9. Set PATH to include /where_you_want_it/tntnet/bin

10. Install openssl (its on SunFreeware.com)

11. In tntnet-1.5.3.4:
autoreconf install force
./configure prefix=/where_you_want_it/tntnet with-ssl=openssl
make

12. As root:
make install

13. Follow the instructions to build and run the first example in:
http://www.tntnet.org/download/tntnet-1.5.3/doc/quick-start-guide.pdf

Of course you need to tweak the Makefile:

% diff -wc myfirstproject/orig/Makefile myfirstproject/Makefile
*** myfirstproject/orig/Makefile Sat Apr 7 13:24:41 2007
--- myfirstproject/Makefile Thu Apr 26 22:34:11 2007
***************
*** 3,10 ****

SUFFIXES=.ecpp .gif .jpg .css .js
ECPPC=ecppc
! CXXFLAGS+=-I/where_you_want_it/tntnet/include -fPIC -O2
! LDFLAGS+=-shared -L/where_you_want_it/tntnet/lib -ltntnet

%.cpp: %.ecpp
$(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CPP) $<
--- 3,10 ----

SUFFIXES=.ecpp .gif .jpg .css .js
ECPPC=ecppc
! CXXFLAGS+=-I/where_you_want_it/tntnet/include -KPIC -O2 -mt -xinstrument=datarace
! LDFLAGS+=-G -mt -L/where_you_want_it/tntnet/lib -ltntnet

%.cpp: %.ecpp
$(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CPP) $<
%

Thanks, Mark
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 28 2007
Added on Apr 26 2007
7 comments
285 views