Discussion:
[omniORB] omniORB-4.1.0 on QNX6.3.2(more details)
Hajime Saito
2007-09-20 22:54:17 UTC
Permalink
Hello,

As my previous email was rather lacking in detail I have decided to add
some more.

I compiled omniORB-4.1.0 with the following set in mk/beforeauto.mk.

The configure script found these:
UnixPlatform = 1
Threadsystem = Posix
Compiler_GCC = 1

My modifications were:
QNX=1
x86Processor = 1

together with:
ifdef QNX
IMPORT_CPPFLAGS += -D__qnx__
OMNITHREAD_POSIX_CPPFLAGS = -DPthreadDraftVersion=10
OMNITHREAD_CPPFLAGS = -D_REENTRANT
OMNITHREAD_LIB += -lsocket
endif

When I run examples/echo/eg1 with ORBtraceLevel set to 100 I get the
following output
----------------------------------------------------------------
$ ./eg1
omniORB: Distribution date: Tue Nov 28 13:27:23 GMT 2006 dgrisby
omniORB: My addresses are:
omniORB: 127.0.0.1
omniORB: 192.168.128.2
omniORB: Maximum supported GIOP version is 1.2
omniORB: Native char code sets: ISO-8859-1 UTF-8.
omniORB: Transmission char code sets: ISO-8859-1(1.2) ISO-8859-1(1.1)
ISO-8859-1(1.0) UTF-8(1.2) UTF-8(1.1).
omniORB: Native wide char code sets: UTF-16.
omniORB: Transmission wide char code sets: UTF-16(1.2).
omniORB: Information: the omniDynamic library is not linked.
omniORB: Current configuration is as follows:
omniORB: DefaultInitRef (file) =
omniORB: DefaultInitRef (args) =
omniORB: abortOnInternalError = 0
omniORB: abortOnNativeException = 0
omniORB: acceptBiDirectionalGIOP = 0
omniORB: acceptMisalignedTcIndirections = 0
omniORB: bootstrapAgentHostname =
omniORB: bootstrapAgentPort = 900
omniORB: clientCallTimeOutPeriod = 0
omniORB: clientConnectTimeOutPeriod = 0
omniORB: clientTransportRule = * unix,ssl,tcp
omniORB: configFile = /etc/omniORB.cfg
omniORB: connectionWatchImmediate = 0
omniORB: connectionWatchPeriod = 50000
omniORB: copyValuesInLocalCalls = 1
omniORB: diiThrowsSysExceptions = 0
omniORB: dumpConfiguration = 0
omniORB: endPoint = giop:tcp::
omniORB: endPointPublish = addr
omniORB: giopMaxMsgSize = 2097152
omniORB: giopTargetAddressMode = KeyAddr
omniORB: id = omniORB4
omniORB: idleThreadTimeout = 10
omniORB: inConScanPeriod = 180
omniORB: lcdMode = 0
omniORB: maxGIOPConnectionPerServer = 5
omniORB: maxGIOPVersion = 1.2
omniORB: maxInterleavedCallsPerConnection = 5
omniORB: maxServerThreadPerConnection = 100
omniORB: maxServerThreadPoolSize = 100
omniORB: maxSocketRecv = 2147483647
omniORB: maxSocketSend = 2147483647
omniORB: nativeCharCodeSet = ISO-8859-1
omniORB: nativeWCharCodeSet = UTF-16
omniORB: objectTableSize = 0
omniORB: offerBiDirectionalGIOP = 0
omniORB: oneCallPerConnection = 1
omniORB: outConScanPeriod = 120
omniORB: poaHoldRequestTimeout = 0
omniORB: poaUniquePersistentSystemIds = 1
omniORB: principal = [Null]
omniORB: scanGranularity = 5
omniORB: serverCallTimeOutPeriod = 0
omniORB: serverTransportRule = * unix,ssl,tcp
omniORB: strictIIOP = 1
omniORB: supportBootstrapAgent = 0
omniORB: supportCurrent = 1
omniORB: supportPerThreadTimeOut = 0
omniORB: tcAliasExpand = 0
omniORB: threadPerConnectionLowerLimit = 9000
omniORB: threadPerConnectionPolicy = 1
omniORB: threadPerConnectionUpperLimit = 10000
omniORB: threadPoolWatchConnection = 1
omniORB: traceExceptions = 1
omniORB: traceFile = [stderr]
omniORB: traceInvocationReturns = 0
omniORB: traceInvocations = 0
omniORB: traceLevel = 100
omniORB: traceThreadId = 0
omniORB: traceTime = 0
omniORB: unixTransportDirectory = /tmp/omni-%u
omniORB: unixTransportPermission = 777
omniORB: useTypeCodeIndirections = 1
omniORB: verifyObjectExistsAndType = 1
omniORB: Initialising incoming endpoints.
omniORB: Instantiate endpoint 'giop:tcp::0'
omniORB: Bind to address 0.0.0.0
omniORB: Publish specification: 'addr'
omniORB: Try to publish 'addr' for endpoint giop:tcp:192.168.128.2:65487
omniORB: Publish endpoint 'giop:tcp:192.168.128.2:65487'
omniORB: Starting serving incoming endpoints.
omniORB: AsyncInvoker: thread id = 1 has started. Total threads = 1
omniORB: giopRendezvouser task execute for giop:tcp:192.168.128.2:65487
omniORB: Adding root<0> (activating) to object table.
omniORB: State root<0> (activating) -> active
omniORB: Creating ref to local: root<0>
target id : IDL:Echo:1.0
most derived id: IDL:Echo:1.0
I said, "Hello!".
The Echo object replied, "Hello!".
omniORB: Preparing to shutdown ORB.
omniORB: Destroying POA(RootPOA).
omniORB: Deactivating all POA(RootPOA)'s objects.
omniORB: State root<0> (active) -> deactivating (OA destruction)
omniORB: Waiting for requests to complete on POA(RootPOA).
omniORB: Requests on POA(RootPOA) completed.
omniORB: State root<0> (deactivating OA) -> etherealising
omniORB: Etherealising POA(RootPOA)'s objects.
omniORB: Removing root<0> (etherealising) from object table
omniORB: ServantBase has zero ref count -- deleted.
omniORB: All object adapters inactive. Stopping serving incoming endpoints.
omniORB: giopServer deactivate...
omniORB: Terminate rendezvousers...
omniORB: giopRendezvouser for giop:tcp:192.168.128.2:65487 terminate...
omniORB: giopServer terminate connection from giop:tcp:192.168.128.2:65486.
Abort (core dumped)
-----------------------------------------------------------------------------------------
When I take a look at the core using gdb I find that after Terminate()
gets thrown from giopServer::notifyRzNewConnection, it causes a SignalKill.

