[Gridflow-dev] segmentation faults with pd-0.39-test6

Claude Heiland-Allen claudiusmaximus at goto10.org
Wed Aug 24 18:02:37 EDT 2005


Mathieu Bouchard wrote:
> On Wed, 24 Aug 2005, Claude Heiland-Allen wrote:
>
> Just --debug-harder is sufficient.

Noted.

>>Pd version 0.39 TEST 6
> 
> I've never tested with that one. I've tried with devel_0_39 and miller's 
> 0.38.4.

I'm going to try the two suggestions in this mail, then try Pd 0.38.4.

> With yesterday's fix it should say something like this in the console:
> 
>   STACK_END old=0xbffffffc; new=0xbffffffc
> 
> If/when those values are really off from that then it can mean one of a 
> few things:
> 
>   (1) you have a stack end misdetection problem
>   (2) Win32 (has a different stack position than OSX+Linux)
>   (3) 64-bit mode (AMD K8 "Opteron")
>   (4) new Linux kernel (or GLIBC) decides to do things differently
>   (666) bad horoscope, full moon, or voodoo
> 
> 
>>(gdb) where
>>#0  0xb7c74cd3 in rb_source_filename () from /usr/lib/libruby18.so.1.8
>>#1  0xb7c75ee6 in rb_gc_mark_frame () from /usr/lib/libruby18.so.1.8
>>#2  0xb7c748e9 in rb_newobj () from /usr/lib/libruby18.so.1.8
>>#3  0xb7c9de20 in rb_node_newnode () from /usr/lib/libruby18.so.1.8
> 
> 
> Yeah, definitely a problem with the collector. Actually you're supposed to 
> see rb_gc () between #2 and #3 but i suppose that gets inlined (?) in 
> rb_newobj().
> 
> You've sent me that line on IRC:
> 
> ClaudiusMinimus matju: STACK_END old=0xbfac3ffc; new=0xbfacfffc
> 
> That looks *super* wrong.
> 
> I'd first try forcing it to 0xbffffffc.


claude at minimus ~/Build/Pd/Gridflow/GFcvs $ ./configure

