OmniORB, Pentium GCC, Linux and race conditions

Amit Joshi amitj@tts.dowjones.com
Thu, 12 Jun 1997 08:57:15 -0400


Hello,

I have been playing with omniORB on Linux with the Pentium GCC (pgcc)
compiler.
- Everything compiles after changing the omni_thread::wrapper function
  to a C++ binding, creating a ::wrapper2 function with C binding and
  changing references for wrapper to wrapper2. 
- There are however a plethora of warnings. Most seem to fall into two
  categories: 
    - switch statements without all the possible cases and no default:
      case. Some of these, in "ast_expression.cc", I fixed.
    - Some warning about initializations being re-ordered. Have to 
      investigate this further. Any thought are welcome.
- However the first example "eg1" fails with a segmentation. However if
  I run the example in the debugger (gdb), let SIGUSR1 be handled with 
  no interruptions, then it sometimes dies and sometime runs cleanly. It
  seems to depend on how much I step through the code. This probably
  means that there is a race condition where depending on which thread
  manages to get to some point first. Seems to happen during the 
  init routines. Any thoughts ? This does not occur with the regular
  gcc compiler. The pgcc compiler produces faster code etc.

My comments are: 
- The code needs a lot of tightening up - the warnings are indicators.
- There are some race conditions.
- In order to understand the code I would need some internals
  documentation.

This is not to say that omniORB is bad or flame anybody or anything but
some thoughts. I think that it is a good idea and a good product - I
would not be spending time otherwise on it.

Thank you 

Amit Joshi