climateprediction.net home page
viz 4.04 segfault immediately after mapping window

viz 4.04 segfault immediately after mapping window

Questions and Answers : Unix/Linux : viz 4.04 segfault immediately after mapping window
Message board moderation

To post messages, you must log in.

AuthorMessage
old_user26469

Send message
Joined: 23 Oct 04
Posts: 13
Credit: 70,493
RAC: 0
Message 5573 - Posted: 23 Oct 2004, 12:05:17 UTC

nix@hades 447 .../.boinc/projects/climateprediction.net% ./hadsm3viz_4.04_i686-pc-linux-gnu
searching for active shmem
using model_id 31kk_100163435
Segmentation fault

This might be a C++ ABI problem:

libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4eee3000)
[...]
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x4ec42000)

(Everything on this Athlon IV system including GLUT is built with GCC 3.4.2 and is using the corresponding version of libstdc++, libstdc++.so.6; viz seems to be built with GCC 3.3.2, with a slightly different C++ ABI and version of listdc++, and is using things like std::basic_string which have changed internal representation between libstdc++5 and libstdc++6, and calling GLUT...)


Some rudimentary valgrind results:

nix@hades 453 .../.boinc/projects/climateprediction.net% valgrind --tool=memcheck ./hadsm3viz_4.04_i686-pc-linux-gnu
==1239== Memcheck, a memory error detector for x86-linux.
==1239== Copyright (C) 2002-2004, and GNU GPL\'d, by Julian Seward et al.
==1239== Using valgrind-2.2.0, a program supervision framework for x86-linux.
==1239== Copyright (C) 2000-2004, and GNU GPL\'d, by Julian Seward et al.
==1239== For more details, rerun with: -v
==1239==
searching for active shmem
using model_id 31kk_100163435
==1239== Syscall param ioctl(generic) contains uninitialised or unaddressable byte(s)
==1239== at 0x44DFE174: ioctl (in /lib/libc-2.3.2.so)
==1239== Address 0x52BFD7B0 is on thread 1\'s stack
==1239==
==1239== Invalid read of size 2
==1239== at 0x1BBE23BE: sigfpe_handler (in /usr/X11R6/lib/modules/dri/mach64_dri.so)
==1239== Address 0x6E is not stack\'d, malloc\'d or (recently) free\'d
==1239==
==1239== Process terminating with default action of signal 11 (SIGSEGV)
==1239== Access not within mapped region at address 0x6E
==1239== at 0x1BBE23BE: sigfpe_handler (in /usr/X11R6/lib/modules/dri/mach64_dri.so)
==1239==
==1239== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 36 from 1)


I think the first error (the ioctl() problem) is most immediately likely to be at fault.

But it might also be a good idea to build a copy of viz (at least) and preferably the other C++ parts of the system with GCC-3.4.x.
ID: 5573 · Report as offensive     Reply Quote
old_user26469

Send message
Joined: 23 Oct 04
Posts: 13
Credit: 70,493
RAC: 0
Message 5579 - Posted: 23 Oct 2004, 14:08:57 UTC

Obviously the solution is

% LD_LIBRARY_PATH=. ./hadsm3viz_4.04_i686-pc-linux-gnu

i.e., use the copies of libGLU and libglut that ship with climateprediction.net (and which I hadn't noticed were there.)

Everything then works. (Sorry for the noise.)
ID: 5579 · Report as offensive     Reply Quote

Questions and Answers : Unix/Linux : viz 4.04 segfault immediately after mapping window

©2024 cpdn.org