[omniORB] Creating an Any containing a sequence and an omniORB crash

Carsten Seibert carsten.seibert@esec.com
Thu, 21 Sep 2000 08:16:26 +0200


Good morning,

I'm currently building a automatic testing environment for a distributed
system using Python and omniORB. Various Python test scripts invoke
operations on the server component in the system.
Since not all servers exposes their functionality completely at the
"public" external interface, we've added a generic testing interface
which is used by the testing framework to invoke operations.

This is the point where I have some questions regarding the handling of
Anys in Python (and maybe in CORBA in general):

1) How do I create in Python an Any containing a sequence of something?
I was not able to figure this out. One need to provide a type code for
the __init__ of class Any and I could not find the equivalent
TC_sequence type code.

2) Is there a service in omniORBpy that can tells me the corresponding
CORBA type code for a given Python base type? This would help to
facilitate the creation of Anys without always having to specify
explicitly the type code. I suppose that this knowledge is required for
marshaling anyway but is this still Python?

3) The generic testing framework provides an service to describe an
operation that it is providing. It returns a struct OperationDescriptor
containing a sequence of struct ParameterDescriptor which contains an
Any (see IDL below).
In one particular case where this any (defaultValue) contains a sequence
with one string, omniORB crashes during unmarshal of the reply when my
Python client invokes this operation on a server (Smalltalk). After
having a look at pyMarshall.cc at line 3580 it seems to me as if there
is a problem when a sequence contains elements with their types
specified with a type code (etk == tk_TypeCode which causes the
assertion in the default clause to fire). But this is pure speculation
since it is the first time that I've looked at a GIOP message in "raw".

4) Does anybody has a Python (1.5.2) binary for HP-UX 11 compiled with
the HP compiler? We've compiled Python with gcc which seems to cause
problems when you want to use the pre-compiled omniORBpy distribution. I
did not manage to load the omniORB shared libraries due to some library
problems/incompatabilities between gcc and the HP compiler.

Thanks a lot,
Carsten

------ begin IDL -------
module X {
    struct ParameterDescriptor {
        string name;
        string type;
        any defaultValue;
    };

    typedef sequence <ParameterDescriptor> ParameterDescriptorList;

    struct OperationDescriptor {
        string name;
        X::ParameterDescriptor returnDescriptor;
        X::ParameterDescriptorList parameterDescriptors;
    };

    X::OperationDescriptor describeOperation(in string name);
}
------  end IDL  -------
------ begin Output: (with -ORBtraceLevel 30)
ll_send: 93 bytes
4749 4f50 0100 0100 5100 0000 0000 0000 GIOP....Q.......
0d00 0000 0100 0000 1000 0000 c725 af98 .............%..
e7ba 0000 020a 0a18 3d00 0000 1200 0000 ........=.......
6465 7363 7269 6265 4f70 6572 6174 696f describeOperatio
6e00 6573 0700 0000 6e6f 626f 6479 006f n.es....nobody.o
0900 0000 6765 7441 7272 6179 00        ....getArray.
ll_recv: 282 bytes
4749 4f50 0100 0001 0000 010e 0000 0000 GIOP............
0000 000d 0000 0000 0000 0009 6765 7441 ............getA
7272 6179 0000 0000 0000 0001 0000 0000 rray............
0000 0006 6172 7261 7900 0000 0000 000e ....array.......
0000 0033 0000 0000 0000 001d 4944 4c3a ...3........IDL:
6f6d 672e 6f72 672f 434f 5242 412f 4f62 omg.org/CORBA/Ob
6a65 6374 3a31 2e30 0000 0000 0000 0007 ject:1.0........
4f62 6a65 6374 0000 0000 0001 0000 0000 Object..........
0000 0000 0000 0001 0000 0002 6100 0000 ............a...
0000 0006 6172 7261 7900 0000 0000 0015 ....array.......
0000 0060 0000 0000 0000 0029 4944 4c3a ...`.......)IDL:
536d 616c 6c74 616c 6b54 7970 6573 2f4f SmalltalkTypes/O
7264 6572 6564 436f 6c6c 6563 7469 6f6e rderedCollection
3a31 2e30 0000 0000 0000 0012 4f72 6465 :1.0........Orde
7265 6443 6f6c 6c65 6374 696f 6e00 0000 redCollection...
0000 0013 0000 000c 0000 0000 0000 000b ................
0000 0000 0000 0001 0000 0012 0000 0000 ................
0000 0006 6861 6c6c 6f00                ....hallo.
omniORB: Assertion failed.  This indicates a bug in omniORB.
 file: D:\users\sll\omni30\src\lib\omniORBpy\modules\common\pyMarshal.cc

 line: 3580
 info: 0

abnormal program termination
------ end Output
--
____________________________________________
Carsten Seibert
System Architect Shopfloor Products
ESEC SA, BU Factory Integration
carsten.seibert@esec.com    +41 41 749 54 55