#222 freewrl-1.22.10 crashes with SEGV

open
nobody
None
5
2010-11-02
2010-11-02
bashford
No

I've just build freewrl-1.22.10 from the source tarball, but it
crashes with a segmentation violation just after flashing up a
window. This happens with or whithout giving an URL on the command
line. Here is how it looks under a debugger:

[bashford@L090205 ~]$ LD_LIBRARY_PATH=/usr/lib64/xulrunner-1.9 gdb freewrl
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/local/bin/freewrl...done.
(gdb) run
Starting program: /usr/local/bin/freewrl
[Thread debugging using libthread_db enabled]
[New Thread 0x40200940 (LWP 7794)]
[New Thread 0x40401940 (LWP 7795)]
[New Thread 0x40602940 (LWP 7796)]
opengl version=1.4 (2.1.2 NVIDIA 195.36.31)
NOTE: Trying to use Vertex Buffer Objects - turn off with the environment var if desired

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x40200940 (LWP 7794)]
0x0000000000000000 in ?? ()
(gdb) where
#0 0x0000000000000000 in ?? ()
#1 0x00002aaaaabcba2d in OcclusionStartofEventLoop () at opengl/Frustum.c:776
#2 0x00002aaaaaaf0cb1 in EventLoop () at main/MainLoop.c:340
#3 0x00002aaaaaaf1cf7 in _displayThread () at main/MainLoop.c:1761
#4 0x0000003b24e0673d in start_thread () from /lib64/libpthread.so.0
#5 0x0000003b242d3d1d in clone () from /lib64/libc.so.6
(gdb) down
Bottom (innermost) frame selected; you cannot go down.
(gdb) up
#1 0x00002aaaaabcba2d in OcclusionStartofEventLoop () at opengl/Frustum.c:776
776 opengl/Frustum.c: No such file or directory.
in opengl/Frustum.c
(gdb) print OccQueries
$1 = (GLuint *) 0x619a90
(gdb) print OccQuerySize
$2 = 1000
(gdb) print *OccQueries
$3 = 0
(gdb) print OccQueries[0]
$4 = 0
(gdb) print OccQueries[1]
$5 = 0
(gdb) print OccQueries[999]
$6 = 0

Note that I had to add LD_LIBRARY_PATH=/usr/lib64/xulrunner-1.9 to get
it to start up at all.

My system is CentOS 5.5:
uname -a
Linux L090205.stjude.org 2.6.18-194.3.1.el5 #1 SMP Thu May 13 13:08:30 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

Just before building I used yum to install or update expat (to
1.95.8-8.3.el5_5.3), imlib2 and imlib2-devel (1.3.0-6.el5), glew
glew-devel (1.5.1-3.el5).

Here is how configure went:

[root@L090205 freewrl-1.22.10]# ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 98304
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking stdbool.h usability... yes
checking stdbool.h presence... yes
checking for stdbool.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/msg.h usability... yes
checking sys/msg.h presence... yes
checking for sys/msg.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for sys/stat.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for sys/types.h... (cached) yes
checking for sys/wait.h... (cached) yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking for unistd.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking return type of signal handlers... void
checking for sighandler_t... no
checking for int32_t... yes
checking for pid_t... yes
checking for stdbool.h that conforms to C99... (cached) yes
checking for _Bool... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking whether gcc needs -traditional... no
checking for strchr... yes
checking for strrchr... yes
checking for strdup... yes
checking for strndup... yes
checking for strerror... yes
checking for getopt... yes
checking for getopt_long... yes
checking for getopt_long_only... yes
checking for malloc... yes
checking for calloc... yes
checking for realloc... yes
checking for usleep... yes
checking for gettimeofday... yes
Platform: linux-gnu, linux
checking whether to enable debugging (default=off)... no
checking whether to enable colorized thread console output (default=off)... no
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for deflate in -lz... yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for FREETYPE... yes
checking whether to enable fontconfig support... no
checking whether to enable libcurl (could be used instead of wget)... no
configure: Determining Javascript engine to build against
checking for mozilla-js >= 1.9 while ... checking for JAVASCRIPT_ENGINE... yes
configure: Using mozilla-js for Javascript engine library
checking for XML... yes
checking expat.h usability... yes
checking expat.h presence... yes
checking for expat.h... yes
checking for XML_ParserCreate in -lexpat... yes
checking for X... libraries , headers
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for XAW... yes
checking for X11/extensions/xf86vmode.h... yes
checking for XF86VidModeQueryExtension in -lXxf86vm... yes
Target windowing system selected: x11
checking for OpenGL... yes
checking GL/glew.h usability... yes
checking GL/glew.h presence... yes
checking for GL/glew.h... yes
checking for glewInit in -lGLEW... yes
checking jpeglib.h usability... yes
checking jpeglib.h presence... yes
checking for jpeglib.h... yes
checking for jpeg_start_decompress in -ljpeg... yes
checking for PNG... yes
checking for IMLIB2... yes
checking whether to enable building of libEAI... no
checking whether to enable building of sound module... yes
checking whether to enable building of java classes... no
configure: Not building java classes
checking whether to enable building of browser plugin... yes
configure: Determining browser plug-in framework to build against
checking for iceape-plugin while ... checking for MOZILLA_PLUGIN... no
checking for xulrunner-plugin while ... checking for MOZILLA_PLUGIN... no
checking for seamonkey-plugin while ... checking for MOZILLA_PLUGIN... no
checking for firefox-plugin while ... checking for MOZILLA_PLUGIN... no
checking for mozilla-plugin while ... checking for MOZILLA_PLUGIN... yes
configure: Using mozilla-plugin for Mozilla plugin library
configure: Installing plugin to ${exec_prefix}/lib/mozilla/plugins
checking for int32... yes
checking for uint32... yes
checking for int16... yes
checking for uint16... yes
configure: Status bar flavor: standard
checking for firefox... /usr/bin/firefox
configure: Using /usr/bin/firefox for internet browser
checking for sox... /usr/bin/sox
configure: Using /usr/bin/sox for sound converter
checking for unzip... /usr/bin/unzip
configure: Using /usr/bin/unzip for zip decompressor
checking for wget... /usr/bin/wget
configure: Using /usr/bin/wget for http fetcher
checking for convert... /usr/bin/convert
configure: Using /usr/bin/convert for image converter
configure: creating ./config.status
config.status: creating vtempl
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/bin/Makefile
config.status: creating src/lib/Makefile
config.status: creating src/lib/libFreeWRL.pc
config.status: creating src/plugin/Makefile
config.status: creating src/libeai/Makefile
config.status: creating src/libeai/libFreeWRLEAI.pc
config.status: creating src/sound/Makefile
config.status: creating src/java/Makefile
config.status: creating src/message/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

Then make and make install seemed to go fine.

And if it helps:

[root@L090205 freewrl-1.22.10]# LD_LIBRARY_PATH=/usr/lib64/xulrunner-1.9 ldd /usr/local/bin/freewrl
libFreeWRL.so.1 => /usr/local/lib/libFreeWRL.so.1 (0x00002adc080b3000)
libmozjs.so => /usr/lib64/xulrunner-1.9/libmozjs.so (0x000000328f800000)
libplds4.so => /usr/lib64/libplds4.so (0x000000328dc00000)
libplc4.so => /usr/lib64/libplc4.so (0x000000328e000000)
libnspr4.so => /usr/lib64/libnspr4.so (0x000000328e400000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003b24e00000)
libexpat.so.0 => /lib64/libexpat.so.0 (0x0000003af4200000)
libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x0000003b2f400000)
libz.so.1 => /usr/lib64/libz.so.1 (0x0000003b25200000)
libGLU.so.1 => /usr/lib64/libGLU.so.1 (0x00000037eea00000)
libGL.so.1 => /usr/lib64/libGL.so.1 (0x0000003b23e00000)
libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x0000003b29600000)
libpng12.so.0 => /usr/lib64/libpng12.so.0 (0x0000003734800000)
libImlib2.so.1 => /usr/lib64/libImlib2.so.1 (0x0000003af3e00000)
libXext.so.6 => /usr/lib64/libXext.so.6 (0x0000003b26200000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003b24a00000)
libm.so.6 => /lib64/libm.so.6 (0x0000003b24600000)
libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x0000003734000000)
libSM.so.6 => /usr/lib64/libSM.so.6 (0x0000003b29200000)
libICE.so.6 => /usr/lib64/libICE.so.6 (0x0000003b28e00000)
libXxf86vm.so.1 => /usr/lib64/libXxf86vm.so.1 (0x0000003b38c00000)
libXaw.so.7 => /usr/lib64/libXaw.so.7 (0x00002adc0846d000)
libXmu.so.6 => /usr/lib64/libXmu.so.6 (0x0000003b23a00000)
libXt.so.6 => /usr/lib64/libXt.so.6 (0x0000003b38400000)
libX11.so.6 => /usr/lib64/libX11.so.6 (0x0000003b25a00000)
libGLEW.so.1.5 => /usr/lib64/libGLEW.so.1.5 (0x00002adc086db000)
libc.so.6 => /lib64/libc.so.6 (0x0000003b24200000)
/lib64/ld-linux-x86-64.so.2 (0x0000003b23200000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003b2a600000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003b29e00000)
libdrm.so.2 => /usr/lib64/libdrm.so.2 (0x0000003b2ec00000)
libXau.so.6 => /usr/lib64/libXau.so.6 (0x0000003b25e00000)
libXpm.so.4 => /usr/lib64/libXpm.so.4 (0x00002adc0892c000)
libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x0000003b25600000)

Discussion

  • This crash looks like it has to do with a bug in your video driver relating to VBO support -- it's the same thing I saw when attempting to run it on my intel hardware. I believe we will need to add an exclusion for your video card/driver.

    Could you post the output of 'glxinfo |grep renderer' please?

     
  • Actually, before you do that, could you do a test run by setting the environment variable FREEWRL_NO_VBOS=1 first? If that doesn't crash, then it is a VBO issue; otherwise it's something else.

     
  • bashford
    bashford
    2010-11-02

    I guess it's something else than VBOS.

    I tried running with FREEWRL_NO_VBOS=1 and got the same crash.

    [bashford@L090205 ~]$ LD_LIBRARY_PATH=/usr/lib64/xulrunner-1.9 FREEWRL_NO_VBOS=1 freewrl
    opengl version=1.4 (2.1.2 NVIDIA 195.36.31)
    FreeWRL got a SIGSEGV - can you please mail the file(s) to
    freewrl-09@rogers.com with a valid subject line. Thanks.

    I also did this under the gdb debugger, and got identical output to
    what I posted before.

    For what it's worth:

    [bashford@L090205 ~]$ glxinfo | grep renderer
    OpenGL renderer string: Quadro NVS 160M/PCI/SSE2

    The machine is a laptop with an Nvidia card, and the X-driver
    is from Nvidia (not Xfree).

     
  • bashford
    bashford
    2010-11-02

    Searching the source, I see that FREEWRL_NO_VBOS only occurs in two files, bin/main.c and lib/main.c,
    and judging be the code there, FREEWRL_NO_VBOS=1 is the default anyway, unless one comments
    out the _putenv line as mentioned in the comments above it.

     
  • Steve Traylen
    Steve Traylen
    2010-11-23

    I see the same course of events:

    $ glxinfo |grep renderer
    OpenGL renderer string: NVIDIA GeForce 9400M OpenGL Engine

     
  • Looking to close this bug; does this still occur with newer versions of freewrl and/or newer centos environment?

     
  • This is exactly the type of information Ive been looking for. Thank you for posting this article for readers. We can all learn from this.
    <a href="http://www.zootoo.com/profile/filejaguar01/blog/entry/selfhelpguidetoacquiringpromdr" title="Purchasing">Purchasing</a>