newDelta >0 failed in sqUnixMemory -- Was Re: [Pharo-project] Incompatibility between Pharo and Seasidehosting

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

newDelta >0 failed in sqUnixMemory -- Was Re: [Pharo-project] Incompatibility between Pharo and Seasidehosting

Bruce O'Neel-5
 
Hi,

Um, yes, I know you've discussed this before, but....

I'm not sure it's just a gcc 4.3.2 problem.

I downloaded and poked at the tar file of 3.10-4's source.  I got this from
http://squeakvm.org/unix/.

The error message comes from uxGrowMemoryBy, but, I think it comes from
being called (two frames higher) in incrementalGC.

The code is (from the gnu-interp.c file, though interp.c is the same):

                if (((((usqInt) ((longAt(foo->freeBlock)) & AllButTypeMask))) < (((usqInt) foo->growHeadroom))) && (foo->gcBiasToGrow > 0)) {
                        /* begin biasToGrow */
                        /* begin growObjectMemory: */
                        foo->statGrowMemory += 1;
                        limit = sqGrowMemoryBy(foo->memoryLimit, growSize);
                        if (!(limit == foo->memoryLimit)) {
                                foo->memoryLimit = limit - 24;
                                initializeMemoryFirstFree(foo->freeBlock);
                        }
                        weDidGrow = 1;
                }

So we call sqGrowMemoryBy with growSize which is used to calculate newDelta in uxGrowMemoryBy.  

A search of incrementalGC though shows that growSize, a sqInt is declared it's never set.
It turns out that with my system (Debian Lenny ppc, with gcc 4.3.2) growSize is zeroed.
Maybe that's the 'problem' with gcc 4.3.2?

If I set it to some number, say, 100000, then a print statement just before
sqGrowMemoryBy comes out and squeak grows its memory, and, volia, no crash.

Now, this might just be bypassing the real problem, but, it's unclear to me how
an uninitialized growSize would be a good idea.

This also explains why my previous workaround, using the flag -memory on the command line,
caused the problem to not occur.

cheers

bruce

On Thu, Feb 19, 2009 at 09:18:49AM -0800, John M McIntosh wrote:

> look in the archive and on the vm-dev list I think people agree this  
> is a gcc 4.3 issue.
>
> On 19-Feb-09, at 4:15 AM, Bruce O'Neel wrote:
>
> > Hi,
> >
> > Is it possible this error?
> >
> > sqUnixMemory.c:172: uxGrowMemoryBy: Assertion `newDelta >= 0` failed.
> > Aborted
> >
> > I get this following the procedure below on a Debian Lenny PPC  
> > system with Squeak 3.10-4.
> > Gcc is 4.3.2.  I do not get this on a Ubuntu hardy ppc system with  
> > the same version of squeak.
> > Gcc is slightly older at 4.2.3.
> >
> > I've worked around this, for the moment, by adding -memory 200m to  
> > the squeak
> > command line.
> >
> > I spent some weekend debugging this, but, I didn't find where the  
> > problem it is comes
> > from.
> >
> > cheers
> >
> > bruce
>
> --
> =
> =
> =
> ========================================================================
> John M. McIntosh <[hidden email]>
> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
> =
> =
> =
> ========================================================================
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: newDelta >0 failed in sqUnixMemory -- Was Re: [Pharo-project] Incompatibility between Pharo and Seasidehosting

Bruce O'Neel-5
 
Hi,

I downloaded Ian's image/changes bundle named unix-3.10-4.vmm.tar.gz from http://www.squeakvm.org/unix/
and looked into it a bit.

In ObjectMemory biasToGrow it looks like the problem is

biasToGrow
        | growSize |
        growSize :=  growHeadroom*3/2 - (self sizeOfFree: freeBlock)
        self growObjectMemory: growSize

there are no '.'s after the lines.  Shouldn't it look like:

biasToGrow
        | growSize |
        growSize :=  growHeadroom*3/2 - (self sizeOfFree: freeBlock).
        self growObjectMemory: growSize.

