Re: Problem in Thread.c

"Sébastien Adam" <[email protected]> Tue, 18 Apr 2006 11:30:23 +0000
Newsgroups gmane.comp.java.vm.sablevm.devel
Message-ID <[email protected]>
--===============0287351918==
Content-Type: multipart/alternative; 
	boundary="----=_Part_26918_8107470.1145359823699"

------=_Part_26918_8107470.1145359823699
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

For now, its a research work. I have implemented some garbage collectors bu=
t
I need to do some tests before publishing them. This summer I will write my
master thesis and I will publish both my thesis and my GCs.

So, you need to be patient a little bit :)  I will happily share my work...
very soon!

Seb

On 4/18/06, Carl Lebsack <[email protected]> wrote:
>
> So you didn't try the gencopy option?  I believe it should be
> functional.  I periodically have been working on enhancements but
> haven't had a lot of time lately.  I'd be interested in the
> differences you are implementing.  The large object threshold I chose
> was 2kB, but is easily alterable.
>
> I have been considering modifying my implementation to include an
> Appel style generational collector.  You mentioned you are doing
> things "differently".  Are you at liberty to share what you mean, or
> is this research work?
>
> Carl Lebsack
>
> On 4/17/06, S=E9bastien Adam <[email protected]> wrote:
> > > ./configure --with-gc=3Dgencopy
> >
> > ./configure --with-gc=3Dgc
> >
> >
> > > You shouldn't need to "trace" anything in the older generation if the
> > write barrier is set up correctly.  A correct write barrier is
> > necessary regardless of where large objects are initially allocated.
> > The remembered set needs to be updated with any potential
> > intergenerational references.  When a large object is first allocated,
> > none of its fields will have valid references (all zero/NULL).  They
> > will only be updated through later mutator actions that should be
> > caught by a write barrier.
> >
> > Right... my mistake... I need to take a break to think about that
> problem...
> > for now... I don't have time... But if you have some hints... don't
> hesitate
> > to let me know...
> >
> > Actually, you can see a big difference in the gc time when you allocate
> the
> > large object in the oldest generation.  With SableCC 2.18, many big
> objects
> > die young. If these objects are allocated in the oldest generation, the=
y
> are
> > collected only when a full gc happens.  This increase significantly the
> gc
> > time. Maybe I can increase the threshold between large and small object=
s
> > (1024 -> 8096 or even more). But the problem happens when the threshold
> is
> > 1024 bytes.
> >
> >
> >
> >
> >
> >
> >
> > On 4/17/06, Carl Lebsack <[email protected]> wrote:
> > > On 4/17/06, S=E9bastien Adam <[email protected]> wrote:
> > > > > I am curious.  What type of generational collector are you
> writing?
> > > > Have you looked at the one included with SableVM currently?  If so,
> > > > what are the major differences?
> > > >
> > > > Yes... I have looked at the one included with SableVM but it doesn'=
t
> > work. I
> > > > build my generational gc from scrash. It is quite different from th=
e
> > other.
> > > > The write barrier is not the same, the algorithm to select the
> > collection
> > > > (minor, major, full) is not the same... In fact, pratically
> everything
> > is
> > > > different.
> > > >
> > > > I am writing a report.  Maybe I will publish it as soon as possible=
.
> > > >
> > > >
> > >
> > > ./configure --with-gc=3Dgencopy
> > >
> > > This doesn't work?  How so?  I built the SDK just last week and ran i=
t
> > > on several benchmarks.  What problem do you see, and do you have a
> > > test case that produces a problem?
> > >
> > > > > If putting your larger objects into the nursery fixed your
> problem, it
> > > > sounds like you may have a write barrier leak.  What large object
> > > > threshold size were you using?  Sounds like the problem goes away
> > > > because of recursive tracing of the fields when placed in the
> nursery.
> > > > If large objects are allocated directly in the old generation, then
> > > > updates to their fields need to be tracked by a write barrier.
> > > >
> > > > No... I don't recursively trace the heap but I trace the fields of
> the
> > moved
> > > > object. I use a modified write barrier to update these fields.
> > > >
> > > > Actually, I have found the problem.  My large object fields may
> > reference
> > > > the younger generations and these references are not in the
> remembered
> > set.
> > > > Since the oldest generation is never traced (we use the remembered
> set),
> > > > some objects die prematuraly.
> > >
> > > This is what I meant.  If the objects are allocated in the nursery
> > > they will get traced.
> > >
> > > >
> > > > I must trace the fields of my large objects when I allocate them in
> the
> > > > oldest generation (only when the first gc after the creation
> happens). I
> > > > don't do that by now... there is the problem.
> > >
> > > You shouldn't need to "trace" anything in the older generation if the
> > > write barrier is set up correctly.  A correct write barrier is
> > > necessary regardless of where large objects are initially allocated.
> > > The remembered set needs to be updated with any potential
> > > intergenerational references.  When a large object is first allocated=
,
> > > none of its fields will have valid references (all zero/NULL).  They
> > > will only be updated through later mutator actions that should be
> > > caught by a write barrier.
> > >
> > > Carl Lebsack
> > >
> > > >
> > > >
> > > > > You change may not have actually fixed the problem, but simply
> hidden
> > it
> > > > in your current test case.
> > > >
> > > > I know... but for now... I have a report and some results to
> produce...
> > I
> > > > will fix the problem this week...
> > > >
> > > > Thanks for your help...
> > > >
> > > > Seb
> > > >
> > > >
> > > > On 4/17/06, Carl Lebsack <[email protected]> wrote:
> > > > > I am curious.  What type of generational collector are you
> writing?
> > > > > Have you looked at the one included with SableVM currently?  If
> so,
> > > > > what are the major differences?
> > > > >
> > > > > If putting your larger objects into the nursery fixed your
> problem, it
> > > > > sounds like you may have a write barrier leak.  What large object
> > > > > threshold size were you using?  Sounds like the problem goes away
> > > > > because of recursive tracing of the fields when placed in the
> nursery.
> > > > > If large objects are allocated directly in the old generation,
> then
> > > > > updates to their fields need to be tracked by a write
> barrier.  You
> > > > > change may not have actually fixed the problem, but simply hidden
> it
> > > > > in your current test case.
> > > > >
> > > > > Carl Lebsack
> > > > >
> > > > > On 4/17/06, S=E9bastien Adam < [email protected]> wrote:
> > > > > > > This doesn't imply the bug is in SableVM.
> > > > > >
> > > > > > I agree with you... It's why I said "maybe".
> > > > > >
> > > > > >
> > > > > > > If a single reference isn't updated correctly, or a reference
> is
> > > > updated
> > > > > > incorrectly the VM can crash.
> > > > > >
> > > > > > Right.... I met this problem a couple days ago.
> > > > > >
> > > > > >
> > > > > > > Changing the heap size would allow some runs to complete
> > successfully
> > > > > > while others would crash.
> > > > > >
> > > > > > I allocated the larger objects in the oldest generation. I thin=
k
> > this is
> > > > the
> > > > > > source of the problem. Since I allocate these objects in the
> > nursery,
> > > > > > everything works perfectly... and for all heap size...
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On 4/17/06, Carl Lebsack <[email protected]> wrote:
> > > > > > > This doesn't imply the bug is in SableVM.  Garbage collectors
> are
> > > > > > > extremely sensitive to correctness.  If a single reference
> isn't
> > > > > > > updated correctly, or a reference is updated incorrectly the
> VM
> > can
> > > > > > > crash.  However, the crash (segfault etc.) does not have to
> appear
> > at
> > > > > > > the source of the problem, but at some point after the
> problem.
> > The
> > > > > > > fact that changing the heap size has an effect probably means
> > there is
> > > > > > > still an issue with garbage collection and the GC trigger
> point is
> > > > > > > what causes the variation.  This is a guess based on my own
> > experience
> > > > > > > writing a generational collector for SableVM.  Missing a
> single
> > write
> > > > > > > barrier location caused a host of bizarre problems to manifes=
t
> in
> > > > > > > various parts of the VM.  Changing the heap size would allow
> some
> > runs
> > > > > > > to complete successfully while others would crash.
> > > > > > >
> > > > > > > Good luck.
> > > > > > >
> > > > > > > Carl Lebsack
> > > > > > >
> > > > > > > On 4/16/06, S=E9bastien Adam <[email protected]> wrote=
:
> > > > > > > > Finally, maybe the bug is in sablevm. When I set my heap
> size
> > with
> > > > the
> > > > > > > > following value:
> > > > > > > >
> > > > > > > > #define SVM_DEFAULT_GENERATION_SIZE SVM_DEFAULT_FRAME_SIZE =
*
> > 1536
> > > > > > > >
> > > > > > > > Everything works perfectly...
> > > > > > > >
> > > > > > > > So, depending of the heap size sablevm will produce the goo=
d
> > result
> > > > or
> > > > > > > > not...
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On 4/16/06, Etienne Gagnon < [email protected] > wrote:
> > > > > > > > >
> > > > > > > > Actually, the bug is possibly in sablevm...  Look at:
> > > > > > > > http://sablevm.org/bugs/172
> > > > > > > >
> > > > > > > > Also, note that you should be able to change such value
> using a
> > > > runtime
> > > > > > > > system property, like
> > > > > > > >
> > > > > > > > sablevm --preperty=3D sablevm.heap.increment=3D1024
> > > > > > > > or
> > > > > > > > sablevm
> > > > > > --preperty=3Dsablevm.heap.default.generation.size=3D...
> > > > > > > >
> > > > > > > > look in vm_args.m4.c
> > > > > > > >
> > > > > > > > Etienne
> > > > > > > >
> > > > > > > > S=E9bastien Adam wrote:
> > > > > > > > > Last news...
> > > > > > > > >
> > > > > > > > > When I change the heap size... for example:
> > > > > > > > >
> > > > > > > > > In gc_gencopy.c,
> > > > > > > > >
> > > > > > > > > we replace:
> > > > > > > > > #define SVM_DEFAULT_GENERATION_SIZE SVM_DEFAULT_FRAME_SIZ=
E
> *
> > 1024
> > > > > > > > > with:
> > > > > > > > > #define SVM_DEFAULT_GENERATION_SIZE SVM_DEFAULT_FRAME_SIZ=
E
> *
> > 512
> > > > > > > > >
> > > > > > > > > I got the following error:
> > > > > > > > > sablevm: gc_gencopy.c:455: _svmf_copy_object: Assertion
> > `((void *)
> > > > > > > > > obj->lockword) >=3D heap->to_generation-> space.start &&
> ((void
> > *)
> > > > > > > > > obj->lockword) < heap->to_generation-> alloc.start'
> failed.
> > > > > > > > >
> > > > > > > > > hummmm... this is really bad... It seems to be a problem
> in my
> > gc
> > > > :(
> > > > > > > >
> > > > > > > > --
> > > > > > > > Etienne M. Gagnon, Ph.D.
> > > > > > > > http://www.info2.uqam.ca/~egagnon/
> > > > > > > > SableVM:
> > > > > > > > http://www.sablevm.org/
> > > > > > > > SableCC:
> > > > > > > > http://www.sablecc.org/
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > _______________________________________________
> > > > > > > >
> > > > > > > > SableVM-devel mailing list
> > > > > > > > [email protected]
> > > > > > > >
> > > > http://sablevm.org/lists/control/listinfo/sablevm-devel
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > _______________________________________________
> > > > > > > > SableVM-devel mailing list
> > > > > > > > [email protected]
> > > > > > > >
> > > > http://sablevm.org/lists/control/listinfo/sablevm-devel
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > > SableVM-devel mailing list
> > > > > > > [email protected]
> > > > > > >
> > > > http://sablevm.org/lists/control/listinfo/sablevm-devel
> > > > > > >
> > > > > >
> > > > > >
> > > > > > _______________________________________________
> > > > > > SableVM-devel mailing list
> > > > > > [email protected]
> > > > > >
> > http://sablevm.org/lists/control/listinfo/sablevm-devel
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > > _______________________________________________
> > > > > SableVM-devel mailing list
> > > > > [email protected]
> > > > >
> > http://sablevm.org/lists/control/listinfo/sablevm-devel
> > > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > SableVM-devel mailing list
> > > > [email protected]
> > > > http://sablevm.org/lists/control/listinfo/sablevm-devel
> > > >
> > > >
> > > >
> > >
> > > _______________________________________________
> > > SableVM-devel mailing list
> > > [email protected]
> > > http://sablevm.org/lists/control/listinfo/sablevm-devel
> > >
> >
> >
> > _______________________________________________
> > SableVM-devel mailing list
> > [email protected]
> > http://sablevm.org/lists/control/listinfo/sablevm-devel
> >
> >
> >
>
> _______________________________________________
> SableVM-devel mailing list
> [email protected]
> http://sablevm.org/lists/control/listinfo/sablevm-devel
>

------=_Part_26918_8107470.1145359823699
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

For now, its a research work. I have implemented some garbage
collectors but I need to do some tests before publishing them. This
summer I will write my master thesis and I will publish both my thesis
and my GCs.<br>
<br>
So, you need to be patient a little bit :)&nbsp; I will happily share my wo=
rk... very soon!<br>
<br>
Seb<br><br><div><span class=3D"gmail_quote">On 4/18/06, <b class=3D"gmail_s=
endername">Carl Lebsack</b> &lt;<a href=3D"mailto:[email protected]">lebs=
[email protected]</a>&gt; wrote:</span><blockquote class=3D"gmail_quote" styl=
e=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; =
padding-left: 1ex;">
So you didn't try the gencopy option?&nbsp;&nbsp;I believe it should be<br>=
functional.&nbsp;&nbsp;I periodically have been working on enhancements but=
<br>haven't had a lot of time lately.&nbsp;&nbsp;I'd be interested in the<b=
r>differences you are implementing.&nbsp;&nbsp;The large object threshold I=
 chose
<br>was 2kB, but is easily alterable.<br><br>I have been considering modify=
ing my implementation to include an<br>Appel style generational collector.&=
nbsp;&nbsp;You mentioned you are doing<br>things &quot;differently&quot;.&n=
bsp;&nbsp;Are you at liberty to share what you mean, or
<br>is this research work?<br><br>Carl Lebsack<br><br>On 4/17/06, S=E9basti=
en Adam &lt;<a href=3D"mailto:[email protected]">sebastien.adam@gmai=
l.com</a>&gt; wrote:<br>&gt; &gt; ./configure --with-gc=3Dgencopy<br>&gt;<b=
r>
&gt; ./configure --with-gc=3Dgc<br>&gt;<br>&gt;<br>&gt; &gt; You shouldn't =
need to &quot;trace&quot; anything in the older generation if the<br>&gt; w=
rite barrier is set up correctly.&nbsp;&nbsp;A correct write barrier is<br>=
&gt; necessary regardless of where large objects are initially allocated.
<br>&gt; The remembered set needs to be updated with any potential<br>&gt; =
intergenerational references.&nbsp;&nbsp;When a large object is first alloc=
ated,<br>&gt; none of its fields will have valid references (all zero/NULL)=
.&nbsp;&nbsp;They
<br>&gt; will only be updated through later mutator actions that should be<=
br>&gt; caught by a write barrier.<br>&gt;<br>&gt; Right... my mistake... I=
 need to take a break to think about that problem...<br>&gt; for now... I d=
on't have time... But if you have some hints... don't hesitate
<br>&gt; to let me know...<br>&gt;<br>&gt; Actually, you can see a big diff=
erence in the gc time when you allocate the<br>&gt; large object in the old=
est generation.&nbsp;&nbsp;With SableCC 2.18, many big objects<br>&gt; die =
young. If these objects are allocated in the oldest generation, they are
<br>&gt; collected only when a full gc happens.&nbsp;&nbsp;This increase si=
gnificantly the gc<br>&gt; time. Maybe I can increase the threshold between=
 large and small objects<br>&gt; (1024 -&gt; 8096 or even more). But the pr=
oblem happens when the threshold is
<br>&gt; 1024 bytes.<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt=
;<br>&gt; On 4/17/06, Carl Lebsack &lt;<a href=3D"mailto:[email protected]=
u">[email protected]</a>&gt; wrote:<br>&gt; &gt; On 4/17/06, S=E9bastien =
Adam &lt;
<a href=3D"mailto:[email protected]">[email protected]</a>&gt=
; wrote:<br>&gt; &gt; &gt; &gt; I am curious.&nbsp;&nbsp;What type of gener=
ational collector are you writing?<br>&gt; &gt; &gt; Have you looked at the=
 one included with SableVM currently?&nbsp;&nbsp;If so,
<br>&gt; &gt; &gt; what are the major differences?<br>&gt; &gt; &gt;<br>&gt=
; &gt; &gt; Yes... I have looked at the one included with SableVM but it do=
esn't<br>&gt; work. I<br>&gt; &gt; &gt; build my generational gc from scras=
h. It is quite different from the
<br>&gt; other.<br>&gt; &gt; &gt; The write barrier is not the same, the al=
gorithm to select the<br>&gt; collection<br>&gt; &gt; &gt; (minor, major, f=
ull) is not the same... In fact, pratically everything<br>&gt; is<br>&gt; &=
gt; &gt; different.
<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; I am writing a report.&nbsp;&nbsp;Mayb=
e I will publish it as soon as possible.<br>&gt; &gt; &gt;<br>&gt; &gt; &gt=
;<br>&gt; &gt;<br>&gt; &gt; ./configure --with-gc=3Dgencopy<br>&gt; &gt;<br=
>&gt; &gt; This doesn't work?&nbsp;&nbsp;How so?&nbsp;&nbsp;I built the SDK=
 just last week and ran it
<br>&gt; &gt; on several benchmarks.&nbsp;&nbsp;What problem do you see, an=
d do you have a<br>&gt; &gt; test case that produces a problem?<br>&gt; &gt=
;<br>&gt; &gt; &gt; &gt; If putting your larger objects into the nursery fi=
xed your problem, it
<br>&gt; &gt; &gt; sounds like you may have a write barrier leak.&nbsp;&nbs=
p;What large object<br>&gt; &gt; &gt; threshold size were you using?&nbsp;&=
nbsp;Sounds like the problem goes away<br>&gt; &gt; &gt; because of recursi=
ve tracing of the fields when placed in the nursery.
<br>&gt; &gt; &gt; If large objects are allocated directly in the old gener=
ation, then<br>&gt; &gt; &gt; updates to their fields need to be tracked by=
 a write barrier.<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; No... I don't recursi=
vely trace the heap but I trace the fields of the
<br>&gt; moved<br>&gt; &gt; &gt; object. I use a modified write barrier to =
update these fields.<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Actually, I have f=
ound the problem.&nbsp;&nbsp;My large object fields may<br>&gt; reference<b=
r>&gt; &gt; &gt; the younger generations and these references are not in th=
e remembered
<br>&gt; set.<br>&gt; &gt; &gt; Since the oldest generation is never traced=
 (we use the remembered set),<br>&gt; &gt; &gt; some objects die prematural=
y.<br>&gt; &gt;<br>&gt; &gt; This is what I meant.&nbsp;&nbsp;If the object=
s are allocated in the nursery
<br>&gt; &gt; they will get traced.<br>&gt; &gt;<br>&gt; &gt; &gt;<br>&gt; =
&gt; &gt; I must trace the fields of my large objects when I allocate them =
in the<br>&gt; &gt; &gt; oldest generation (only when the first gc after th=
e creation happens). I
<br>&gt; &gt; &gt; don't do that by now... there is the problem.<br>&gt; &g=
t;<br>&gt; &gt; You shouldn't need to &quot;trace&quot; anything in the old=
er generation if the<br>&gt; &gt; write barrier is set up correctly.&nbsp;&=
nbsp;A correct write barrier is
<br>&gt; &gt; necessary regardless of where large objects are initially all=
ocated.<br>&gt; &gt; The remembered set needs to be updated with any potent=
ial<br>&gt; &gt; intergenerational references.&nbsp;&nbsp;When a large obje=
ct is first allocated,
<br>&gt; &gt; none of its fields will have valid references (all zero/NULL)=
.&nbsp;&nbsp;They<br>&gt; &gt; will only be updated through later mutator a=
ctions that should be<br>&gt; &gt; caught by a write barrier.<br>&gt; &gt;<=
br>&gt; &gt; Carl Lebsack
<br>&gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; Yo=
u change may not have actually fixed the problem, but simply hidden<br>&gt;=
 it<br>&gt; &gt; &gt; in your current test case.<br>&gt; &gt; &gt;<br>&gt; =
&gt; &gt; I know... but for now... I have a report and some results to prod=
uce...
<br>&gt; I<br>&gt; &gt; &gt; will fix the problem this week...<br>&gt; &gt;=
 &gt;<br>&gt; &gt; &gt; Thanks for your help...<br>&gt; &gt; &gt;<br>&gt; &=
gt; &gt; Seb<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; On 4/17/=
06, Carl Lebsack &lt;
<a href=3D"mailto:[email protected]">[email protected]</a>&gt; wrote:<b=
r>&gt; &gt; &gt; &gt; I am curious.&nbsp;&nbsp;What type of generational co=
llector are you writing?<br>&gt; &gt; &gt; &gt; Have you looked at the one =
included with SableVM currently?&nbsp;&nbsp;If so,
<br>&gt; &gt; &gt; &gt; what are the major differences?<br>&gt; &gt; &gt; &=
gt;<br>&gt; &gt; &gt; &gt; If putting your larger objects into the nursery =
fixed your problem, it<br>&gt; &gt; &gt; &gt; sounds like you may have a wr=
ite barrier leak.&nbsp;&nbsp;What large object
<br>&gt; &gt; &gt; &gt; threshold size were you using?&nbsp;&nbsp;Sounds li=
ke the problem goes away<br>&gt; &gt; &gt; &gt; because of recursive tracin=
g of the fields when placed in the nursery.<br>&gt; &gt; &gt; &gt; If large=
 objects are allocated directly in the old generation, then
<br>&gt; &gt; &gt; &gt; updates to their fields need to be tracked by a wri=
te barrier.&nbsp;&nbsp;You<br>&gt; &gt; &gt; &gt; change may not have actua=
lly fixed the problem, but simply hidden it<br>&gt; &gt; &gt; &gt; in your =
current test case.
<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; Carl Lebsack<br>&gt; &gt; &g=
t; &gt;<br>&gt; &gt; &gt; &gt; On 4/17/06, S=E9bastien Adam &lt; <a href=3D=
"mailto:[email protected]">[email protected]</a>&gt; wrote:<b=
r>
&gt; &gt; &gt; &gt; &gt; &gt; This doesn't imply the bug is in SableVM.<br>=
&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; I agree with you... It=
's why I said &quot;maybe&quot;.<br>&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &=
gt; &gt; &gt;
<br>&gt; &gt; &gt; &gt; &gt; &gt; If a single reference isn't updated corre=
ctly, or a reference is<br>&gt; &gt; &gt; updated<br>&gt; &gt; &gt; &gt; &g=
t; incorrectly the VM can crash.<br>&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &=
gt; &gt; &gt; Right.... I met this problem a couple days ago.
<br>&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; =
&gt; &gt; &gt; Changing the heap size would allow some runs to complete<br>=
&gt; successfully<br>&gt; &gt; &gt; &gt; &gt; while others would crash.
<br>&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; I allocated the la=
rger objects in the oldest generation. I think<br>&gt; this is<br>&gt; &gt;=
 &gt; the<br>&gt; &gt; &gt; &gt; &gt; source of the problem. Since I alloca=
te these objects in the
<br>&gt; nursery,<br>&gt; &gt; &gt; &gt; &gt; everything works perfectly...=
 and for all heap size...<br>&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt=
; &gt;<br>&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt;=
 &gt; &gt; &gt; On 4/17/06, Carl Lebsack &lt;
<a href=3D"mailto:[email protected]">[email protected]</a>&gt; wrote:<b=
r>&gt; &gt; &gt; &gt; &gt; &gt; This doesn't imply the bug is in SableVM.&n=
bsp;&nbsp;Garbage collectors are<br>&gt; &gt; &gt; &gt; &gt; &gt; extremely=
 sensitive to correctness.&nbsp;&nbsp;If a single reference isn't
<br>&gt; &gt; &gt; &gt; &gt; &gt; updated correctly, or a reference is upda=
ted incorrectly the VM<br>&gt; can<br>&gt; &gt; &gt; &gt; &gt; &gt; crash.&=
nbsp;&nbsp;However, the crash (segfault etc.) does not have to appear<br>&g=
t; at<br>
&gt; &gt; &gt; &gt; &gt; &gt; the source of the problem, but at some point =
after the problem.<br>&gt; The<br>&gt; &gt; &gt; &gt; &gt; &gt; fact that c=
hanging the heap size has an effect probably means<br>&gt; there is<br>
&gt; &gt; &gt; &gt; &gt; &gt; still an issue with garbage collection and th=
e GC trigger point is<br>&gt; &gt; &gt; &gt; &gt; &gt; what causes the vari=
ation.&nbsp;&nbsp;This is a guess based on my own<br>&gt; experience<br>&gt=
; &gt; &gt; &gt; &gt; &gt; writing a generational collector for SableVM.&nb=
sp;&nbsp;Missing a single
<br>&gt; write<br>&gt; &gt; &gt; &gt; &gt; &gt; barrier location caused a h=
ost of bizarre problems to manifest in<br>&gt; &gt; &gt; &gt; &gt; &gt; var=
ious parts of the VM.&nbsp;&nbsp;Changing the heap size would allow some<br=
>&gt; runs
<br>&gt; &gt; &gt; &gt; &gt; &gt; to complete successfully while others wou=
ld crash.<br>&gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt;=
 Good luck.<br>&gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &g=
t; Carl Lebsack
<br>&gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt; On 4/16/=
06, S=E9bastien Adam &lt;<a href=3D"mailto:[email protected]">sebast=
[email protected]</a>&gt; wrote:<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; Fin=
ally, maybe the bug is in sablevm. When I set my heap size
<br>&gt; with<br>&gt; &gt; &gt; the<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; f=
ollowing value:<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt=
; &gt; &gt; &gt; #define SVM_DEFAULT_GENERATION_SIZE SVM_DEFAULT_FRAME_SIZE=
 *
<br>&gt; 1536<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; =
&gt; &gt; &gt; Everything works perfectly...<br>&gt; &gt; &gt; &gt; &gt; &g=
t; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; So, depending of the heap siz=
e sablevm will produce the good
<br>&gt; result<br>&gt; &gt; &gt; or<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; =
not...<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &g=
t; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &=
gt; &gt; On 4/16/06, Etienne Gagnon &lt;=20
<a href=3D"mailto:[email protected]">[email protected]</a> &gt; wrote:<=
br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt;=
 &gt; Actually, the bug is possibly in sablevm...&nbsp;&nbsp;Look at:<br>&g=
t; &gt; &gt; &gt; &gt; &gt; &gt;=20
<a href=3D"http://sablevm.org/bugs/172">http://sablevm.org/bugs/172</a><br>=
&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; Al=
so, note that you should be able to change such value using a<br>&gt; &gt; =
&gt; runtime
<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; system property, like<br>&gt; &gt; &=
gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; sablevm --pre=
perty=3D sablevm.heap.increment=3D1024<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt=
; or
<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; sablevm<br>&gt; &gt; &gt; &gt; &gt; =
--preperty=3Dsablevm.heap.default.generation.size=3D...<br>&gt; &gt; &gt; &=
gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; look in vm_args.m4=
.c
<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt=
; Etienne<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt;=
 &gt; &gt; S=E9bastien Adam wrote:<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; &g=
t; Last news...
<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt=
; &gt; &gt; When I change the heap size... for example:<br>&gt; &gt; &gt; &=
gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; In gc_ge=
ncopy.c,
<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt=
; &gt; &gt; we replace:<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; #define =
SVM_DEFAULT_GENERATION_SIZE SVM_DEFAULT_FRAME_SIZE *<br>&gt; 1024<br>&gt; &=
gt; &gt; &gt; &gt; &gt; &gt; &gt; with:
<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; #define SVM_DEFAULT_GENERATION_=
SIZE SVM_DEFAULT_FRAME_SIZE *<br>&gt; 512<br>&gt; &gt; &gt; &gt; &gt; &gt; =
&gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; I got the following er=
ror:
<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; sablevm: gc_gencopy.c:455: _svm=
f_copy_object: Assertion<br>&gt; `((void *)<br>&gt; &gt; &gt; &gt; &gt; &gt=
; &gt; &gt; obj-&gt;lockword) &gt;=3D heap-&gt;to_generation-&gt; space.sta=
rt
 &amp;&amp; ((void<br>&gt; *)<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; ob=
j-&gt;lockword) &lt; heap-&gt;to_generation-&gt; alloc.start' failed.<br>&g=
t; &gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt;=
 &gt; hummmm... this is really bad... It seems to be a problem in my
