This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

SIGSEGV in scm_gc_mark ()


Hi List,

We are struggeling with a weird bug in LilyPond/Guile that seems
to occur only on (Linux)-powerpc.  It seems that a cell goes corrupt,
which is then found during a mark/sweep pass.  The same bug has been
present in the last fifteen patch levels of LilyPond.  In one particular 
version (pl 39), I'm getting the 'rogue pointer in heap' error.
There were quite some changes to Lily's code, both C++ and embedded Scheme.

One other oddity; I've never encountered flawed output or other signs
of corruption.  By default, all LilyPond output is generated through the 
evaluation of scheme objects; one by one, during runtime.  But, Lily 
has the option not to evaluate these objects, and write them to a 
script instead.  When choosing this alternative output option, the
resulting scripts run fine, and produce the correct output.

Any ideas of how to tackle this bug?

Thanks,

Jan.

* I'm using guile-1.3, but I get similar results with a recent copy from
  CVS (June 18). 

* uname -a
  Linux appel 2.1.121 #1 Mon Sep 21 15:29:34 EST 1998 ppc unknown

* egcs -v
  Reading specs from /opt/egcs/lib/gcc-lib/powerpc-unknown-linux-gnulibc1/egcs-2.91.57/specs
  gcc version egcs-2.91.57 19980901 (egcs-1.1 release)

* LilyPond (49.uu1) has been 'purified' -- no serious bugs, no changes

* Also similar results when running the less flaky glibc-2.1-based 
  debian potato unstable.

(gdb) r a
GNU LilyPond 1.1.49.uu1
[/home/fred/usr/src/lilypond/scm/lily.scm]
Parsing...[/home/fred/usr/src/lilypond/ly/init.fly[/home/fred/usr/src/lilypond/ly/declarations.ly[/home/fred/usr/src/lilypond/ly/nederlands.ly][/home/fred/usr/src/lilypond/ly/chord-modifiers.ly][/home/fred/usr/src/lilypond/ly/script.ly[/home/fred/usr/src/lilypond/scm/script.scm]][/home/fred/usr/src/lilypond/ly/paper20.ly[/home/fred/usr/src/lilypond/ly/params.ly[/home/fred/usr/src/lilypond/ly/a4.ly][/home/fred/usr/src/lilypond/ly/paper.ly][/home/fred/usr/src/lilypond/ly/engraver.ly[/home/fred/usr/src/lilypond/ly/auto-beam-settings.ly]]]][/home/fred/usr/src/lilypond/ly/midi.ly[/home/fred/usr/src/lilypond/ly/performer.ly]][/home/fred/usr/src/lilypond/ly/dynamic.ly][/home/fred/usr/src/lilypond/ly/property.ly]][a.fly]]
Interpreting music...[1]
time: 0.03 seconds
Preprocessing elements... [feta20.afm]
Calculating column positions... [2]
approximated 1 line (of 3 columns)
elapsed time 0.00 seconds
Paper output to a.tex...

Line ... [0
Program received signal SIGSEGV, Segmentation fault.
0x30091754 in scm_gc_mark (p=809887552) at gc.c:805
805           scm_gc_mark (SCM_SYMBOL_FUNC (ptr));
Current language:  auto; currently c
(gdb) print ptr
$1 = 809887552
(gdb) bt
#0  0x30091754 in scm_gc_mark (p=809887552) at gc.c:805
#1  0x30090f0c in scm_gc_mark (p=810465032) at gc.c:598
#2  0x30090f0c in scm_gc_mark (p=810173096) at gc.c:598
#3  0x30090f0c in scm_gc_mark (p=810350552) at gc.c:598
#4  0x300912ac in scm_gc_mark (p=809922992) at gc.c:687
#5  0x3009108c in scm_gc_mark (p=809922832) at gc.c:642
#6  0x30091da4 in scm_mark_locations (x=0x7fffdf1c, n=1315) at gc.c:923
#7  0x30090d44 in scm_igc (what=0x30133184 "cells") at gc.c:527
#8  0x30090aa0 in scm_gc_for_alloc (ncells=1, freelistp=0x1a65b98) at gc.c:414
#9  0x30090b84 in scm_gc_for_newcell () at gc.c:427
#10 0x300b2884 in scm_cons (x=809866544, y=10612) at pairs.c:58
#11 0x3007fcc8 in scm_closure (code=809866544, env=809736664) at eval.c:3160
#12 0x30083080 in scm_deval (x=809866552, env=809736664) at eval.c:1848
#13 0x3007758c in scm_eval_car (pair=809866560, env=809736664) at eval.c:429
#14 0x300832b4 in scm_deval (x=809866560, env=809736664) at eval.c:1885
#15 0x300819f8 in scm_deval (x=809848504, env=809736664) at eval.c:1668
#16 0x30086ee4 in scm_dapply (proc=809835632, arg1=10612, args=809740664)
    at eval.c:2971
#17 0x3007e7b8 in scm_apply (proc=809922784, arg1=809864064, args=809747304)
    at eval.c:2793
#18 0x300dc1bc in scm_sym2vcell (sym=809864064, thunk=809922784, definep=8564)
    at symbols.c:110
#19 0x30077268 in scm_lookupcar1 (vloc=809750408, genv=809750416) at eval.c:327
#20 0x30083c60 in scm_deval (x=809750408, env=809750416) at eval.c:2053
#21 0x300808b4 in scm_eval_3 (obj=809750408, copyp=1, env=809750416)
    at eval.c:3381
#22 0x300809fc in scm_eval (obj=809750720) at eval.c:3411
#23 0x18bc6dc in Paper_outputter::output_scheme (this=0x1a90910, scm=809750720)
    at paper-outputter.cc:182
#24 0x18bc1e0 in Paper_outputter::output_molecule (this=0x1a90910, 
    m=0x1a8bff8, o={coordinate_a_ = {254.84547935606412, -105.25}}, 
    nm=0x1a0d1e1 "Note_head") at paper-outputter.cc:128
#25 0x18d687c in Score_element::output_processing (this=0x1a91e00)
    at score-element.cc:223
#26 0x18d6694 in Score_element::calculate_dependencies (this=0x1a91e00, 
    final=12, busy=11, funcptr={__delta = 0, __index = 4, __pfn_or_delta2 = {
        __pfn = invalid pointer to member function
) at score-element.cc:204
(gdb) l
800
801         case scm_tc7_msymbol:
802           if (SCM_GC8MARKP(ptr))
803             break;
804           SCM_SETGC8MARK (ptr);
805           scm_gc_mark (SCM_SYMBOL_FUNC (ptr));
806           ptr = SCM_SYMBOL_PROPS (ptr);
807           goto gc_mark_loop;
808         case scm_tc7_ssymbol:
809           if (SCM_GC8MARKP(ptr))


Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien/      | http://www.lilypond.org/



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]