Squeak 4.5 Release Candidate 4 (13675)

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

Squeak 4.5 Release Candidate 4 (13675)

Michael-2
Hi,

I am new to squeak and smalltalk, but I noticed the 4.5 release notes
mention a "System space analysis" feature/function.
However when I try it, I consistently crash the virtual machine with a
segmentation fault.

I have tried both on a Raspberry Pi with the latest version of the
virtual machine and on 64 bit Slackware 14.1 with version 4.10.2.2614
from slackbuilds.org. So I assume it is not a VM problem.

The complete output from the command line is:
bash-4.2$ squeak Squeak4.5-13675.image
CHECKING cogvm
which: no cogvm in (/usr/bin:/bin)
CHECKING squeakvm

Segmentation fault

17254592 Behavior>new
Segmentation fault


Michael

tty
Reply | Threaded
Open this post in threaded view
|

Re: Squeak 4.5 Release Candidate 4 (13675)

tty
Hi Michael.

I am running Slackware 14.1 64 bit.

Do you have the 32 bit compat libs installed from Alien-Bob?



---- On Sat, 15 Feb 2014 14:58:29 -0800 Michael<[hidden email]> wrote ----

Hi,

I am new to squeak and smalltalk, but I noticed the 4.5 release notes
mention a "System space analysis" feature/function.
However when I try it, I consistently crash the virtual machine with a
segmentation fault.

I have tried both on a Raspberry Pi with the latest version of the
virtual machine and on 64 bit Slackware 14.1 with version 4.10.2.2614
from slackbuilds.org. So I assume it is not a VM problem.

The complete output from the command line is:
bash-4.2$ squeak Squeak4.5-13675.image
CHECKING cogvm
which: no cogvm in (/usr/bin:/bin)
CHECKING squeakvm

Segmentation fault

17254592 Behavior>new
Segmentation fault


Michael




Reply | Threaded
Open this post in threaded view
|

Re: Squeak 4.5 Release Candidate 4 (13675)

David T. Lewis
In reply to this post by Michael-2
Yikes! Good catch, thank you.

This very likely *is* a VM problem. I can reproduce it with a standard
interpreter VM, and the crash does not happen when I run the same thing
on Cog.

To reproduce:

Help -> About this System, then select "Space Analysis" in the System
Reporter. Result is:

Segmentation fault

17369460 Behavior>new
17369368 Fraction class>numerator:denominator:
17369272 SmallInteger>/
17369180 Number>roundUpTo:
17369088 SpaceTally>spaceForInstancesOf:

Dave


On Sat, Feb 15, 2014 at 11:58:29PM +0100, Michael wrote:

> Hi,
>
> I am new to squeak and smalltalk, but I noticed the 4.5 release notes
> mention a "System space analysis" feature/function.
> However when I try it, I consistently crash the virtual machine with a
> segmentation fault.
>
> I have tried both on a Raspberry Pi with the latest version of the
> virtual machine and on 64 bit Slackware 14.1 with version 4.10.2.2614
> from slackbuilds.org. So I assume it is not a VM problem.
>
> The complete output from the command line is:
> bash-4.2$ squeak Squeak4.5-13675.image
> CHECKING cogvm
> which: no cogvm in (/usr/bin:/bin)
> CHECKING squeakvm
>
> Segmentation fault
>
> 17254592 Behavior>new
> Segmentation fault
>
>
> Michael

Reply | Threaded
Open this post in threaded view
|

SpaceTally>>spaceForInstancesOf: crashes the VM (was: [squeak-dev] Squeak 4.5 Release Candidate 4 (13675))

David T. Lewis
On Sat, Feb 15, 2014 at 08:08:19PM -0500, David T. Lewis wrote:
> Yikes! Good catch, thank you.
>
> This very likely *is* a VM problem. I can reproduce it with a standard
> interpreter VM, and the crash does not happen when I run the same thing
> on Cog.


The problem happens in SpaceTally>>spaceForInstancesOf:

This eventually does "CompiledMethod basicNew" which crashes the VM.

CompiledMethod class>basicNew seems to cause problems with both Cog and
interpreter VM, so I may have been wrong in saying that the issue was
specific to the interpreter VM.

The format of CompiledMethod is special (see its class comment), and it
appears that #basicNew is problematic.

Dave


>
> To reproduce:
>
> Help -> About this System, then select "Space Analysis" in the System
> Reporter. Result is:
>
> Segmentation fault
>
> 17369460 Behavior>new
> 17369368 Fraction class>numerator:denominator:
> 17369272 SmallInteger>/
> 17369180 Number>roundUpTo:
> 17369088 SpaceTally>spaceForInstancesOf:
>
> Dave
>
>
> On Sat, Feb 15, 2014 at 11:58:29PM +0100, Michael wrote:
> > Hi,
> >
> > I am new to squeak and smalltalk, but I noticed the 4.5 release notes
> > mention a "System space analysis" feature/function.
> > However when I try it, I consistently crash the virtual machine with a
> > segmentation fault.
> >
> > I have tried both on a Raspberry Pi with the latest version of the
> > virtual machine and on 64 bit Slackware 14.1 with version 4.10.2.2614
> > from slackbuilds.org. So I assume it is not a VM problem.
> >
> > The complete output from the command line is:
> > bash-4.2$ squeak Squeak4.5-13675.image
> > CHECKING cogvm
> > which: no cogvm in (/usr/bin:/bin)
> > CHECKING squeakvm
> >
> > Segmentation fault
> >
> > 17254592 Behavior>new
> > Segmentation fault
> >
> >
> > Michael

