[omniORB] rendezvouser error
John Chesshir
john.chesshir at mainstream-tech.com
Mon Jul 18 16:38:41 BST 2005
Duncan and friends,
OK. Your hint got me stepping into the code, but unfortunately
not all of it. I now understand more why you said this was a bug with
threads starting up. Why, though, I cannot say, because it doesn't seem
the macros you gave me to uncomment affect the omnithread.so. If it
did, I might be able to give some better info.
Stepping through did, however, allow me to see better how to
take your initial suggestion, which is writing a program using
omni_thread. My colleague also found a sample program using pthreads.
I am attaching those two files here. They are rather crude, especially
the pthread.c. I don't know near enough to let me try to replicate the
omni_thread code.
Bottom line: the sample pthread code works on our Red Hat 7.0
and Advanced server, while the omni_thread code throws an error on Red
Hat 7.0.
Here is a sample compile and run of these to programs on our
advanced server:
[jchesshir at redhat pthread_test]$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-128.7.2)
[jchesshir at redhat pthread_test]$ gcc -D_REENTRANT -lpthread -o
pthread_test pthread_test.c
[jchesshir at redhat pthread_test]$ pthread_test Hello World!
pthread_test
Hello
World!
[jchesshir at redhat pthread_test]$ g++ -g -D_REENTRANT -lomniORB4
-lomnithread -o omnitest omni.cpp
[jchesshir at redhat pthread_test]$ omnitest
Starting test
In try
In constructor
In run
Success
Finished test
[jchesshir at redhat pthread_test]$
And here is the identical sample compile and run from the Red Hat 7.0
box:
[cms at orbtest pthread_test]$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.0)
[cms at orbtest pthread_test]$ gcc -D_REENTRANT -lpthread -o pthread_test
pthread_test.c
[cms at orbtest pthread_test]$ pthread_test Hello World!
pthread_test
Hello
World!
[cms at orbtest pthread_test]$ g++ -g -D_REENTRANT -lomniORB4 -lomnithread
-o omnitest omni.cpp
[cms at orbtest pthread_test]$ omnitest
Starting test
In try
In constructor
Error thown
[cms at orbtest pthread_test]$
Once again, I tried stepping into the start() function of
omni_thread, but was unable to. I also set a break on the run function,
but it never got there, so I'm pretty sure that what is happening in the
run function has nothing to do with this problem. Just looking at the
posix.cc file, it may be that the THROW_ERROR macro is keying
incorrectly, but I have no way of really knowing.
If you have another macro for me to uncomment so that I can step
into omni_thread, I MAY have time to do so. But the makefiles are quite
challenging to read, and posix.cc is not much easier to try to read
without stepping through. I'm sure you can understand. Sorry I can't
give more info.
Thanks,
John C
-----Original Message-----
From: Duncan Grisby [mailto:duncan at grisby.org]
Sent: Monday, July 11, 2005 1:29 PM
To: John Chesshir
Cc: omniorb-list at omniorb-support.com
Subject: Re: [omniORB] rendezvouser error
On Friday 8 July, "John Chesshir" wrote:
> That last email was an idiot's question. Upon further
inspection, I
> realized the CPPFLAGS is a precompiler, not a compiler, directive.
> We have now set the CXXFLAGS and CFLAGS environment variables to
> -ggdb (in case there are extras gdb needs). We have cleaned out our
> omniORB compile and started from scratch. We passed the options
> --disable-static and --enable-thread-tracing to the configure script.
> We then recompiled our own code against the new omniORB shared
objects.
Are you sure omniORB used the flags? The makefiles are rather byzantine
in their settings. The easiest way to set debugging is to edit the
dir.mk files in src/lib/omniORB/orbcore/ and src/lib/omniORB/dynamic and
uncomment the lines that set CXXDEBUGFLAGS = -g
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pthread_test.c
Type: application/octet-stream
Size: 423 bytes
Desc: pthread_test.c
Url : http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20050718/aa84b7f1/pthread_test.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: omni.cpp
Type: application/octet-stream
Size: 700 bytes
Desc: omni.cpp
Url : http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20050718/aa84b7f1/omni.obj
More information about the omniORB-list
mailing list