Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Kirgri Absent Member.
Absent Member.
2289 views

Corba server (c++) crashes when is called by a client with different idl (list of method arguments differs for the same inteface)

Jump to solution

[Migrated content. Thread originally posted on 09 February 2012]

I have a trouble with changing idl in existing application.

I made CORBA application that constist of a server and client parts (version 1), both are c++ applications (C++ builder).

At some point I need to change a part of IDL interface. After that I have new server and new client application (version2). Argument list in one corba object call was changed (I added new argument to existing call). So we have version 2. And this version 2 server is crashed after a call from old client application.
I understand that changes in interfaces are not advisable. But it has happened.
I agree that client and server build with different idl can not work together flawlessly. But the problem is that server application CRASHES (process exits with access violation) when it is coonected by outdated client. I want server app to be stable, to run no matter the input. If client app expects different interface - it should be problem of a client app, server must generate understandable error (marshal error), but server should not crash.
By the way, server crash in such a situation is also a flaw in security, because you can make server crash if you know it's interface details.

Is there a workaround for this problem. How can I prevent server from crashing when it is connected by a mismatched client. I wrote a version check method that runs when a client connects to server, it can help to prevent crash on subsequent calls, but stil there is a chance of server crash, if mismatched call is issued before version check is done (when first "connect" method uses different interface), or if version check is disabled.

You can reproduce this behavior by using simplest visibroker example: examples\basic\bank_agent. Build it "as is". then make a copy, change interface in Bank.idl, correct implementation and usage in BankImpl.h Client.C (just add argument to "balance" method).
I use visibroker for c++ 4.5.

version1:
interface Account {
float balance();
};
version2:
interface Account {
float balance(in string b);
};
0 Likes
1 Solution

Accepted Solutions
Highlighted
IngoBrettel Absent Member.
Absent Member.

RE: Corba server (c++) crashes when is called by a client with different idl (list of method arguments differs for the same inteface)

Jump to solution

Hello Kirgri,

First of all I want to excuse for the late reply. Your original post was still in the beta of the Forum which was not that actively monitored. We will do better in the now live version.

I agree with your point, in this case a CORBA::MARSHAL should on the server side and send as a reply exception to the client side.

The current VisiBroker version you use is quite old. Critical Maintenance for VisiBroker 4.x did end in June 2006.

On the actual version - VisiBroker 8.5 SP1 - you would see the expected CORBA::MARSHAL for this case.

A possible workaroud for you could be to check the version of the object id. By default the version number is 1.0. You can set this version number in the IDL files with the #pragma version. In your client you could implement a check on this version number directly after binding/resolving the object and before the first call to it.

However, as a real solution I would suggest you a migration to a supported VisiBroker version. I have personally worked with customers migrating from 4.x to 8.5, and dependent on the application the efforts can be quite manageable. To get an idea about the efforts you can get a trial version of VisiBroker 8.5 and do a small test migration:

- Get the IDL compilation to pass. Necessary changes here should be small.

- Solve any C++ compilation issues

- Check all VisiBroker properties you use. Most of them may be deprecated, the user manual will list the actual ones.

After that your application may already start up and you can run some tests to get a feeling about the migration efforts.

0 Likes
1 Reply
Highlighted
IngoBrettel Absent Member.
Absent Member.

RE: Corba server (c++) crashes when is called by a client with different idl (list of method arguments differs for the same inteface)

Jump to solution

Hello Kirgri,

First of all I want to excuse for the late reply. Your original post was still in the beta of the Forum which was not that actively monitored. We will do better in the now live version.

I agree with your point, in this case a CORBA::MARSHAL should on the server side and send as a reply exception to the client side.

The current VisiBroker version you use is quite old. Critical Maintenance for VisiBroker 4.x did end in June 2006.

On the actual version - VisiBroker 8.5 SP1 - you would see the expected CORBA::MARSHAL for this case.

A possible workaroud for you could be to check the version of the object id. By default the version number is 1.0. You can set this version number in the IDL files with the #pragma version. In your client you could implement a check on this version number directly after binding/resolving the object and before the first call to it.

However, as a real solution I would suggest you a migration to a supported VisiBroker version. I have personally worked with customers migrating from 4.x to 8.5, and dependent on the application the efforts can be quite manageable. To get an idea about the efforts you can get a trial version of VisiBroker 8.5 and do a small test migration:

- Get the IDL compilation to pass. Necessary changes here should be small.

- Solve any C++ compilation issues

- Check all VisiBroker properties you use. Most of them may be deprecated, the user manual will list the actual ones.

After that your application may already start up and you can run some tests to get a feeling about the migration efforts.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.