Reply | Threaded
Open this post in threaded view
|

Re: SpaceTally>>spaceForInstancesOf: crashes the VM (was: [squeak-dev] Squeak 4.5 Release Candidate 4 (13675))

timrowledge
Just as a check point, no problem on a #13297 image on a Cog 2776 VM.

Wasn’t there some change discussed a while ago that had something to do with some number class and #new? The 13297 image says
CompiledMethod>basicNew: size

        self error: 'CompiledMethods may only be created with newMethod:header:’

which doesn’t seem like it would cause a problem. On the other hand the smidgeon of stack you quote looks like it might be involving #new on the number class I’m trying to remember...

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Useful random insult:- Immune from any serious head injury.



Reply | Threaded
Open this post in threaded view
|

Re: SpaceTally>>spaceForInstancesOf: crashes the VM (was: [squeak-dev] Squeak 4.5 Release Candidate 4 (13675))

David T. Lewis
On Sat, Feb 15, 2014 at 06:52:18PM -0800, tim Rowledge wrote:
> Just as a check point, no problem on a #13297 image on a Cog 2776 VM.

I ran the space tally on Cog and did not get a crash. But then I tried
CompiledMethod basicNew on Cog, and hung the image. I did not look into
the details beyond that. I'm assuming at this point that CompiledMethod
class>>basicNew is a Bad Thing.

Obviously the VM should not crash, but given that it may do so, I patched
spaceForInstancesOf: to call #new in the case of CompiledMethod.

Dave

>
> Wasn?t there some change discussed a while ago that had something to do with some number class and #new? The 13297 image says
> CompiledMethod>basicNew: size
>
> self error: 'CompiledMethods may only be created with newMethod:header:?
>
> which doesn?t seem like it would cause a problem. On the other hand the smidgeon of stack you quote looks like it might be involving #new on the number class I?m trying to remember...
>
> tim
> --
> tim Rowledge; [hidden email]; http://www.rowledge.org/tim
> Useful random insult:- Immune from any serious head injury.
>
>

Reply | Threaded
Open this post in threaded view
|

Re: SpaceTally>>spaceForInstancesOf: crashes the VM (was: [squeak-dev] Squeak 4.5 Release Candidate 4 (13675))

David T. Lewis
In reply to this post by timrowledge
On Sat, Feb 15, 2014 at 06:52:18PM -0800, tim Rowledge wrote:
>
> Wasn?t there some change discussed a while ago that had something to do with some number class and #new? The 13297 image says
> CompiledMethod>basicNew: size
>
> self error: 'CompiledMethods may only be created with newMethod:header:?

I should think that in addition to #basicNew: that we should also have protection
against callng #basicNew

CompiledMethod>basicNew

        self error: 'CompiledMethods may only be created with newMethod:header:'

Right?

Dave


Reply | Threaded
Open this post in threaded view
|

Re: SpaceTally>>spaceForInstancesOf: crashes the VM (was: [squeak-dev] Squeak 4.5 Release Candidate 4 (13675))

Chris Muller-3
Instead of producing an error, what do you think about what
CompiledMethod class>>#new?

Seems like if #new does that instead of erroring, maybe basicNew
should not error?

I remember needing to relax ContextPart class>>#basicNew: just a bit
so that the code could be more uniform.  Check it out.

Similar situation in this case -- we have a tool that wants to operate
at that level and makes assumption that basicNew should never fail,
which at least seems worthy to consider..

Your call, thanks!

On Sun, Feb 16, 2014 at 7:46 AM, David T. Lewis <[hidden email]> wrote:

> On Sat, Feb 15, 2014 at 06:52:18PM -0800, tim Rowledge wrote:
>>
>> Wasn?t there some change discussed a while ago that had something to do with some number class and #new? The 13297 image says
>> CompiledMethod>basicNew: size
>>
>>       self error: 'CompiledMethods may only be created with newMethod:header:?
>
> I should think that in addition to #basicNew: that we should also have protection
> against callng #basicNew
>
> CompiledMethod>basicNew
>
>         self error: 'CompiledMethods may only be created with newMethod:header:'
>
> Right?
>
> Dave
>
>

Reply | Threaded
Open this post in threaded view
|

Re: SpaceTally>>spaceForInstancesOf: crashes the VM (was: [squeak-dev] Squeak 4.5 Release Candidate 4 (13675))

Eliot Miranda-2
In reply to this post by David T. Lewis



On Sat, Feb 15, 2014 at 6:38 PM, David T. Lewis <[hidden email]> wrote:
On Sat, Feb 15, 2014 at 08:08:19PM -0500, David T. Lewis wrote:
> Yikes! Good catch, thank you.
>
> This very likely *is* a VM problem. I can reproduce it with a standard
> interpreter VM, and the crash does not happen when I run the same thing
> on Cog.


