Discussion:
[omniORB] running omniorb in uClibc env
Mika Laitio
2011-05-28 04:09:47 UTC
Permalink
Hi Duncan

I would like to get omniORB working with uClibc which is lighter than
glibc but does not therefore have all of the thread features for example.

I can build the omniORB against it, but during the usage I will
omniNames for example to crash after a couple of requests.
I suspect that the problem is somehow related to uClibcs thread handling
code and would like to investigate whether it's possible to make changes
easily to omniorb or uclibc to fix those.

Problem is just that I need to find the correct place where the crash is
really happening on omniNames and at the moment I am little lost. :-(

As a backround I can say that the app I use will work just fine when
build against the glibc. (And I have tested with omniorb 4.1.3 - 4.1.5
versions).

On uclibc env I can get the omniNames to crash by running a server app
which will do basically a following steps:

1) poa_obj = orb->resolve_initial_references(CONST_ROOT_POA_NAME);
2) rootpoa = PortableServer::POA::_narrow(poa_obj);
3) ns_obj = orb->resolve_initial_references(CONST_NAME_SERVICE_NAME);
4) ns_cntx = CosNaming::NamingContext::_narrow(ns_obj);
5) ns_cntx->resolve(context_data)

Now step 5 will cause the omniNames server to crash.
From the logs I can see that omniNames receives request but newer
responds to it before crashing.

Last lines from the omniNames before it aborts are:

omniORB: (3) Dispatching remote call 'resolve' to: key<NameService>(active)
[New LWP 1262]

Do you have any suggestions from where I should check the problem or try
to made changes to threading code. Last lines to log seems to come from
omniOrbBOA::dispatch(omniCallHandle& handle, omniLocalIdentity* id) method.

Full log is below, but it seems that gdb backtrace does not show
anything useful.

Btw, I missed somehow your verification mail related to "disable-long
double" patch on last October. Anyway, your version from that patch
worked ok for me for enabling the omniorb build.

Mika

---> log from OmniNames before crash

Read log file successfully.
Root context is
IOR:010000002b00000049444c3a6f6d672e6f72672f436f734e616d696e672f4e616d696e67436f6e746578744578743a312e300000010000000000000070000000010102000d0000003139322e3136382e332e34300000f90a0b0000004e616d6553657276696365000300000000000000080000000100000000545441010000001c0000000100000001000100010000000100010509010100010000000901010003545441080000007310de4d01000488
Checkpointing Phase 1: Prepare.
Checkpointing Phase 2: Commit.
Checkpointing completed.
omniORB: (3) Dispatching remote call '_is_a' to: key<NameService> (active)
omniORB: (3) Dispatching remote call 'resolve' to: key<NameService> (active)
[New LWP 1262]

Program received signal SIGABRT, Aborted.
[Switching to LWP 1262]
0xb750c539 in *__GI_raise (sig=-1219461733) at
libpthread/nptl/sysdeps/unix/sysv/linux/raise.c:60
60 libpthread/nptl/sysdeps/unix/sysv/linux/raise.c: No such file or
directory.
in libpthread/nptl/sysdeps/unix/sysv/linux/raise.c
Current language: auto; currently c
(gdb) back
#0 0xb750c539 in *__GI_raise (sig=-1219461733) at
libpthread/nptl/sysdeps/unix/sysv/linux/raise.c:60
#1 0xb751464c in __malloc_lock () from /lib/libc.so.0
#2 0xb7507d9b in *__GI_abort () at libc/stdlib/abort.c:78
#3 0xb752f271 in _Unwind_RaiseException (exc=0x8fd35c0)
at
/home/lamikr/misc/src/openwrt/openwrt_trunk_git/build_dir/toolchain-i386_gcc-linaro_uClibc-0.9.32/gcc-linaro-4.5-2011.02-0/libgcc/../gcc/unwind-pe.h:155
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb)
#0 0xb750c539 in *__GI_raise (sig=-1219461733) at
libpthread/nptl/sysdeps/unix/sysv/linux/raise.c:60
#1 0xb751464c in __malloc_lock () from /lib/libc.so.0
#2 0xb7507d9b in *__GI_abort () at libc/stdlib/abort.c:78
#3 0xb752f271 in _Unwind_RaiseException (exc=0x8fd35c0)
at
/home/lamikr/misc/src/openwrt/openwrt_trunk_git/build_dir/toolchain-i386_gcc-linaro_uClibc-0.9.32/gcc-linaro-4.5-2011.02-0/libgcc/../gcc/unwind-pe.h:155
Loading...