This is the GridFlow 0.8.0 configurator within Ruby version 1.8.2
[fast] Compile for speed (and not debuggability): enabled
[gcc3] GNU C++ Compiler 3: found
[stl] C++ Standard Template Library: found
[gcc64] GNU C++ in 64-bit mode: missing (runtime error)
[libc_stack_end] Stack end defined by LibC: disabled (by author)
[segv_stack_end] Stack end probed: found
[wild_stack_end] Stack end wild guess: disabled (using segv_stack_end 
instead)
[libruby] Ruby as a dynamic library: found
[librubystatic] Ruby as a static library: disabled (using libruby instead)
[pentium] Pentium-compatible CPU: found
[mmx] MMX-compatible CPU (using NASM): found
[simd] SIMD (MMX/SSE/Altivec) (using GCC): found
[profiler] profiler (speed measurements): enabled
[usb] USB Library: found
[ieee1394] IEEE1394 Libraries for Linux (raw1394/dc1394): disabled (by 
author)
[x11] X11 Display Protocol: found
[x11_shm] X11 acceleration through shared memory: found
[sdl] Simple Directmedia Layer (experimental support): found
[objcpp] GNU/Apple ObjectiveC++ Compiler: missing (where is objc/Object.h ?)
[quartz] Apple Quartz/Cocoa Display: disabled (would need objcpp)
[aalib] Ascii Art Library: found
[jpeg] JPEG Library: found
[png] PNG Library <libpng12/png.h>: found
[videodev] Video4linux Digitizer Driver Interface: found
[mpeg3] HeroineWarrior LibMPEG3 <libmpeg3/libmpeg3.h>: found
[quicktimeapple] Apple's QuickTime: missing (gcc compilation error)
[quicktimehw] HeroineWarrior QuickTime4Linux (or LibQuickTime) (try #1): 
found
[xine] Xine movie decoder: disabled (by author)
[puredata] Miller Puckette's Pure Data: found
generating ./config.make
generating config.h
creating Makefile

delegating to: devices4ruby/extconf.rb
(back)

See ./config.log if you want the details of the configuration tests.
If you are satisfied with that configuration, you may go on,
   and do "make" and then "make install".
If you get stuck, you could contact the author about it,
   but first make sure you read "doc/install.html".

claude at minimus ~/Build/Pd/Gridflow/GFcvs $ cat config.h

#ifndef __CONFIG_H
#define __CONFIG_H
/* this file was auto-generated by gridflow/configure */

#define STARTUP_LIST(PRE) \
PRE startup_mmx();\
PRE startup_mmx_loader();\
PRE startup_usb();\
PRE startup_x11();\
PRE startup_sdl();\
PRE startup_aalib();\
PRE startup_jpeg();\
PRE startup_png();\
PRE startup_videodev();\
PRE startup_mpeg3();\
PRE startup_quicktimehw();
#define HAVE_GCC3
#define HAVE_PENTIUM
#define HAVE_MMX
#define HAVE_SIMD
#define HAVE_TSC_PROFILING
#define HAVE_USB
#define HAVE_X11_SHARED_MEMORY
#define HAVE_PUREDATA
#define RUBY_PREFIX "/usr"
#define PREFIX "/usr/local"
#define PUREDATA_PATH "/usr/local/lib/pd"
/*
#define STACK_END "0xbf9c3ffc"
*/
#define STACK_END "0xbffffffc"
#define CPU "pentium"
#define PD_VERSION_INT 39
#define RUBY_ARCH "i686-linux"

#ifdef LIBMPEG_INCLUDE_HERE
#include <libmpeg3/libmpeg3.h>
#endif

#define RUBY_BINDIR "/usr/bin"
#endif /* __CONFIG_H */

claude at minimus ~/Build/Pd/Gridflow/GFcvs $ uname -a
Linux minimus 2.6.12-gentoo-r9 #4 Mon Aug 22 13:02:37 BST 2005 i686 
Intel(R) Pentium(R) M processor 1.60GHz GenuineIntel GNU/Linux

claude at minimus ~/Build/Pd/Gridflow/GFcvs $ equery which glibc
/usr/portage/sys-libs/glibc/glibc-2.3.5.20050722.ebuild

claude at minimus ~/Build/Pd/Gridflow/GFcvs $ equery which ruby
/usr/portage/dev-lang/ruby/ruby-1.8.3_pre1.ebuild

claude at minimus ~ $ cat .pdrc
-verbose
-stderr
-path /usr/local/lib/pd/extra/
-helppath /usr/local/lib/pd/doc/5.reference/gridflow/
-lib gridflow

claude at minimus ~ $ pd
input channels = 2, output channels = 2
Pd version 0.39 TEST 6
compiled 21:28:05 Aug 22 2005
port 5400
TCL_LIBRARY="/usr/local/lib/pd/tcl/library" 
TK_LIBRARY="/usr/local/lib/pd/tk/lib
rary"  "/usr/local/lib/pd/bin/pd-gui" 5400
Waiting for connection request...
... connected
opened 0 MIDI input device(s) and 0 MIDI output device(s).
input channels = 2, output channels = 2
/dev/dsp (read/write): Device or resource busy
(now will try write-only...)
/dev/dsp (writeonly): Device or resource busy
opened /dev/dsp for reading only

opened audio input device /dev/dsp; got 2 channels
bytes per sample = 2
setting nfrags = 8, fragsize 1024

audiobuffer set to 50 msec
OSS: issuing first ADC 'read' ... ...done.
tried /home/claude/gridflow.pd_linux and failed
tried /usr/local/lib/pd/extra/gridflow.pd_linux and succeeded
setting up Ruby-for-PureData...

STACK_END old=0xbffffffc; new=0xbffffffc
we are using Ruby version 1.8.2
(done)
[gf] This is GridFlow 0.8.1 within Ruby version 1.8.2
[gf] base/main.c was compiled on Aug 24 2005, 22:41:37
pd_gui: pd process exited
Segmentation fault

$ gdb /usr/local/bin/pd core
(gdb) where
#0  0xb7c18cd3 in rb_source_filename () from /usr/lib/libruby18.so.1.8
#1  0xb7c19ee6 in rb_gc_mark_frame () from /usr/lib/libruby18.so.1.8
#2  0xb7c188e9 in rb_newobj () from /usr/lib/libruby18.so.1.8
#3  0xb7c41e20 in rb_node_newnode () from /usr/lib/libruby18.so.1.8
#4  0xb7c427a5 in rb_node_newnode () from /usr/lib/libruby18.so.1.8
#5  0xb7c3d52a in ruby_yyparse () from /usr/lib/libruby18.so.1.8
#6  0xb7c3e2da in ruby_yyparse () from /usr/lib/libruby18.so.1.8
#7  0xb7c5c258 in ruby_init_loadpath () from /usr/lib/libruby18.so.1.8
#8  0xb7c5c517 in rb_load_file () from /usr/lib/libruby18.so.1.8
#9  0xb7c07692 in rb_load () from /usr/lib/libruby18.so.1.8
#10 0xb7c082c5 in rb_require_safe () from /usr/lib/libruby18.so.1.8
#11 0xb7c07cbb in rb_f_require () from /usr/lib/libruby18.so.1.8
#12 0xb7c1278b in rb_throw () from /usr/lib/libruby18.so.1.8
#13 0xb7c04ff5 in rb_with_disable_interrupt () from 
/usr/lib/libruby18.so.1.8
#14 0xb7c058ab in rb_with_disable_interrupt () from 
/usr/lib/libruby18.so.1.8
#15 0xb7c00256 in rb_Array () from /usr/lib/libruby18.so.1.8
#16 0xb7c076ff in rb_load () from /usr/lib/libruby18.so.1.8
#17 0xb7c082c5 in rb_require_safe () from /usr/lib/libruby18.so.1.8
#18 0xb7c07cbb in rb_f_require () from /usr/lib/libruby18.so.1.8
#19 0xb7c1278b in rb_throw () from /usr/lib/libruby18.so.1.8
#20 0xb7c04ff5 in rb_with_disable_interrupt () from 
/usr/lib/libruby18.so.1.8
#21 0xb7c058ab in rb_with_disable_interrupt () from 
/usr/lib/libruby18.so.1.8
#22 0xb7c00256 in rb_Array () from /usr/lib/libruby18.so.1.8
#23 0xb7bff8c1 in rb_Array () from /usr/lib/libruby18.so.1.8
#24 0xb7c0695e in rb_frame_last_func () from /usr/lib/libruby18.so.1.8
#25 0xb7ae79c0 in ?? ()
#26 0xb7ad0694 in ?? ()
#27 0x00000001 in ?? ()
#28 0x00000000 in ?? ()
#29 0xb7c8db6c in ?? () from /usr/lib/libruby18.so.1.8
#30 0x00000004 in ?? ()
#31 0x00000000 in ?? ()
#32 0xb7ad0694 in ?? ()
#33 0xb7ae8d20 in ?? ()
#34 0x00000000 in ?? ()
#35 0x00000000 in ?? ()
#36 0x00000000 in ?? ()
#37 0xb7c8db6c in ?? () from /usr/lib/libruby18.so.1.8
#38 0x00000004 in ?? ()
#39 0x00000000 in ?? ()
#40 0xbff3be18 in ?? ()
#41 0xbff3bcb0 in ?? ()
#42 0xb7c06623 in rb_frame_last_func () from /usr/lib/libruby18.so.1.8
#43 0x00000000 in ?? ()
#44 0xb7d12961 in mallopt () from /lib/libc.so.6
#45 0xb7bfc4a2 in rb_eval_string () from /usr/lib/libruby18.so.1.8
#46 0xb78d74e5 in Init_gridflow () at main.c.fcs:611
#47 0xb7bf59ab in dln_load () from /usr/lib/libruby18.so.1.8
#48 0xb7c08253 in rb_require_safe () from /usr/lib/libruby18.so.1.8
#49 0xb7c07cbb in rb_f_require () from /usr/lib/libruby18.so.1.8
#50 0xb7c1278b in rb_throw () from /usr/lib/libruby18.so.1.8
#51 0xb7c04ff5 in rb_with_disable_interrupt () from 
/usr/lib/libruby18.so.1.8
#52 0xb7c058ab in rb_with_disable_interrupt () from 
/usr/lib/libruby18.so.1.8
#53 0xb7c00256 in rb_Array () from /usr/lib/libruby18.so.1.8
#54 0xb7bff8c1 in rb_Array () from /usr/lib/libruby18.so.1.8
#55 0xb7c0695e in rb_frame_last_func () from /usr/lib/libruby18.so.1.8
#56 0xb7ae79c0 in ?? ()
#57 0xb7ad7aac in ?? ()
#58 0x00000001 in ?? ()
#59 0xb7c8db6c in ?? () from /usr/lib/libruby18.so.1.8
#60 0xb7ae8c94 in ?? ()
#61 0xbff3cf58 in ?? ()
#62 0xbff3cf68 in ?? ()
#63 0xb7ad7aac in ?? ()
#64 0xb7ae8d20 in ?? ()
#65 0x00000000 in ?? ()
#66 0x00000000 in ?? ()
#67 0x00000000 in ?? ()
#68 0xb7c8db6c in ?? () from /usr/lib/libruby18.so.1.8
#69 0x00000004 in ?? ()
#70 0x00000000 in ?? ()
#71 0xbff3d088 in ?? ()
#72 0xbff3cf20 in ?? ()
#73 0xb7c06623 in rb_frame_last_func () from /usr/lib/libruby18.so.1.8
#74 0x00000000 in ?? ()
#75 0x000000c5 in ?? ()
#76 0xb7ae79e8 in ?? ()
#77 0x00000cc9 in ?? ()
#78 0xbff3cf84 in ?? ()
#79 0x00000004 in ?? ()
#80 0xb7f29899 in ?? () from /usr/local/lib/pd/extra/gridflow.pd_linux
#81 0xb7ae8c94 in ?? ()
#82 0xb7ae85c8 in ?? ()
#83 0xb7c8db6c in ?? () from /usr/lib/libruby18.so.1.8
#84 0xb7ae85c8 in ?? ()
#85 0x00000cc9 in ?? ()
#86 0xbff3cfd8 in ?? ()
#87 0xb7d12961 in mallopt () from /lib/libc.so.6
#88 0xb7bfc4a2 in rb_eval_string () from /usr/lib/libruby18.so.1.8
#89 0xb7f268a1 in gridflow_setup () at puredata.c.fcs:757
#90 0x08097562 in sys_load_lib (dirname=0x820bc00 "/home/claude",
     classname=0xbff3d920 "/usr/local/lib/pd/extra/gridflow.pd_linux")
     at s_loader.c:162
