unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Serious GC bug in GUILE 1.6 CVS
@ 2004-08-17 21:27 Han-Wen Nienhuys
  2004-09-07 15:45 ` Marius Vollmer
  0 siblings, 1 reply; 5+ messages in thread
From: Han-Wen Nienhuys @ 2004-08-17 21:27 UTC (permalink / raw)
  Cc: jantien, fodber


Compile GUILE with

  #define SCM_DEBUG_CELL_ACCESSES 1

in config.h.  Then apply this patch

	*** snarf-check-and-output-texi.~1.2.2.8.~	2002-07-20 23:14:53.000000000 +0200
	--- snarf-check-and-output-texi	2004-08-17 23:02:54.246192464 +0200
	***************
	*** 25,30 ****
	--- 25,31 ----
	  ;;; Author: Michael Livshin

	  ;;; Code:
	+ (set-debug-cell-accesses! 5000)

	  (define-module (scripts snarf-check-and-output-texi)
	      :use-module (ice-9 streams)

then compilation bombs out with:


	cat alist.doc [..] | 
	GUILE="/home/hanwen/usr/src/savannah/official-guile/stable/guile/guile-core/pre-inst-guile"
	../scripts/snarf-check-and-output-texi --manual > guile.texi || { rm
	guile.texi; false; } Error in scm_gc_mark during GC: rogue pointer in
	heap make: *** [guile.texi] Fout 1


This is on fedora core3 test1, Linux 2.6.7

-- 

 Han-Wen Nienhuys   |   hanwen@xs4all.nl   |   http://www.xs4all.nl/~hanwen 



_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Serious GC bug in GUILE 1.6 CVS
  2004-08-17 21:27 Serious GC bug in GUILE 1.6 CVS Han-Wen Nienhuys
@ 2004-09-07 15:45 ` Marius Vollmer
  2004-09-08 23:15   ` Han-Wen Nienhuys
  0 siblings, 1 reply; 5+ messages in thread
From: Marius Vollmer @ 2004-09-07 15:45 UTC (permalink / raw)
  Cc: bug-guile, jantien, guile-devel, fodber

Han-Wen Nienhuys <hanwen@xs4all.nl> writes:

> Compile GUILE with
>
>   #define SCM_DEBUG_CELL_ACCESSES 1
>
> in config.h.  Then apply this patch
>
> 	+ (set-debug-cell-accesses! 5000)
>
> then compilation bombs out with:

I have found the bug.  init_heap_seg was using SCM_SET_CELL_TYPE to
initialize fresh memory to 'free cells', but with DEBUG_CELL_ACCESSES,
SCM_SET_CELL_TYPE could run a GC, which might see the half initialized
heap segment during conservative scanning and would access
uninitialozed memory which caused it to fail.

I have fixed this by using the new macro SCM_SET_FREE_CELL_TYPE, which
does no checking.


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Serious GC bug in GUILE 1.6 CVS
  2004-09-07 15:45 ` Marius Vollmer
@ 2004-09-08 23:15   ` Han-Wen Nienhuys
  2004-09-08 23:27     ` Marius Vollmer
  2004-09-09 22:32     ` Neil Jerram
  0 siblings, 2 replies; 5+ messages in thread
From: Han-Wen Nienhuys @ 2004-09-08 23:15 UTC (permalink / raw)
  Cc: bug-guile, jantien, guile-devel, fodber

marius.vollmer@uni-dortmund.de writes:
> Han-Wen Nienhuys <hanwen@xs4all.nl> writes:
> 
> > Compile GUILE with
> >
> >   #define SCM_DEBUG_CELL_ACCESSES 1
> >
> > in config.h.  Then apply this patch
> >
> > 	+ (set-debug-cell-accesses! 5000)
> >
> > then compilation bombs out with:
> 
> I have found the bug.  init_heap_seg was using SCM_SET_CELL_TYPE to
> initialize fresh memory to 'free cells', but with DEBUG_CELL_ACCESSES,
> SCM_SET_CELL_TYPE could run a GC, which might see the half initialized
> heap segment during conservative scanning and would access
> uninitialozed memory which caused it to fail.
> 
> I have fixed this by using the new macro SCM_SET_FREE_CELL_TYPE, which
> does no checking.

Hmm... That's unfortunate. We have reports of GC flakiness with 1.6
on Cygwin. This means that there's still another bug lurking.

-- 

 Han-Wen Nienhuys   |   hanwen@xs4all.nl   |   http://www.xs4all.nl/~hanwen 



_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Serious GC bug in GUILE 1.6 CVS
  2004-09-08 23:15   ` Han-Wen Nienhuys
@ 2004-09-08 23:27     ` Marius Vollmer
  2004-09-09 22:32     ` Neil Jerram
  1 sibling, 0 replies; 5+ messages in thread
From: Marius Vollmer @ 2004-09-08 23:27 UTC (permalink / raw)
  Cc: bug-guile, jantien, guile-devel, fodber

Han-Wen Nienhuys <hanwen@xs4all.nl> writes:

> Hmm... That's unfortunate. We have reports of GC flakiness with 1.6
> on Cygwin. This means that there's still another bug lurking.

Yes, the bug that I just fixed bites only with DEBUG_CELL_ACCESSES.
Your's must be something else.

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Serious GC bug in GUILE 1.6 CVS
  2004-09-08 23:15   ` Han-Wen Nienhuys
  2004-09-08 23:27     ` Marius Vollmer
@ 2004-09-09 22:32     ` Neil Jerram
  1 sibling, 0 replies; 5+ messages in thread
From: Neil Jerram @ 2004-09-09 22:32 UTC (permalink / raw)
  Cc: bug-guile, jantien, fodber, guile-devel, Marius Vollmer

Han-Wen Nienhuys wrote:

> marius.vollmer@uni-dortmund.de writes:
> 
>> I have fixed this by using the new macro SCM_SET_FREE_CELL_TYPE, which
>> does no checking.
> 
> 
> Hmm... That's unfortunate. We have reports of GC flakiness with 1.6
> on Cygwin. This means that there's still another bug lurking.

Have you checked that the build is not accidentally picking up 
libguile/alloca.c.  My 1.6.4/MSVC GC flakiness seems to have disappeared 
when I fixed that.

Regards,
       Neil



_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-09-09 22:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-17 21:27 Serious GC bug in GUILE 1.6 CVS Han-Wen Nienhuys
2004-09-07 15:45 ` Marius Vollmer
2004-09-08 23:15   ` Han-Wen Nienhuys
2004-09-08 23:27     ` Marius Vollmer
2004-09-09 22:32     ` Neil Jerram

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).