segfault on startup, unless run in gdb

Problems building or running the engine, queries about how to use features etc.
Post Reply
shaveyourlife
Gnoblar
Posts: 1
Joined: Sun May 12, 2013 12:42 am

segfault on startup, unless run in gdb

Post by shaveyourlife » Sun May 12, 2013 3:25 am

I am trying to run the program "rviz" which is part of the Robot Operating System http://www.ros.org. Every time I run the program, I am greeted with a segfault message that looks like

Code: Select all

[ INFO] [1368323442.541705230]: rviz version 1.9.29
[ INFO] [1368323442.541890715]: compiled against OGRE version 1.7.4 (Cthugha)
Segmentation fault
What is weird is that if I run the program in gdb, it never crashes. This is very reproducible. I've never had it work without gdb, and I have never had it not work with gdb. I was able to produce a core dump, and then use gdb to postmortem, and the backtrace looks like the following:

Code: Select all

Core was generated by `/opt/ros/groovy/lib/rviz/rviz'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007fbce7bbe21c in ?? () from /usr/lib/fglrx/libGL.so.1
(gdb) bt
#0  0x00007fbce7bbe21c in ?? () from /usr/lib/fglrx/libGL.so.1
#1  0x00007fbce7d39bdb in ?? () from /usr/lib/fglrx/libGL.so.1
#2  0x0000000000000001 in ?? ()
#3  0x0000000000000001 in ?? ()
#4  0x000000000000005f in ?? ()
#5  0x00007fbce7d39d20 in ?? () from /usr/lib/fglrx/libGL.so.1
#6  0x000000000000590e in ?? ()
#7  0x0000000000000000 in ?? ()
Obviously, this does not help much. I'm posting here because I know the program relies heavily on Ogre, and I'm getting a bit desperate. Here is a copy of the Ogre log generated during startup: http://pastebin.com/ESa9mjRZ. The last few lines look like:

Code: Select all

*** Starting GLX Subsystem ***
******************************
[ INFO] [1368146234.543306272]: GLRenderSystem::_createRenderWindow "OgreWindow(0)", 1x1 windowed  miscParams: externalGLControl= macAPI=carbon parentWindowHandle=81788929
[ INFO] [1368146234.688634510]: GLXWindow::create used FBConfigID = 39
Segmentation fault
Trying to get more debug info, I ran the executable through valgrind, and produced a super long output seen here: http://pastebin.com/1Hbe92hJ The most relevant bit is right at the end:

Code: Select all

==25602== Conditional jump or move depends on uninitialised value(s)
==25602==    at 0x2B3A9F95: ??? (in /usr/lib/fglrx/dri/fglrx_dri.so)
==25602==    by 0xFFFFFFFFFFFFFFFE: ???
==25602==    by 0xFFFFFFFFFFFFFFFE: ???
==25602==    by 0xC07FFFFEFFFFFFFF: ???
==25602==    by 0x7FEFFE01F: ???
==25602==    by 0x2D773F0F: ???
==25602==    by 0x2D7752AF: ???
==25602==    by 0x2D77732B: ???
==25602==    by 0x2B426FB7: ??? (in /usr/lib/fglrx/dri/fglrx_dri.so)
==25602==
==25602==
==25602== Process terminating with default action of signal 11 (SIGSEGV)
==25602==  Bad permissions for mapped region at address 0x2EE869D8
==25602==    at 0x979521C: ??? (in /usr/lib/fglrx/libGL.so.1.2)
==25602==    by 0x26E1DB0F: ???
==25602==    by 0x2EBCB4B5: ??? (in /usr/lib/x86_64-linux-gnu/OGRE-1.7.4/RenderSystem_GL.so)
==25602==    by 0x2AD71377: ???
==25602==    by 0x990304F: ??? (in /usr/lib/fglrx/libGL.so.1.2)
==25602==    by 0x7FEFFE36F: ???
==25602==    by 0x9910BDA: ??? (in /usr/lib/fglrx/libGL.so.1.2)
Are there any suggestions for how I might go about fixing this? Debugging things I should try? Bug reports to file? Other people to ask for help? Thanks for any suggestions!

Side note
My system somehow has a second libGL.so.1 located at /usr/lib/x86_64-linux-gnu/mesa/. If I set my system to use that one, things like glxgears still run fine, but fglrxinfo provides a slightly different version string. Using that lib, the backtrace is

Code: Select all

Core was generated by `/opt/ros/groovy/lib/rviz/rviz'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f605de00cc0 in xcb_glx_get_string_string_length () from /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0
(gdb) bt
#0  0x00007f605de00cc0 in xcb_glx_get_string_string_length () from /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0
#1  0x00007f606343b4e4 in ?? () from /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
#2  0x00007f6063438f4c in ?? () from /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
#3  0x00007f602b74d57f in Ogre::GLSupport::initialiseExtensions() () from /usr/lib/x86_64-linux-gnu/OGRE-1.7.4/RenderSystem_GL.so
#4  0x00007f602b7857aa in ?? () from /usr/lib/x86_64-linux-gnu/OGRE-1.7.4/RenderSystem_GL.so
#5  0x00007f602b742f65 in Ogre::GLRenderSystem::initialiseContext(Ogre::RenderWindow*) () from /usr/lib/x86_64-linux-gnu/OGRE-1.7.4/RenderSystem_GL.so
#6  0x00007f602b74818b in Ogre::GLRenderSystem::_createRenderWindow(std::string const&, unsigned int, unsigned int, bool, std::map<std::string, std::string, std::less<std::string>, Ogre::STLAllocator<std::pair<std::string const, std::string>, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > > const*) ()
   from /usr/lib/x86_64-linux-gnu/OGRE-1.7.4/RenderSystem_GL.so
#7  0x00007f60639cd8ce in Ogre::Root::createRenderWindow(std::string const&, unsigned int, unsigned int, bool, std::map<std::string, std::string, std::less<std::string>, Ogre::STLAllocator<std::pair<std::string const, std::string>, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > > const*) ()
   from /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.7.4
#8  0x00007f6067c763bc in rviz::RenderSystem::makeRenderWindow(long, unsigned int, unsigned int) () from /opt/ros/groovy/lib/librviz.so
#9  0x00007f6067c76cea in rviz::RenderSystem::RenderSystem() () from /opt/ros/groovy/lib/librviz.so
#10 0x00007f6067c76de5 in rviz::RenderSystem::get() () from /opt/ros/groovy/lib/librviz.so
#11 0x00007f6067c73ef1 in rviz::QtOgreRenderWindow::QtOgreRenderWindow(QWidget*) () from /opt/ros/groovy/lib/librviz.so
#12 0x00007f6067c91f32 in rviz::RenderPanel::RenderPanel(QWidget*) () from /opt/ros/groovy/lib/librviz.so
#13 0x00007f6067ccf211 in rviz::VisualizationFrame::initialize(QString const&) () from /opt/ros/groovy/lib/librviz.so
#14 0x00007f6067cd7b32 in rviz::VisualizerApp::init(int, char**) () from /opt/ros/groovy/lib/librviz.so
#15 0x0000000000400afe in main ()
In this case, it does not run in gdb either.
0 x

Post Reply