The problem happens in SpaceTally>>spaceForInstancesOf:

This eventually does "CompiledMethod basicNew" which crashes the VM.

That's funny :-).  You can print CompiledMethod basicNew, but woe betide you if you try and inspect it. I think the VM primitives should fail for CompiledMethod.

CompiledMethod class>basicNew seems to cause problems with both Cog and
interpreter VM, so I may have been wrong in saying that the issue was
specific to the interpreter VM.

The format of CompiledMethod is special (see its class comment), and it
appears that #basicNew is problematic.

Dave


>
> To reproduce:
>
> Help -> About this System, then select "Space Analysis" in the System
> Reporter. Result is:
>
> Segmentation fault
>
> 17369460 Behavior>new
> 17369368 Fraction class>numerator:denominator:
> 17369272 SmallInteger>/
> 17369180 Number>roundUpTo:
> 17369088 SpaceTally>spaceForInstancesOf:
>
> Dave
>
>
> On Sat, Feb 15, 2014 at 11:58:29PM +0100, Michael wrote:
> > Hi,
> >
> > I am new to squeak and smalltalk, but I noticed the 4.5 release notes
> > mention a "System space analysis" feature/function.
> > However when I try it, I consistently crash the virtual machine with a
> > segmentation fault.
> >
> > I have tried both on a Raspberry Pi with the latest version of the
> > virtual machine and on 64 bit Slackware 14.1 with version 4.10.2.2614
> > from slackbuilds.org. So I assume it is not a VM problem.
> >
> > The complete output from the command line is:
> > bash-4.2$ squeak Squeak4.5-13675.image
> > CHECKING cogvm
> > which: no cogvm in (/usr/bin:/bin)
> > CHECKING squeakvm
> >
> > Segmentation fault
> >
> > 17254592 Behavior>new
> > Segmentation fault
> >
> >
> > Michael




--
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: SpaceTally>>spaceForInstancesOf: crashes the VM (was: [squeak-dev] Squeak 4.5 Release Candidate 4 (13675))

Eliot Miranda-2



On Mon, Feb 17, 2014 at 10:59 AM, Eliot Miranda <[hidden email]> wrote:



On Sat, Feb 15, 2014 at 6:38 PM, David T. Lewis <[hidden email]> wrote:
On Sat, Feb 15, 2014 at 08:08:19PM -0500, David T. Lewis wrote:
> Yikes! Good catch, thank you.
>
> This very likely *is* a VM problem. I can reproduce it with a standard
> interpreter VM, and the crash does not happen when I run the same thing
> on Cog.


The problem happens in SpaceTally>>spaceForInstancesOf:

This eventually does "CompiledMethod basicNew" which crashes the VM.

That's funny :-).  You can print CompiledMethod basicNew, but woe betide you if you try and inspect it. I think the VM primitives should fail for CompiledMethod.

and my reason is that one can always get at the primitives somehow, e.g.

CompiledMethod perform: #basicNew: withArguments: #(0) inSuperclass: CompiledMethod class superclass!

so the VM can only preserve its integrity by refusing to instantiate bogus objects.  I've already changed the VM to fail at:[put:] for CompiledMethod when accessing bytes in the literal frame (hence the change to CompiledMethod hash), & IIRC to instVarAt:[put:] when accessing outside the literal frame.  Changing the basicNew[:] primitives would be consistent with that.

CompiledMethod class>basicNew seems to cause problems with both Cog and
interpreter VM, so I may have been wrong in saying that the issue was
specific to the interpreter VM.

The format of CompiledMethod is special (see its class comment), and it
appears that #basicNew is problematic.

Dave


>
> To reproduce:
>
> Help -> About this System, then select "Space Analysis" in the System
> Reporter. Result is:
>
> Segmentation fault
>
> 17369460 Behavior>new
> 17369368 Fraction class>numerator:denominator:
> 17369272 SmallInteger>/
> 17369180 Number>roundUpTo:
> 17369088 SpaceTally>spaceForInstancesOf:
>
> Dave
>
>
> On Sat, Feb 15, 2014 at 11:58:29PM +0100, Michael wrote:
> > Hi,
> >
> > I am new to squeak and smalltalk, but I noticed the 4.5 release notes
> > mention a "System space analysis" feature/function.
> > However when I try it, I consistently crash the virtual machine with a
> > segmentation fault.
> >
> > I have tried both on a Raspberry Pi with the latest version of the
> > virtual machine and on 64 bit Slackware 14.1 with version 4.10.2.2614
> > from slackbuilds.org. So I assume it is not a VM problem.
> >
> > The complete output from the command line is:
> > bash-4.2$ squeak Squeak4.5-13675.image
> > CHECKING cogvm
> > which: no cogvm in (/usr/bin:/bin)
> > CHECKING squeakvm
> >
> > Segmentation fault
> >
> > 17254592 Behavior>new
> > Segmentation fault
> >
> >
> > Michael




--
best,
Eliot



--
best,
Eliot