[omniORB] application problem (omniORB 3.0.4)

Harri Pasanen harri.pasanen at trema.com
Tue Jan 20 18:27:03 GMT 2004


Hi,

Most likely memory reference bug.  Run it under valgrind  
http://valgrind.kde.org/ and you have a good change of finding it.

Just a guess,

Harri

On Tuesday 20 January 2004 17:20, Sogor, Laszlo (MED) wrote:
> Hi all,
>
> I have a problem which is possible not omniORB related:
>
> We use a program (comes from VNC), if this program is active,
> starting our application always crashes. If this program is not
> started, once from every 10 runs crashes (reproducable).
>
> We have a server application which uses omniORB to initiate
> requests to its client. The client initializes its ORB servant and
> starts the server and tells its IOR to it. When the server process
> initializes CORBA, it hangs in the ORB_init() function:
>
> The corresponding code:
>
> CORBA::ORB_var orb;
> CORBA::Object_var obj;
>
> #ifdef HAS_Cplusplus_Namespace
> typedef ASAppVxtl::ASCommand_var ASCommand_var;
> #endif
>
> AdSCommand_var vcref;
>
> char    progname[]="vxtl";
> char    *cmdline[3];
>
> int corba_init_com(const char *ior)
> {
>         int     paramnum = 2;   // ORB_init changes the cmdline so
> we cannot // give constant number to it int     error = CORBA_OK;
>
>         if (corba_status)
>         {
>                 return CORBA_ACTIVE;
>         }
>
>         /*
>          * IOR must not be an empty string
>          */
>         if (strlen(ior) == 0)
>         {
>                 return CORBA_ERROR;
>         }
> ...
>         cmdline[0] = progname;
>         cmdline[1] = srv_ior;
>         cmdline[2] = NULL;
>
>         try
>         {
>                 orb = CORBA::ORB_init(paramnum, cmdline,
> "omniORB3"); obj = orb->string_to_object(srv_ior);
>                 vcref = ASAppVxtl::ASCommand::_narrow(obj);
>
>                 if( CORBA::is_nil(vcref) )
>                 {
>                         return VXTLCORBA_ERROR;
>                 }
>
>         }
> ...
> }
>
> The ORB_init() function does not return.
>
> I linked with the following flags:
> '-lomniORB3 -ltcpwrapGK -lomnithread -lpthread -mt'
> I compiled the sources with:
> /usr/bin/g++ -D__OMNIORB3__ -D_REENTRANT -D__x86__ -D__linux__ \
> -D__OSVERSION__=2 ... -MD -o file.o -c file.c
>
> The corresponding processes:
>
>  2111 ?        S      0:00 ...vox -R ...
>  2112 ?        S      0:00 ...vox -R ...
>  2113 ?        S      0:00 ...vox -R ...
>
> $ gdb ...vox 2111
> ...
> (gdb) where
> #0  0x420293d5 in sigsuspend () from /lib/i686/libc.so.6
> #1  0x407d5609 in __pthread_wait_for_restart_signal ()
>    from /lib/i686/libpthread.so.0
> #2  0x407d581c in pthread_create at GLIBC_2.0 () from
> /lib/i686/libpthread.so.0
> #3  0x407caac5 in omni_thread::start ()
>    from .../lib/libomnithread.so.2
> #4  0x407cac18 in omni_thread::start_undetached ()
>    from .../lib/libomnithread.so.2
> #5  0x4076a214 in omni_strand_initialiser::attach ()
>    from .../lib/libomniORB3.so.0
> #6  0x4074f061 in CORBA::ORB_init ()
>    from .../lib/libomniORB3.so.0
> #7  0x08401338 in corba_init_com ()
> #8  0x0822e804 in corba_init_com_function ()
> #9  0x081cad9e in line_interpreter ()
> #10 0x081cf7f5 in process_input ()
> #11 0x081cfd0c in start_connection ()
> #12 0x081d01d5 in generic_input_callback ()
> #13 0x4027809e in _XtRemoveAllInputs () from
> /usr/X11R6/lib/libXt.so.6 #14 0x4027838f in XtAppNextEvent () from
> /usr/X11R6/lib/libXt.so.6 #15 0x083d7328 in XtVxtlMainLoop ()
> #16 0x08207352 in main ()
> #17 0x42017589 in __libc_start_main () from /lib/i686/libc.so.6
> (gdb) quit
> $ gdb ...vox 2112
> ...
> (gdb) where
> #0  0x420e0187 in poll () from /lib/i686/libc.so.6
> #1  0x407d2c30 in __pthread_manager () from
> /lib/i686/libpthread.so.0 (gdb) quit
> $ gdb ...vox 2113
> ...
> (gdb) where
> #0  0x420293d5 in sigsuspend () from /lib/i686/libc.so.6
> #1  0x407d5609 in __pthread_wait_for_restart_signal ()
>    from /lib/i686/libpthread.so.0
> #2  0x407d1eec in pthread_cond_wait () from
> /lib/i686/libpthread.so.0 #3  0x407ca1c2 in omni_condition::wait ()
>    from .../lib/libomnithread.so.2
> #4  0x4076a42d in omniORB_Ripper::run_undetached ()
>    from .../lib/libomniORB3.so.0
> #5  0x407ca7bd in omni_thread_wrapper ()
>    from .../lib/libomnithread.so.2
> #6  0x407d2faf in pthread_start_thread () from
> /lib/i686/libpthread.so.0 (gdb) quit
>
>
> I tried out everything I could imagine:
> - omniORB 3.0.5: does the same
> - Redhat 7.3 with kernels kernel-smp-2.4.20-(19, 20, 28) hangs
> - Redhat 7.3 with kernel kernel-smp-2.4.18-18.7.x does NOT hang
>                   (everything else is the same)
>
> I compiled the program with the following compilers / libs
> - glibc-2.2.5-44
> - glibc-common-2.2.5-44
> - glibc-devel-2.2.5-44
> - glibc-kernheaders-2.4-7.14
> - gcc-2.96-113
> - gcc-c++-2.96-113
> - libstdc++-devel-2.96-113
> - libstdc++-2.96-113
>
> The workstaton (on which the program runs officially)
> - glibc-common-2.2.5-43
> - glibc-2.2.5-43
> - libstdc++-2.96-113
>
> The workstation is:
> - 2 * Intel(R) Xeon(TM) CPU 3.06GHz
> - 2GB RAM
>
> Unfortunately I cannot change anything on the sw configuration :(
>
> Does anyone has an idea what could be the problem?
>
> Thanks,
>
> Laszlo Sogor
>
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list




More information about the omniORB-list mailing list