[omniORB] Strange bug when transferring data between objects

Bjorn Wennberg bjornw@tihlde.org
14 Mar 2000 01:13:11 -0500


Dear omniorbers!

[
 RedHat-6.1, omniORB-2.7.1 and omniORB-2.8.0_development
 I can reproduce this bug on two separate machines.=20
]

I have an object which acts as a database-proxy. A client
can issue an 'select * from some_tbl' and the result is
packed into a corba struct. This struct is then packed into
a sequence in such a way that I can access each element as
if it were a row in the database.

Now - suddenly the object.select() call casts an an
unknown exception. This happens IF and only IF the result
set is larger than 15499 number of rows! No fatal-exception,
no omniorb-comm exception, no nothing. Trying to run the
client with -ORBtraceLevel 99 doesn't print out _any_
information. Thats why I'm curios.

I've tried to delete the latest/firsts rows from the database
if any of the rows would be offensive. I've tried randomly to
delete from the database as well. But it seems to me it is
a magically limit of 15499 number of rows. 15498 number of
rows works perfectly well. And it has nothing to do which=20
rows.=20

Ok - so what is happening???

This is the definition of the result-set:

   ////////////////////////////////////////////////////////////
   //
   // database entries
   //
   //

   // Used as a binary-string
   typedef sequence<octet> bin_string;

   // One row of information
   struct corba_db_row_s {
         sequence<octet>        info_bits_seq;

         sequence<octet>        octet_seq;
         sequence<short>        short_seq;
         sequence<long>         long_seq;
         sequence<bin_string>   bin_string_seq;
         sequence<string>       string_seq;
         sequence<string>       text_seq;
         sequence<double>       double_seq;
   };


   // One table of information
   struct corba_db_data_s {
         octet                    db_id;
         short                    container_id;
         sequence<corba_db_row_s> rows;
   };

   // Several tables of information
   typedef sequence<corba_db_data_s> corba_db_data_seq;


----------------
This is the definition of the database proxy object:

      // Selects from database
      corba_db_data_seq=20
         Select(in corba_db_query_seq db_query_seq)
         raises(XDbError);
-------

The db-proxy object selects all rows from the database and creates
the result set. The object builds the structure - no problems.

One row consists of:
 3 bytes columns                =3D   3
 4 short columns                =3D   8
18 integer columns              =3D  72
 1 string column length 30 + 1  =3D  31
 1 string column length 30 + 1  =3D  31
 1 string column length 10 + 1  =3D  11
--------------------------------------
      Minimum row-size          =3D 156

For 15499 rows this would be 156*15499 =3D 2'417'844

I'm guessing that the overhead per sequence would add up some, but
this is merely to illustrate the size of the output.


Please enlighten me here! :-)

Do I need to increase my shared-memory?, max something per user?
Or is this a problem in the unmarshaling process? Max alloc of
some of the sequences?


bjornw>
--=20
-------------------------------------------------------
Bj=F8rn Wennberg       email: bjornw@tihlde.org
                        ms: +47 9599 2657