[Openais] Re: openais segfault

Steven Dake sdake at redhat.com
Wed Apr 5 14:39:17 PDT 2006


Love those bugs that go away with printfs :)

Can you try it without optimization without the printfs.  If that works,
then it is likely an optimization bug.  It looks like you are already
running in debug mode though.  So please do the following

rm lcr_ifact.c
svn udpate lcr_ifact.c
make (with DEBUG)
objdump -S lcr_ifact.o

I'll analyze the differences in the compiler output.

Regards
-steve

On Wed, 2006-04-05 at 14:32 -0700, Mark Haverkamp wrote:
> On Wed, 2006-04-05 at 14:06 -0700, Steven Dake wrote:
> > These toolchains work:
> > [root at shih openais]# gcc --version
> > gcc (GCC) 3.4.5 20051201 (Red Hat 3.4.5-2)
> > 
> > root at slowpoke:/s/test-for-mark/exec# gcc --version
> > gcc (GCC) 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9)
> > 
> > I'll install fc5 on one of my test machines.  Please still try the patch
> > I previously sent it may give us some more info.
> 
> Something about your printf statements in lcr_ifact.c eliminates the
> segfault :-)
> 
> Mark.
> 
> 
> > 
> > Regards
> > -steve
> > 
> > On Wed, 2006-04-05 at 13:55 -0700, Mark Haverkamp wrote:
> > > On Wed, 2006-04-05 at 13:19 -0700, Mark Haverkamp wrote:
> > > > On Wed, 2006-04-05 at 12:11 -0700, Steven Dake wrote:
> > > > > Take out the static inline and give me a backtrace (line 74).  The
> > > > > inline isn't showing the true backtrace that I'm interested to see.
> > > 
> > > Steve,
> > > 
> > > I just found out a bit of information that may explain why I'm seeing
> > > the fault and you are not.  I updated the machine that I build on to FC5
> > > a few days ago.  It is using gcc 4.1.0-3.  I recompiled on another
> > > machine using an older gcc and aisexec started up OK.  Which gcc are you
> > > building with.
> > > 
> > > Mark.
> > > 
> > > > 
> > > > OK, I removed all the static and inline from lcr_ifact.c functions. My
> > > > file has:  
> > > > 	unsigned int len;
> > > > in function lcr_select_so() at line 74.
> > > > 
> > > > 
> > > > (gdb) r
> > > > Starting program: /home/localmarkh/views/svn/openais_work/exec/aisexec
> > > > [Thread debugging using libthread_db enabled]
> > > > [New Thread -151132480 (LWP 24047)]
> > > > 
> > > > Program received signal SIGSEGV, Segmentation fault.
> > > > [Switching to Thread -151132480 (LWP 24047)]
> > > > 0x08065cf7 in lcr_ifact_reference (iface_handle=0xfee32ca0,
> > > >     iface_name=0x80685f6 "objdb", version=0, iface=0xfee32c9c, context=0x0)
> > > >     at lcr_ifact.c:102
> > > > 102                     for (i = 0; i < instance->iface_count; i++) {
> > > > 
> > > > 
> > > > (gdb) bt
> > > > #0  0x08065cf7 in lcr_ifact_reference (iface_handle=0xfee32ca0,
> > > >     iface_name=0x80685f6 "objdb", version=0, iface=0xfee32c9c, context=0x0)
> > > >     at lcr_ifact.c:102
> > > > #1  0x0805fd6a in main () at main.c:1179
> > > > (gdb)
> > > > 
> > > > (gdb) p lcr_component_instance_database
> > > > $1 = {handle_count = 1, handles = 0x8d784c0, iterator = 1}
> > > > (gdb) p instance
> > > > $3 = (struct lcr_component_instance *) 0x7e5d55
> > > > (gdb) p *instance
> > > > $4 = {ifaces = 0x6d675f5f, iface_count = 1935634031, dl_handle =
> > > > 0x74726174,
> > > >   refcount = 1593859935,
> > > >   library_name = "_cxa_finalize\000_Jv_RegisterClasses
> > > > \000_nss_files_parse_protoent\000__ctype_b_loc\000__strtoul_internal
> > > > \000__rawmemchr\000fopen\000__errno_location\000rewind\000fileno
> > > > \000fcntl\000fclose\000_nss_files_setprotoent\000__pthread_mutex_lock
> > > > \000_"...}
> > > > 
> > > > 
> > > > > 
> > > > > Thanks
> > > > > -steve
> > > > 
> > > > _______________________________________________
> > > > Openais mailing list
> > > > Openais at lists.osdl.org
> > > > https://lists.osdl.org/mailman/listinfo/openais




More information about the Openais mailing list