I have tried running omniNames -start and trying to get a list of bound
servers in the same PC using nameclt. In this case, nameclt runs
successfully but omniNames segmentation faults with tcpConnection::Recv
returning -1 due to rx being 0 and errorOnReceive raising CommFailure.

All this seems to suggest that there is something going on when
communications are being shutdown.

Does anyone have a clue what to do from here? I would be glad of any
information anyone may have.

Best regards,

Hajime Saito
Duncan Grisby
2007-09-20 23:31:53 UTC
Permalink
On Friday 21 September, Hajime Saito wrote:

[...]
Post by Hajime Saito
omniORB: giopRendezvouser for giop:tcp:192.168.128.2:65487 terminate...
omniORB: giopServer terminate connection from giop:tcp:192.168.128.2:65486.
Abort (core dumped)
-----------------------------------------------------------------------------------------
When I take a look at the core using gdb I find that after Terminate()
gets thrown from giopServer::notifyRzNewConnection, it causes a
SignalKill.
You'd see something like that if the C++ compiler did not generate
thread-safe exception handling code. What compiler are you using? Does
it claim to support thread-safe exception handling code?

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Hajime Saito
2007-09-21 18:54:59 UTC
Permalink
Post by Duncan Grisby
[...]
Post by Hajime Saito
omniORB: giopRendezvouser for giop:tcp:192.168.128.2:65487 terminate...
omniORB: giopServer terminate connection from giop:tcp:192.168.128.2:65486.
Abort (core dumped)
-----------------------------------------------------------------------------------------
When I take a look at the core using gdb I find that after Terminate()
gets thrown from giopServer::notifyRzNewConnection, it causes a
SignalKill.
You'd see something like that if the C++ compiler did not generate
thread-safe exception handling code. What compiler are you using? Does
it claim to support thread-safe exception handling code?
I'll have to check this. There seems to have been some issues with
gcc-2.95.x but they should have gone away from gcc 3.3.1 and later.

