Fernando Nunes
Fernando Nunes

Reputation: 381

Tibco RV and threads

I'm facing a difficult situation while running an application built with IBM Informix 4GL and Tibco RV library (libtibrv.so). Informix 4GL is not thread safe and Tibco always create a thread (I think it creates it as sson as we call tibrv_Open(), but maybe it's after the creation of the transport)

Due to something that 4GL does with signals, this leads to application crashes (a 4GL signal handler is run when the process is running the Tibco thread).

With a debugger I noticed this trhead seems to be on a loop... it calls select() with a timeout of 10s.

My questions are: - Is there a way to avoid the thread creation? (I assume not) - Is there a way to configure the timeout I mention above? - If anybody can explain me the purpose of this thread I'd be thankful. I'm assuming we'll have to live with it, but it would be nice to understand why it's there. Maybe it exists to check server timeouts?

P.S.: The application uses C to interface with Tibco. I don't this it is very relevant, but the current scenario is on Tru64 and I believe Tibco rendezvous is 6.9. The environment uses pthread library. These are all very old versions. But the customer is moving to newer versions.

Many thanks in advance for any comments.

Upvotes: 2

Views: 797

Answers (1)

Jonathan Leffler
Jonathan Leffler

Reputation: 754820

I've not come across Tibco, so I'm not sure that I can help, but...

I suggest creating a separate process to run the Tibco code, with the I4GL calling on the same C interface it currently uses to talk to the Tibco library, but gutting the implementation so that the functions send messages across a pipe or socket to the Tibco process (which would be started by an initialization function). The advantage of this is that it gets the thread out of the I4GL code (where it is causing trouble) into a pure C and Tibco process which can be written to ensure that it doesn't cause trouble.

Upvotes: 0

Related Questions