ATT Labs

AT&T Laboratories
Cambridge

Home page About Us Interactive research Software Opportunities

omnithread update

Report number 19

Reported by Gary Duzan

Date 08 May 1998

Platforms AIX

Version omniORB_2.5.0

Description

I have recently discovered that the shared libraries on AIX when using xlC (C Set ++) are not built correctly. Everything will appear to compile, link, and your programs run fine, until the system is put under load with multiple active threads. The problem is that the libraries are built to link to the un-thread safe C++ libraries instead of the thread safe ones, so even if you link your program to use the thread safe version, the OmniORB and OmniThread libraries will still get their code from the standard one. The symptom is that the program core dumps in different parts of the malloc subsystem at random times. The following patch to OmniORB 2.5.0 fixes the problem, and so far I have not seen the symptom reappear. The problem also existed in earlier versions, so if you are still using them they will require fixes as well. The fix is quite similar, except that is is applied to the powerpc_aix_4.2.mk files in OmniORB 2.2.0.

Patch
Apply the following patch:
*** omnithread/sharedlib/dir.mk.orig    Fri May  8 18:12:43 1998
--- omnithread/sharedlib/dir.mk Fri May  8 18:13:21 1998
***************
*** 202,211 ****
  $(lib): $(OBJS)
        (set -x; \
          $(RM) $@; \
!         /usr/lpp/xlC/bin/makeC++SharedLib \
               -o $(soname) $(IMPORT_LIBRARY_FLAGS) \
           $(filter-out $(LibSuffixPattern),$^) \
!          -lC -lpthreads -lc_r -lc -p 40; \
           ar cq $(lib) $(soname) ; \
           $(RM) $(soname) ; \
         )
--- 202,211 ----
  $(lib): $(OBJS)
        (set -x; \
          $(RM) $@; \
!         /usr/lpp/xlC/bin/makeC++SharedLib_r \
               -o $(soname) $(IMPORT_LIBRARY_FLAGS) \
           $(filter-out $(LibSuffixPattern),$^) \
!          -p 40; \
           ar cq $(lib) $(soname) ; \
           $(RM) $(soname) ; \
         )
*** omniORB2/sharedlib/dir.mk.orig      Fri May  8 17:59:22 1998
--- omniORB2/sharedlib/dir.mk   Fri May  8 18:00:21 1998
***************
*** 332,341 ****
  $(lib): $(ORB2_OBJS)
        (set -x; \
          $(RM) $@; \
!         /usr/lpp/xlC/bin/makeC++SharedLib \
               -o $(soname) $(IMPORT_LIBRARY_FLAGS) \
           $(filter-out $(LibSuffixPattern),$^) $(OMNITHREAD_LIB) \
!          -lC -lc_r -lc -p 40; \
           ar cq $(lib) $(soname); \
           $(RM) $(soname); \
         )
--- 332,341 ----
  $(lib): $(ORB2_OBJS)
        (set -x; \
          $(RM) $@; \
!         /usr/lpp/xlC/bin/makeC++SharedLib_r \
               -o $(soname) $(IMPORT_LIBRARY_FLAGS) \
           $(filter-out $(LibSuffixPattern),$^) $(OMNITHREAD_LIB) \
!          -p 40; \
           ar cq $(lib) $(soname); \
           $(RM) $(soname); \
         )
***************
*** 343,352 ****
  $(lclib): $(LC_OBJS)
        (set -x; \
          $(RM) $@; \
!         /usr/lpp/xlC/bin/makeC++SharedLib \
               -o $(lcsoname) $(IMPORT_LIBRARY_FLAGS) \
           $(filter-out $(LibSuffixPattern),$^) $(OMNITHREAD_LIB) $(lib) \
!          -lC -lc_r -lc -p 40; \
           ar cq $(lclib) $(lcsoname); \
           $(RM) $(lcsoname); \
         )
--- 343,352 ----
  $(lclib): $(LC_OBJS)
        (set -x; \
          $(RM) $@; \
!         /usr/lpp/xlC/bin/makeC++SharedLib_r \
               -o $(lcsoname) $(IMPORT_LIBRARY_FLAGS) \
           $(filter-out $(LibSuffixPattern),$^) $(OMNITHREAD_LIB) $(lib) \
!          -p 40; \
           ar cq $(lclib) $(lcsoname); \
           $(RM) $(lcsoname); \
         )



Action

[ omniORB main page| Technical details| Performance measurements|
Documentation| Download a free distribution]

If you need more information, contact [email protected]. We'd like to hear from you.

For comments, suggestions and further information please contact us.
Copyright © 2001 AT&T Laboratories Cambridge