#91 0x08092ea2 in glob_initfromgui (dummy=0x81f4fa0, s=0x82009d8, argc=23,
     argv=0x80ee6e8) at s_main.c:218
#92 0x0808c55e in pd_typedmess (x=0x81f4fa0, s=0x0, argc=23, argv=0x80ee6e8)
     at m_class.c:665
#93 0x0808eecf in binbuf_eval (x=0xbff41000, target=0x81f4fa0, argc=0,
     argv=0x0) at m_binbuf.c:574
#94 0x08094c1f in socketreceiver_read (x=0x820b258, fd=4) at s_inter.c:539
#95 0x080943ff in sys_domicrosleep (microsec=-1074524160, pollem=1)
     at s_inter.c:180
#96 0x080952a0 in sys_pollgui () at s_inter.c:822
#97 0x080929fb in m_scheduler () at m_sched.c:466
#98 0x0809871b in main (argc=-1074524160, argv=0xbff41000) at s_entry.c:27

> If it doesn't work, I'd try Ruby 1.9.0. Compile it yourself, with
> ./configure --enable-shared. You may first remove any trace of Ruby on
> your system to avoid confusion, or else make sure you always know which
> Ruby is running. NOTE: you then have to reconf+recompile+reinstall GF.

Ok, I will now remove Ruby from my system and install Ruby 1.9.0, then 
try again.


Claude



More information about the Gridflow-dev mailing list