that?

It looks like the slang interpreter/translater must be coughing a bit on what is basically
slight invalid syntax, right?

I guess that next up I have to figure out how to actually run vm maker :-)

cheers

bruce

On Fri, Feb 20, 2009 at 12:32:52PM +0100, Bruce O'Neel wrote:

>  
> Hi,
>
> Um, yes, I know you've discussed this before, but....
>
> I'm not sure it's just a gcc 4.3.2 problem.
>
> I downloaded and poked at the tar file of 3.10-4's source.  I got this from
> http://squeakvm.org/unix/.
>
> The error message comes from uxGrowMemoryBy, but, I think it comes from
> being called (two frames higher) in incrementalGC.
>
> The code is (from the gnu-interp.c file, though interp.c is the same):
>
>                 if (((((usqInt) ((longAt(foo->freeBlock)) & AllButTypeMask))) < (((usqInt) foo->growHeadroom))) && (foo->gcBiasToGrow > 0)) {
>                         /* begin biasToGrow */
>                         /* begin growObjectMemory: */
>                         foo->statGrowMemory += 1;
>                         limit = sqGrowMemoryBy(foo->memoryLimit, growSize);
>                         if (!(limit == foo->memoryLimit)) {
>                                 foo->memoryLimit = limit - 24;
>                                 initializeMemoryFirstFree(foo->freeBlock);
>                         }
>                         weDidGrow = 1;
>                 }
>
> So we call sqGrowMemoryBy with growSize which is used to calculate newDelta in uxGrowMemoryBy.  
>
> A search of incrementalGC though shows that growSize, a sqInt is declared it's never set.
> It turns out that with my system (Debian Lenny ppc, with gcc 4.3.2) growSize is zeroed.
> Maybe that's the 'problem' with gcc 4.3.2?
>
> If I set it to some number, say, 100000, then a print statement just before
> sqGrowMemoryBy comes out and squeak grows its memory, and, volia, no crash.
>
> Now, this might just be bypassing the real problem, but, it's unclear to me how
> an uninitialized growSize would be a good idea.
>
> This also explains why my previous workaround, using the flag -memory on the command line,
> caused the problem to not occur.
>
> cheers
>
> bruce
>
> On Thu, Feb 19, 2009 at 09:18:49AM -0800, John M McIntosh wrote:
> > look in the archive and on the vm-dev list I think people agree this  
> > is a gcc 4.3 issue.
> >
> > On 19-Feb-09, at 4:15 AM, Bruce O'Neel wrote:
> >
> > > Hi,
> > >
> > > Is it possible this error?
> > >
> > > sqUnixMemory.c:172: uxGrowMemoryBy: Assertion `newDelta >= 0` failed.
> > > Aborted
> > >
> > > I get this following the procedure below on a Debian Lenny PPC  
> > > system with Squeak 3.10-4.
> > > Gcc is 4.3.2.  I do not get this on a Ubuntu hardy ppc system with  
> > > the same version of squeak.
> > > Gcc is slightly older at 4.2.3.
> > >
> > > I've worked around this, for the moment, by adding -memory 200m to  
> > > the squeak
> > > command line.
> > >
> > > I spent some weekend debugging this, but, I didn't find where the  
> > > problem it is comes
> > > from.
> > >
> > > cheers
> > >
> > > bruce
> >
> > --
> > =
> > =
> > =
> > ========================================================================
> > John M. McIntosh <[hidden email]>
> > Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
> > =
> > =
> > =
> > ========================================================================
> >
> >
> >
> >
> > _______________________________________________
> > Pharo-project mailing list
> > [hidden email]
> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: newDelta >0 failed in sqUnixMemory -- Was Re: [Pharo-project] Incompatibility between Pharo and Seasidehosting

David T. Lewis
 
On Sun, Feb 22, 2009 at 01:47:40PM +0100, Bruce O'Neel wrote:

>
> I downloaded Ian's image/changes bundle named unix-3.10-4.vmm.tar.gz from http://www.squeakvm.org/unix/
> and looked into it a bit.
>
> In ObjectMemory biasToGrow it looks like the problem is
>
> biasToGrow
> | growSize |
> growSize :=  growHeadroom*3/2 - (self sizeOfFree: freeBlock)
> self growObjectMemory: growSize
>
> there are no '.'s after the lines.  Shouldn't it look like:
>
> biasToGrow
>         | growSize |
>         growSize :=  growHeadroom*3/2 - (self sizeOfFree: freeBlock).
>         self growObjectMemory: growSize.
>
> that?
>
> It looks like the slang interpreter/translater must be coughing a bit on what is basically
> slight invalid syntax, right?

This is http://bugs.squeak.org/view.php?id=6667. The fix was applied to VMMaker-tpr.63.
You are probably using sources generated from VMMaker 3.8b6, which is the same as
VMMaker-tpr.58, so the sources you are using would not have this fix.

If someone can build a VM using more up to date VMMaker and verify that the problem
goes away, that would be good. I suggest using VMMaker-dtl.113 from the VMMaker
project on SqueakSource for this. (Note, there is a more recent VMMaker-eem.114 that
contains Eliot's updates for block closures, but you may have trouble loading it
into some Squeak/Pharo images. The glitch may be sorted out by the time you read
this, if not just stick with VMMaker-dtl.113 or earlier for now.)

>
> I guess that next up I have to figure out how to actually run vm maker :-)
>

Yes :)

Dave
 
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] newDelta >0 failed in sqUnixMemory -- Was Re: Incompatibility between Pharo and Seasidehosting

Bruce O'Neel-5
 
Hi,

Ah, very nice.  Thanks!

cheers

bruce

On Sun, Feb 22, 2009 at 09:16:41AM -0500, David T. Lewis wrote:

> On Sun, Feb 22, 2009 at 01:47:40PM +0100, Bruce O'Neel wrote:
> >
> > I downloaded Ian's image/changes bundle named unix-3.10-4.vmm.tar.gz from http://www.squeakvm.org/unix/
> > and looked into it a bit.
> >
> > In ObjectMemory biasToGrow it looks like the problem is
> >
> > biasToGrow
> > | growSize |
> > growSize :=  growHeadroom*3/2 - (self sizeOfFree: freeBlock)
> > self growObjectMemory: growSize
> >
> > there are no '.'s after the lines.  Shouldn't it look like:
> >
> > biasToGrow
> >         | growSize |
> >         growSize :=  growHeadroom*3/2 - (self sizeOfFree: freeBlock).
> >         self growObjectMemory: growSize.
> >
> > that?
> >
> > It looks like the slang interpreter/translater must be coughing a bit on what is basically
> > slight invalid syntax, right?
>
> This is http://bugs.squeak.org/view.php?id=6667. The fix was applied to VMMaker-tpr.63.
> You are probably using sources generated from VMMaker 3.8b6, which is the same as
> VMMaker-tpr.58, so the sources you are using would not have this fix.
>
> If someone can build a VM using more up to date VMMaker and verify that the problem
> goes away, that would be good. I suggest using VMMaker-dtl.113 from the VMMaker
> project on SqueakSource for this. (Note, there is a more recent VMMaker-eem.114 that
> contains Eliot's updates for block closures, but you may have trouble loading it
> into some Squeak/Pharo images. The glitch may be sorted out by the time you read
> this, if not just stick with VMMaker-dtl.113 or earlier for now.)
>
> >
> > I guess that next up I have to figure out how to actually run vm maker :-)
> >
>
> Yes :)
>
> Dave
>  
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: newDelta >0 failed in sqUnixMemory -- Was Re: [Pharo-project] Incompatibility between Pharo and Seasidehosting

johnmci
In reply to this post by Bruce O'Neel-5
 
Old news.

http://www.nabble.com/An-issue-with-Slang,-the-interpreter---the-VM,-and-a-period-in-biasToGrow.-td8515636.html

