You are not logged in.

#1 2009-05-07 19:55:48

Belitsky.A
Member
From: Russia, Zelenograd
Registered: 2008-01-10
Posts: 57

can't get a useful backtrace

I'm trying to debug some app. It uses ogre and has been built with debuging symbols. So... There is a bug somewhere in program, it segfaults after some actions. To get a backtrace I doing next:

$ ulimit -c unlimited
$ ./program
    ...
    <Segfault there>
$ gdb program core
...
(gdb) bt
#0  0xb767af96 in memcpy () from /lib/libc.so.6
#1  0x00000004 in ?? ()
#2  0xb66ffc3e in elt () from /usr/lib/xorg/modules/dri/libdricore.so
#3  0x00000018 in ?? ()
#4  0x00000008 in ?? ()
#5  0xb7676093 in malloc () from /lib/libc.so.6
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

What it means? And how to get useful backtrace?

Offline

#2 2009-05-08 06:11:01

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,545

Re: can't get a useful backtrace

No clue about why it stopped, but look at the lines before the "??"s -- I'd guess you should rebuild glibc with debugging symbols, and whatever packager has libdricore.so.

Offline

#3 2009-05-08 08:06:07

quarkup
Member
From: Portugal
Registered: 2008-09-07
Posts: 497
Website

Re: can't get a useful backtrace

- are u compiling that app with the correct options (-g and -pg if using gcc) ?


maybe gprof can help (or valgrind) both support verbose/detailed messages..


If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.

Offline

#4 2009-05-08 09:23:27

Belitsky.A
Member
From: Russia, Zelenograd
Registered: 2008-01-10
Posts: 57

Re: can't get a useful backtrace

With valgrind I've got more verbose output:

==6471== Process terminating with default action of signal 11
(SIGSEGV): dumping core
==6471==  Access not within mapped region at address 0x1F
==6471==    at 0x4025C30: memcpy (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==6471==    by 0x5CFAC3D: elt (in /usr/lib/xorg/modules/dri/libdricore.so)
==6471==    by 0x5CFB22A: vbo_split_copy (in /usr/lib/xorg/modules/dri/libdricore.so)
==6471==    by 0x5CFA9CE: vbo_split_prims (in /usr/lib/xorg/modules/dri/libdricore.so)
==6471==    by 0x5D02608: _tnl_draw_prims (in /usr/lib/xorg/modules/dri/libdricore.so)
==6471==    by 0x5CF903E: vbo_exec_DrawRangeElements (in /usr/lib/xorg/modules/dri/libdricore.so)
==6471==    by 0x5CF92BB: vbo_exec_DrawElements (in /usr/lib/xorg/modules/dri/libdricore.so)
==6471==    by 0x59E5C97: Ogre::GLRenderSystem::_render(Ogre::RenderOperation const&) (in /usr/lib/OGRE/RenderSystem_GL.so)
==6471==    by 0x43655AE: Ogre::SceneManager::renderSingleObject(Ogre::Renderable*, Ogre::Pass const*, bool, bool, std::vector<Ogre::Light*, std::allocator<Ogre::Light*> > const*) (in /usr/lib/libOgreMain-1.6.2.so)
==6471==    by 0x4359D98: Ogre::SceneManager::SceneMgrQueuedRenderableVisitor::visit(Ogre::Renderable*) (in /usr/lib/libOgreMain-1.6.2.so)
==6471==    by 0x4318010: Ogre::QueuedRenderableCollection::acceptVisitorGrouped(Ogre::QueuedRenderableVisitor*) const (in /usr/lib/libOgreMain-1.6.2.so)
==6471==    by 0x431806A: Ogre::QueuedRenderableCollection::acceptVisitor(Ogre::QueuedRenderableVisitor*, Ogre::QueuedRenderableCollection::OrganisationMode) const (in /usr/lib/libOgreMain-1.6.2.so)
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

So maybe this bug is related to ogre...

Offline

Board footer

Powered by FluxBB