<br>&gt; gc<br>&gt; &gt; &gt; :(<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>&=
gt; &gt; &gt; &gt; &gt; &gt; &gt; --<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; =
Etienne M. Gagnon, Ph.D.<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; <a href=3D"h=
ttp://www.info2.uqam.ca/~egagnon/">
http://www.info2.uqam.ca/~egagnon/</a><br>&gt; &gt; &gt; &gt; &gt; &gt; &gt=
; SableVM:<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; <a href=3D"http://www.sabl=
evm.org/">http://www.sablevm.org/</a><br>&gt; &gt; &gt; &gt; &gt; &gt; &gt;=
 SableCC:
<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; <a href=3D"http://www.sablecc.org/">=
http://www.sablecc.org/</a><br>&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &=
gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; =
&gt; &gt; &gt; &gt; &gt; &gt; _____________________________________________=
__
<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt=
; SableVM-devel mailing list<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; <a href=
=3D"mailto:[email protected]">[email protected]</a><br>&gt;=
 &gt; &gt; &gt; &gt; &gt; &gt;
<br>&gt; &gt; &gt; <a href=3D"http://sablevm.org/lists/control/listinfo/sab=
levm-devel">http://sablevm.org/lists/control/listinfo/sablevm-devel</a><br>=
&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br=
>
&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br=
>&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt;<b=
r>&gt; &gt; &gt; &gt; &gt; &gt; &gt; ______________________________________=
_________
<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; SableVM-devel mailing list<br>&gt; &=
gt; &gt; &gt; &gt; &gt; &gt; <a href=3D"mailto:[email protected]">S=
[email protected]</a><br>&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; =
&gt; &gt;=20
<a href=3D"http://sablevm.org/lists/control/listinfo/sablevm-devel">http://=
sablevm.org/lists/control/listinfo/sablevm-devel</a><br>&gt; &gt; &gt; &gt;=
 &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt=
; &gt; &gt; &gt;
<br>&gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt; ________=
_______________________________________<br>&gt; &gt; &gt; &gt; &gt; &gt; Sa=
bleVM-devel mailing list<br>&gt; &gt; &gt; &gt; &gt; &gt; <a href=3D"mailto=
:[email protected]">
[email protected]</a><br>&gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt;=
 &gt; <a href=3D"http://sablevm.org/lists/control/listinfo/sablevm-devel">h=
ttp://sablevm.org/lists/control/listinfo/sablevm-devel</a><br>&gt; &gt; &gt=
; &gt; &gt; &gt;
<br>&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; =
&gt; &gt; _______________________________________________<br>&gt; &gt; &gt;=
 &gt; &gt; SableVM-devel mailing list<br>&gt; &gt; &gt; &gt; &gt; <a href=
=3D"mailto:[email protected]">
[email protected]</a><br>&gt; &gt; &gt; &gt; &gt;<br>&gt; <a href=
=3D"http://sablevm.org/lists/control/listinfo/sablevm-devel">http://sablevm=
.org/lists/control/listinfo/sablevm-devel</a><br>&gt; &gt; &gt; &gt; &gt;<b=
r>
&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt;=
<br>&gt; &gt; &gt; &gt; _______________________________________________<br>=
&gt; &gt; &gt; &gt; SableVM-devel mailing list<br>&gt; &gt; &gt; &gt; <a hr=
ef=3D"mailto:[email protected]">
[email protected]</a><br>&gt; &gt; &gt; &gt;<br>&gt; <a href=3D"htt=
p://sablevm.org/lists/control/listinfo/sablevm-devel">http://sablevm.org/li=
sts/control/listinfo/sablevm-devel</a><br>&gt; &gt; &gt; &gt;<br>&gt; &gt; =
&gt;
<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; ______________________________________=
_________<br>&gt; &gt; &gt; SableVM-devel mailing list<br>&gt; &gt; &gt; <a=
 href=3D"mailto:[email protected]">[email protected]</a><br=
>
&gt; &gt; &gt; <a href=3D"http://sablevm.org/lists/control/listinfo/sablevm=
-devel">http://sablevm.org/lists/control/listinfo/sablevm-devel</a><br>&gt;=
 &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt;<br>&gt; &gt; __=
_____________________________________________
<br>&gt; &gt; SableVM-devel mailing list<br>&gt; &gt; <a href=3D"mailto:Sab=
[email protected]">[email protected]</a><br>&gt; &gt; <a href=
=3D"http://sablevm.org/lists/control/listinfo/sablevm-devel">http://sablevm=
.org/lists/control/listinfo/sablevm-devel
</a><br>&gt; &gt;<br>&gt;<br>&gt;<br>&gt; _________________________________=
______________<br>&gt; SableVM-devel mailing list<br>&gt; <a href=3D"mailto=
:[email protected]">[email protected]</a><br>&gt; <a href=
=3D"http://sablevm.org/lists/control/listinfo/sablevm-devel">
http://sablevm.org/lists/control/listinfo/sablevm-devel</a><br>&gt;<br>&gt;=
<br>&gt;<br><br>_______________________________________________<br>SableVM-=
devel mailing list<br><a href=3D"mailto:[email protected]">SableVM-=
[email protected]
</a><br><a href=3D"http://sablevm.org/lists/control/listinfo/sablevm-devel"=
>http://sablevm.org/lists/control/listinfo/sablevm-devel</a><br></blockquot=
e></div><br>

------=_Part_26918_8107470.1145359823699--


--===============0287351918==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
SableVM-devel mailing list
[email protected]
http://sablevm.org/lists/control/listinfo/sablevm-devel

--===============0287351918==--