Could be other important VMMaker changes between 2007 and today...


On 22-Feb-09, at 4:47 AM, Bruce O'Neel wrote:

> Hi,
>
> I downloaded Ian's image/changes bundle named unix-3.10-4.vmm.tar.gz  
> from http://www.squeakvm.org/unix/
> and looked into it a bit.
>
> In ObjectMemory biasToGrow it looks like the problem is
>
> biasToGrow
> | growSize |
> growSize :=  growHeadroom*3/2 - (self sizeOfFree: freeBlock)
> self growObjectMemory: growSize
>
> there are no '.'s after the lines.  Shouldn't it look like:
>
> biasToGrow
>        | growSize |
>        growSize :=  growHeadroom*3/2 - (self sizeOfFree: freeBlock).
>        self growObjectMemory: growSize.
>
> that?
>
> It looks like the slang interpreter/translater must be coughing a  
> bit on what is basically
> slight invalid syntax, right?
>
> I guess that next up I have to figure out how to actually run vm  
> maker :-)
>
> cheers
>
> bruce

--
=
=
=
========================================================================
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
=
=
=
========================================================================



Reply | Threaded
Open this post in threaded view
|

Re: newDelta >0 failed in sqUnixMemory -- Was Re: [Pharo-project] Incompatibility between Pharo and Seasidehosting

Bruce O'Neel-5
 
Hi,

Yes, thanks.

The problem is that the most recent unix vm has exactly this problem.

cheers

bruce

On Sun, Feb 22, 2009 at 04:33:20PM -0800, John M McIntosh wrote:

> Old news.
>
> http://www.nabble.com/An-issue-with-Slang,-the-interpreter---the-VM,-and-a-period-in-biasToGrow.-td8515636.html
>
> Could be other important VMMaker changes between 2007 and today...
>
>
> On 22-Feb-09, at 4:47 AM, Bruce O'Neel wrote:
>
>> Hi,
>>
>> I downloaded Ian's image/changes bundle named unix-3.10-4.vmm.tar.gz  
>> from http://www.squeakvm.org/unix/
>> and looked into it a bit.
>>
>> In ObjectMemory biasToGrow it looks like the problem is
>>
>> biasToGrow
>> | growSize |
>> growSize :=  growHeadroom*3/2 - (self sizeOfFree: freeBlock)
>> self growObjectMemory: growSize
>>
>> there are no '.'s after the lines.  Shouldn't it look like:
>>
>> biasToGrow
>>        | growSize |
>>        growSize :=  growHeadroom*3/2 - (self sizeOfFree: freeBlock).
>>        self growObjectMemory: growSize.
>>
>> that?
>>
>> It looks like the slang interpreter/translater must be coughing a bit
>> on what is basically
>> slight invalid syntax, right?
>>
>> I guess that next up I have to figure out how to actually run vm maker
>> :-)
>>
>> cheers
>>
>> bruce
>
> --
> ===
> ========================================================================
> John M. McIntosh <[hidden email]>
> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
> ===
> ========================================================================
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] newDelta >0 failed in sqUnixMemory -- Was Re: Incompatibility between Pharo and Seasidehosting

Bruce O'Neel-5
 
Hi,

There seem to be three solutions (in best to worst order).

- someone (Ian maybe) needs to rebuild the Unix VM with a VMMaker
from within the last two years.  Apparently the bug has been fixed for a
while.

- pass a fixed memory size to the VM

-memory 200m

or so does the trick.

- patch the existing C source code.

cheers

bruce

On Tue, Mar 03, 2009 at 09:19:13AM +0100, Tudor Girba wrote:

> Hi,
>
> I am not sure I got the summary of the discussion related to the  
> problem of deploying a Pharo-based image to seasidehosting. Is there  
> any conclusion?
>
> Cheers,
> Doru
>
>
> --
> www.tudorgirba.com
>
> "Problem solving efficiency grows with the abstractness level of  
> problem understanding."
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project