Discussion:
[omniORB] Weird issue running omniORB under wine
Barry Roberts
2010-03-03 14:14:36 UTC
Permalink
I have a server-type CORBA application that runs just great under Windows but is a real pain to keep updated. As part of the process of porting it to Linux I'm trying to run it under Wine as an interim step to make maintenance and updates much easier. It works for a short while, but then at some point it dies with:

omniORB: Assertion failed. This indicates a bug in the application using omniORB, or maybe in omniORB itself.
file: SocketCollection.cc
line: 946
info: s->pd_fd_index >= 0
omniORB: Unexpected exception caught by giopRendezvouser
omniORB: Unrecoverable error for this endpoint: giop:tcp:172.23.22.83:32891, it will no longer be serviced.

I'm using omniORB 4.1.3 built from source (still using VC6) so the assertion is in the Select method:
if (FD_ISSET(s->pd_socket, &rfds)) {
// Remove socket from pd_fd_set by swapping last item.
// We don't use FD_CLR since that is incredibly inefficient
// with large sets.
OMNIORB_ASSERT(s->pd_fd_index >= 0);
int to_i = s->pd_fd_index;
int from_i = --pd_fd_set.fd_count;

I realize this is NOT an omniORB problem, but I also quickly realized that it would be pretty difficult for me to get familiar enough with the code to figure out why this was happening. So if anyone sees any easy things I can try to track down what's different between Wine and Windows so I can make this work, I would appreciate it.

My CORBA code is basically just a wrapper around windows processes. It accepts requests from applications on tomcat servers and uses Windows IPC to select an available child process, pass it a document, then pass the result back to the tomcat server. And it runs on Windows for 3 months at a time without problems. It gets updated quarterly, or it might run longer.

This email is intended solely for the recipient. It may contain privileged, proprietary or confidential information or material. If you are not the intended recipient, please delete this email and any attachments and notify the sender of the error.
Duncan Grisby
2010-03-19 21:10:06 UTC
Permalink
On Tue, 2010-03-02 at 11:36 -0700, Barry Roberts wrote:

> I have a server-type CORBA application that runs just great under
> Windows but is a real pain to keep updated. As part of the process of
> porting it to Linux I'm trying to run it under Wine as an interim step
> to make maintenance and updates much easier. It works for a short
> while, but then at some point it dies with:
>
> omniORB: Assertion failed. This indicates a bug in the application using omniORB, or maybe in omniORB itself.
> file: SocketCollection.cc
> line: 946
> info: s->pd_fd_index >= 0

[...]
> I realize this is NOT an omniORB problem, but I also quickly realized
> that it would be pretty difficult for me to get familiar enough with
> the code to figure out why this was happening. So if anyone sees any
> easy things I can try to track down what's different between Wine and
> Windows so I can make this work, I would appreciate it.

Well, it's possible that it is an omniORB problem. Can you try with the
latest SVN version? There have been a few fixes in that area of the
code that I don't think will be relevant, but it's worth using the
latest version to be sure.

My guess is that the problem comes down to the strange way Windows
fd_sets work. Wine is possibly not using exactly the same semantics,
which will be a problem for omniORB because it relies on implementation
details for performance reasons. There is code around line 907 or
SocketCollection.cc that reaches in to the fd_set array and sets it
directly. Perhaps you could try changing it to use the FD_SET macro?
Search for other uses of fd_array in that file and change them to use
FD_SET / FD_CLR too. I don't know if that will help, but it's worth a
go.

Cheers,

Duncan.

--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Barry Roberts
2010-03-19 21:15:46 UTC
Permalink
I'll try the SVN version first. Then I'll tweak SocketCollection.cc if I can still reproduce the problem.

Thanks!

Barry
________________________________________
From: Duncan Grisby [***@grisby.org]
Sent: Friday, March 19, 2010 9:36 AM
To: Barry Roberts
Cc: omniorb-***@omniorb-support.com
Subject: Re: [omniORB] Weird issue running omniORB under wine

On Tue, 2010-03-02 at 11:36 -0700, Barry Roberts wrote:

> I have a server-type CORBA application that runs just great under
> Windows but is a real pain to keep updated. As part of the process of
> porting it to Linux I'm trying to run it under Wine as an interim step
> to make maintenance and updates much easier. It works for a short
> while, but then at some point it dies with:
>
> omniORB: Assertion failed. This indicates a bug in the application using omniORB, or maybe in omniORB itself.
> file: SocketCollection.cc
> line: 946
> info: s->pd_fd_index >= 0

[...]
> I realize this is NOT an omniORB problem, but I also quickly realized
> that it would be pretty difficult for me to get familiar enough with
> the code to figure out why this was happening. So if anyone sees any
> easy things I can try to track down what's different between Wine and
> Windows so I can make this work, I would appreciate it.

Well, it's possible that it is an omniORB problem. Can you try with the
latest SVN version? There have been a few fixes in that area of the
code that I don't think will be relevant, but it's worth using the
latest version to be sure.

My guess is that the problem comes down to the strange way Windows
fd_sets work. Wine is possibly not using exactly the same semantics,
which will be a problem for omniORB because it relies on implementation
details for performance reasons. There is code around line 907 or
SocketCollection.cc that reaches in to the fd_set array and sets it
directly. Perhaps you could try changing it to use the FD_SET macro?
Search for other uses of fd_array in that file and change them to use
FD_SET / FD_CLR too. I don't know if that will help, but it's worth a
go.

Cheers,

Duncan.

--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --



This email is intended solely for the recipient. It may contain privileged, proprietary or confidential information or material. If you are not the intended recipient, please delete this email and any attachments and notify the sender of the error.
Loading...