Thanks,

Hajime
Hajime Saito
2007-09-21 21:00:59 UTC
Permalink
Post by Duncan Grisby
[...]
Post by Hajime Saito
omniORB: giopRendezvouser for giop:tcp:192.168.128.2:65487 terminate...
omniORB: giopServer terminate connection from giop:tcp:192.168.128.2:65486.
Abort (core dumped)
-----------------------------------------------------------------------------------------
When I take a look at the core using gdb I find that after Terminate()
gets thrown from giopServer::notifyRzNewConnection, it causes a
SignalKill.
You'd see something like that if the C++ compiler did not generate
thread-safe exception handling code. What compiler are you using? Does
it claim to support thread-safe exception handling code?
I recompiled using QCC -V3.3.5,gcc_ntox86_cpp to use the Dinkum C
libraries and now it seems to be working. I'll do some more tests over
the weekend.
Thanks very much for your help.

Cheers,

Hajime

Harri Pasanen
2007-09-21 13:41:38 UTC
Permalink
Post by Hajime Saito
Does anyone have a clue what to do from here? I would be glad of
any information anyone may have.
What does "g++ -v" say?


Harri


Privileged or confidential information may be contained in this message. If you are not the addressee of this message please notify the sender by return and thereafter delete the message, and you may not use, copy, disclose or rely on the information contained in it. Internet e-mail may be susceptible to data corruption, interception and unauthorised amendment for which Wall Street Systems does not accept liability. Whilst we have taken reasonable precautions to ensure that this e-mail and any attachments have been swept for viruses, Wall Street Systems does not accept liability for any damage sustained as a result of viruses. Statements in this message or attachments that do not relate to the business of Wall Street Systems are neither given nor endorsed by the company or its Directors.
Hajime Saito
2007-09-21 18:55:02 UTC
Permalink
Post by Harri Pasanen
Post by Hajime Saito
Does anyone have a clue what to do from here? I would be glad of
any information anyone may have.
What does "g++ -v" say?
$ g++ -v
Reading specs from
/usr/qnx630/host/qnx6/x86/usr/lib/gcc-lib/i386-pc-nto-qnx6.3.0/3.3.5/specs
Configured with: ../configure --srcdir=.. --enable-cheaders=c
--with-gnu-as --with-gnu-ld --with-as=ntox86-as --with-ld=ntox86-ld
--target=i386-pc-nto-qnx6.3.0
--srcdir=/home/toolsbuild/cvs/tools/gcc/nto-x86-o-ntox86/..
--prefix=/usr --exec-prefix=/usr --with-local-prefix=/usr --enable-haifa
--enable-languages=c++ --enable-threads=posix --disable-nls
--enable-shared --enable-multilib
Thread model: posix
gcc version 3.3.5 (qnx-nto)

After reading information on OpenQNX forums and seeing that they suggest
using qcc -Vx,x,x,gcc_ntox86_gpp I used
qcc -V3.3.5,gcc_ntox86_gpp. It seems that this adds some magic
parameters that prevents strange things from happening.
Loading...