eventual crashes pharo vm

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

eventual crashes pharo vm

henry
Hi all. I was testing with this eventual_test package and it blows up the pharo 6.1 vm. I'd welcome pointers


- HH


Reply | Threaded
Open this post in threaded view
|

Re: eventual crashes pharo vm

Stephane Ducasse-3
We have some instability with the VM. Now can you tell us more how it "blew up"?
I browsed the code and nothing special jump to my eyes.

Stef

On Sun, Aug 13, 2017 at 2:08 PM, henry <[hidden email]> wrote:
> Hi all. I was testing with this eventual_test package and it blows up the
> pharo 6.1 vm. I'd welcome pointers
>
> http://www.squeaksource.com/TurquoiseTesting.html
>
> - HH
>
>

Reply | Threaded
Open this post in threaded view
|

Re: eventual crashes pharo vm

henry
Re-adding the list in case others were interested.

- HH


-------- Original Message --------
Subject: Re: [Pharo-dev] eventual crashes pharo vm
Local Time: August 13, 2017 3:59 PM
UTC Time: August 13, 2017 7:59 PM
To: Stephane Ducasse <[hidden email]>

Stef, please see version 4 and the test in RefIdentityTest.

- HH


-------- Original Message --------
Subject: Re: [Pharo-dev] eventual crashes pharo vm
Local Time: August 13, 2017 3:09 PM
UTC Time: August 13, 2017 7:09 PM
To: henry <[hidden email]>

Does he do it systematically?
I was checking if they extend blockcontext or others.
Because it would be really nice.

Stef

On Sun, Aug 13, 2017 at 9:06 PM, henry <[hidden email]> wrote:
> Sorry, loading works fine. It segfaults on Ubuntu 32-bit when I run the test
> cases.
>
> - HH
>
>
> -------- Original Message --------
> Subject: Re: [Pharo-dev] eventual crashes pharo vm
> Local Time: August 13, 2017 2:58 PM
> UTC Time: August 13, 2017 6:58 PM
> To: henry <[hidden email]>, Pharo Development List
>
> We have some instability with the VM. Now can you tell us more how it "blew
> up"?
> I browsed the code and nothing special jump to my eyes.
>
> Stef
>
> On Sun, Aug 13, 2017 at 2:08 PM, henry <[hidden email]> wrote:
>> Hi all. I was testing with this eventual_test package and it blows up the
>> pharo 6.1 vm. I"d welcome pointers
>>
>> http://www.squeaksource.com/TurquoiseTesting.html
>>
>> - HH
>>
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: eventual crashes pharo vm

Eliot Miranda-2
In reply to this post by henry
Hi Henry,

On Sun, Aug 13, 2017 at 5:08 AM, henry <[hidden email]> wrote:
Hi all. I was testing with this eventual_test package and it blows up the pharo 6.1 vm. I'd welcome pointers


Care to share how to reproduce the crash?  Image version, VM version & word size, OS, Smalltalk expression, supporting files, if any. 

_,,,^..^,,,_
best, Eliot
Reply | Threaded
Open this post in threaded view
|

Re: eventual crashes pharo vm

henry
Yes, it is pharo 6.1 32-bit, standard image with Cryptography loaded, on ubuntu 32-bit. Here is the vm version info below.

I loaded this package and ran the tests and it exited...http://www.squeaksource.com/TurquoiseTesting/eventual_test-hh.4.mcz

Here is the pharo 6.1 version...
5.0-201707201942  Thu Jul 20 20:49:40 UTC 2017 gcc 4.6.3 [Production Spur VM]
CoInterpreter VMMaker.oscog-eem.2254 uuid: 4f2c2cce-f4a2-469a-93f1-97ed941df0ad Jul 20 2017
StackToRegisterMappingCogit VMMaker.oscog-eem.2252 uuid: 2f3e9b0e-ecd3-4adf-b092-cce2e2587a5c Jul 20 2017
VM: 201707201942 https://github.com/OpenSmalltalk/opensmalltalk-vm.git $ Date: Thu Jul 20 12:42:21 2017 -0700 $
Linux testing-gce-a2a4bdab-02ca-439f-bf6e-83038885be71 3.13.0-115-generic #162~precise1-Ubuntu SMP Fri Mar 24 16:47:06 UTC 2017 i686 i686 i386 GNU/Linux
plugin path: /usr/local/bin/../lib/pharo/5.0-201707201942 [default: /usr/local/lib/pharo/5.0-201707201942/]

- HH


-------- Original Message --------
Subject: Re: [Pharo-dev] eventual crashes pharo vm
Local Time: August 14, 2017 6:47 PM
UTC Time: August 14, 2017 10:47 PM
To: henry <[hidden email]>, Pharo Development List <[hidden email]>

Hi Henry,

On Sun, Aug 13, 2017 at 5:08 AM, henry <[hidden email]> wrote:
Hi all. I was testing with this eventual_test package and it blows up the pharo 6.1 vm. I'd welcome pointers


Care to share how to reproduce the crash?  Image version, VM version & word size, OS, Smalltalk expression, supporting files, if any. 

_,,,^..^,,,_
best, Eliot

Reply | Threaded
Open this post in threaded view
|

Re: eventual crashes pharo vm

henry
If you need more info, please ask and I will try to get ths to you.

- HH


-------- Original Message --------
Subject: Re: [Pharo-dev] eventual crashes pharo vm
Local Time: August 14, 2017 6:54 PM
UTC Time: August 14, 2017 10:54 PM
To: Eliot Miranda <[hidden email]>
Pharo Development List <[hidden email]>

Yes, it is pharo 6.1 32-bit, standard image with Cryptography loaded, on ubuntu 32-bit. Here is the vm version info below.

I loaded this package and ran the tests and it exited...http://www.squeaksource.com/TurquoiseTesting/eventual_test-hh.4.mcz

Here is the pharo 6.1 version...
5.0-201707201942  Thu Jul 20 20:49:40 UTC 2017 gcc 4.6.3 [Production Spur VM]
CoInterpreter VMMaker.oscog-eem.2254 uuid: 4f2c2cce-f4a2-469a-93f1-97ed941df0ad Jul 20 2017
StackToRegisterMappingCogit VMMaker.oscog-eem.2252 uuid: 2f3e9b0e-ecd3-4adf-b092-cce2e2587a5c Jul 20 2017
VM: 201707201942 https://github.com/OpenSmalltalk/opensmalltalk-vm.git $ Date: Thu Jul 20 12:42:21 2017 -0700 $
Linux testing-gce-a2a4bdab-02ca-439f-bf6e-83038885be71 3.13.0-115-generic #162~precise1-Ubuntu SMP Fri Mar 24 16:47:06 UTC 2017 i686 i686 i386 GNU/Linux
plugin path: /usr/local/bin/../lib/pharo/5.0-201707201942 [default: /usr/local/lib/pharo/5.0-201707201942/]

- HH


-------- Original Message --------
Subject: Re: [Pharo-dev] eventual crashes pharo vm
Local Time: August 14, 2017 6:47 PM
UTC Time: August 14, 2017 10:47 PM
To: henry <[hidden email]>, Pharo Development List <[hidden email]>

Hi Henry,

On Sun, Aug 13, 2017 at 5:08 AM, henry <[hidden email]> wrote:
Hi all. I was testing with this eventual_test package and it blows up the pharo 6.1 vm. I'd welcome pointers


Care to share how to reproduce the crash?  Image version, VM version & word size, OS, Smalltalk expression, supporting files, if any. 

_,,,^..^,,,_
best, Eliot


Reply | Threaded
Open this post in threaded view
|

Re: eventual crashes pharo vm

Eliot Miranda-2
Hi Henry,

On Mon, Aug 14, 2017 at 3:58 PM, henry <[hidden email]> wrote:
If you need more info, please ask and I will try to get ths to you.

yes, if you can make the image & changes available somewhere that would be nice.  Thanks.
 

- HH


-------- Original Message --------
Subject: Re: [Pharo-dev] eventual crashes pharo vm
Local Time: August 14, 2017 6:54 PM
UTC Time: August 14, 2017 10:54 PM
To: Eliot Miranda <[hidden email]>
Pharo Development List <[hidden email]>

Yes, it is pharo 6.1 32-bit, standard image with Cryptography loaded, on ubuntu 32-bit. Here is the vm version info below.

I loaded this package and ran the tests and it exited...http://www.squeaksource.com/TurquoiseTesting/eventual_test-hh.4.mcz

Here is the pharo 6.1 version...
5.0-201707201942  Thu Jul 20 20:49:40 UTC 2017 gcc 4.6.3 [Production Spur VM]
CoInterpreter VMMaker.oscog-eem.2254 uuid: 4f2c2cce-f4a2-469a-93f1-97ed941df0ad Jul 20 2017
StackToRegisterMappingCogit VMMaker.oscog-eem.2252 uuid: 2f3e9b0e-ecd3-4adf-b092-cce2e2587a5c Jul 20 2017
VM: 201707201942 https://github.com/OpenSmalltalk/opensmalltalk-vm.git $ Date: Thu Jul 20 12:42:21 2017 -0700 $
Linux testing-gce-a2a4bdab-02ca-439f-bf6e-83038885be71 3.13.0-115-generic #162~precise1-Ubuntu SMP Fri Mar 24 16:47:06 UTC 2017 i686 i686 i386 GNU/Linux
plugin path: /usr/local/bin/../lib/pharo/5.0-201707201942 [default: /usr/local/lib/pharo/5.0-201707201942/]

- HH


-------- Original Message --------
Subject: Re: [Pharo-dev] eventual crashes pharo vm
Local Time: August 14, 2017 6:47 PM
UTC Time: August 14, 2017 10:47 PM
To: henry <[hidden email]>, Pharo Development List <[hidden email]>

Hi Henry,

On Sun, Aug 13, 2017 at 5:08 AM, henry <[hidden email]> wrote:
Hi all. I was testing with this eventual_test package and it blows up the pharo 6.1 vm. I'd welcome pointers


Care to share how to reproduce the crash?  Image version, VM version & word size, OS, Smalltalk expression, supporting files, if any. 

_,,,^..^,,,_
best, Eliot





--
_,,,^..^,,,_
best, Eliot
Reply | Threaded
Open this post in threaded view
|

Re: eventual crashes pharo vm

henry
Yes, here it is, in Pharo6.1, as mentioned previously. Just run the eventual_test tests and it will exit on Ubuntu 32-bit.


Thank you,
- HH


-------- Original Message --------
Subject: Re: [Pharo-dev] eventual crashes pharo vm
Local Time: August 14, 2017 7:45 PM
UTC Time: August 14, 2017 11:45 PM
To: henry <[hidden email]>
Pharo Development List <[hidden email]>

Hi Henry,

On Mon, Aug 14, 2017 at 3:58 PM, henry <[hidden email]> wrote:
If you need more info, please ask and I will try to get ths to you.

yes, if you can make the image & changes available somewhere that would be nice.  Thanks.
 


- HH


-------- Original Message --------
Subject: Re: [Pharo-dev] eventual crashes pharo vm
Local Time: August 14, 2017 6:54 PM
UTC Time: August 14, 2017 10:54 PM
To: Eliot Miranda <[hidden email]>
Pharo Development List <[hidden email]>

Yes, it is pharo 6.1 32-bit, standard image with Cryptography loaded, on ubuntu 32-bit. Here is the vm version info below.

I loaded this package and ran the tests and it exited...http://www.squeaksource.com/TurquoiseTesting/eventual_test-hh.4.mcz

Here is the pharo 6.1 version...
5.0-201707201942  Thu Jul 20 20:49:40 UTC 2017 gcc 4.6.3 [Production Spur VM]
CoInterpreter VMMaker.oscog-eem.2254 uuid: 4f2c2cce-f4a2-469a-93f1-97ed941df0ad Jul 20 2017
StackToRegisterMappingCogit VMMaker.oscog-eem.2252 uuid: 2f3e9b0e-ecd3-4adf-b092-cce2e2587a5c Jul 20 2017
VM: 201707201942 https://github.com/OpenSmalltalk/opensmalltalk-vm.git $ Date: Thu Jul 20 12:42:21 2017 -0700 $
Linux testing-gce-a2a4bdab-02ca-439f-bf6e-83038885be71 3.13.0-115-generic #162~precise1-Ubuntu SMP Fri Mar 24 16:47:06 UTC 2017 i686 i686 i386 GNU/Linux
plugin path: /usr/local/bin/../lib/pharo/5.0-201707201942 [default: /usr/local/lib/pharo/5.0-201707201942/]

- HH


-------- Original Message --------
Subject: Re: [Pharo-dev] eventual crashes pharo vm
Local Time: August 14, 2017 6:47 PM
UTC Time: August 14, 2017 10:47 PM
To: henry <[hidden email]>, Pharo Development List <[hidden email]>

Hi Henry,

On Sun, Aug 13, 2017 at 5:08 AM, henry <[hidden email]> wrote:
Hi all. I was testing with this eventual_test package and it blows up the pharo 6.1 vm. I'd welcome pointers


Care to share how to reproduce the crash?  Image version, VM version & word size, OS, Smalltalk expression, supporting files, if any. 

_,,,^..^,,,_
best, Eliot





--
_,,,^..^,,,_
best, Eliot

Reply | Threaded
Open this post in threaded view
|

Re: eventual crashes pharo vm

Stephane Ducasse-3
Thanks I will try it on my mac Sierra and report.

Stef

On Tue, Aug 15, 2017 at 2:59 AM, henry <[hidden email]> wrote:

> Yes, here it is, in Pharo6.1, as mentioned previously. Just run the
> eventual_test tests and it will exit on Ubuntu 32-bit.
>
> https://ufile.io/pa9ym
>
> Thank you,
> - HH
>
>
> -------- Original Message --------
> Subject: Re: [Pharo-dev] eventual crashes pharo vm
> Local Time: August 14, 2017 7:45 PM
> UTC Time: August 14, 2017 11:45 PM
> From: [hidden email]
> To: henry <[hidden email]>
> Pharo Development List <[hidden email]>
>
> Hi Henry,
>
> On Mon, Aug 14, 2017 at 3:58 PM, henry <[hidden email]> wrote:
>>
>> If you need more info, please ask and I will try to get ths to you.
>
>
> yes, if you can make the image & changes available somewhere that would be
> nice.  Thanks.
>
>>
>>
>>
>> - HH
>>
>>
>> -------- Original Message --------
>> Subject: Re: [Pharo-dev] eventual crashes pharo vm
>> Local Time: August 14, 2017 6:54 PM
>> UTC Time: August 14, 2017 10:54 PM
>> From: [hidden email]
>> To: Eliot Miranda <[hidden email]>
>> Pharo Development List <[hidden email]>
>>
>> Yes, it is pharo 6.1 32-bit, standard image with Cryptography loaded, on
>> ubuntu 32-bit. Here is the vm version info below.
>>
>> I loaded this package and ran the tests and it
>> exited...http://www.squeaksource.com/TurquoiseTesting/eventual_test-hh.4.mcz
>>
>> Here is the pharo 6.1 version...
>> 5.0-201707201942  Thu Jul 20 20:49:40 UTC 2017 gcc 4.6.3 [Production Spur
>> VM]
>> CoInterpreter VMMaker.oscog-eem.2254 uuid:
>> 4f2c2cce-f4a2-469a-93f1-97ed941df0ad Jul 20 2017
>> StackToRegisterMappingCogit VMMaker.oscog-eem.2252 uuid:
>> 2f3e9b0e-ecd3-4adf-b092-cce2e2587a5c Jul 20 2017
>> VM: 201707201942 https://github.com/OpenSmalltalk/opensmalltalk-vm.git $
>> Date: Thu Jul 20 12:42:21 2017 -0700 $
>> Plugins: 201707201942
>> https://github.com/OpenSmalltalk/opensmalltalk-vm.git $
>> Linux testing-gce-a2a4bdab-02ca-439f-bf6e-83038885be71 3.13.0-115-generic
>> #162~precise1-Ubuntu SMP Fri Mar 24 16:47:06 UTC 2017 i686 i686 i386
>> GNU/Linux
>> plugin path: /usr/local/bin/../lib/pharo/5.0-201707201942 [default:
>> /usr/local/lib/pharo/5.0-201707201942/]
>>
>> - HH
>>
>>
>> -------- Original Message --------
>> Subject: Re: [Pharo-dev] eventual crashes pharo vm
>> Local Time: August 14, 2017 6:47 PM
>> UTC Time: August 14, 2017 10:47 PM
>> From: [hidden email]
>> To: henry <[hidden email]>, Pharo Development List
>> <[hidden email]>
>>
>> Hi Henry,
>>
>> On Sun, Aug 13, 2017 at 5:08 AM, henry <[hidden email]> wrote:
>>>
>>> Hi all. I was testing with this eventual_test package and it blows up the
>>> pharo 6.1 vm. I'd welcome pointers
>>>
>>> http://www.squeaksource.com/TurquoiseTesting.html
>>
>>
>> Care to share how to reproduce the crash?  Image version, VM version &
>> word size, OS, Smalltalk expression, supporting files, if any.
>>
>> _,,,^..^,,,_
>> best, Eliot
>>
>>
>>
>
>
>
> --
> _,,,^..^,,,_
> best, Eliot
>
>

Reply | Threaded
Open this post in threaded view
|

Re: eventual crashes pharo vm

henry
In reply to this post by henry
That is good news, that it is due to this code doing funniness than a VM issue. This code trying to bring asynchrony within a synchronous environment brings new issues.

What do you think that right solution is to the issue of a call expected to be immediate, change out to go eventual until the arguments resolve? How can it be structured correctly on the stack without generic functions? I think with the double dispatch of an eventual but I have not spend much time in this particular area. Preventing the vm from crashing would be a good interim step but even here I am not sure how to go about crafting a solution. 

Thank you for investigating this.

- HH


On Wed, Aug 16, 2017 at 20:46, Eliot Miranda <[hidden email]> wrote:
Hi Henry, Hi Marcus,

On Sun, Aug 13, 2017 at 5:08 AM, henry <[hidden email]> wrote:
Hi all. I was testing with this eventual_test package and it blows up the pharo 6.1 vm. I'd welcome pointers


- HH

I took a look at this and I think you've found a bug in the mustBeBooleanMagic: code.  What's happening is a mustBeBoolean in Integer>>* due to evaluating
    10 * 42 eventual
in RefsTest>>testFailureArithmeticPrimitivesWithPromiseArgument

Since 42 eventual is a NearERef the SmallInteger>>* primitive fails and does ^super * anInteger (where anInteger is the NearERef).  So that evaluates Integer>>*

Integer>>* aNumber
"Refer to the comment in Number * " 
aNumber isInteger ifTrue:
[^ self digitMultiply: aNumber 
neg: self negative ~~ aNumber negative].
^ aNumber adaptToInteger: self andSend: #*

aNumber, being a NearERef, answers a PromiseERef for the isInteger send, and this provokes a mustBeBoolean for the isInteger ifTrue: [...

After the mustBeBooleanMagic: the stack looks wrong. The activation of Integer>>*, which is about to do
    ^ aNumber adaptToInteger: self andSend: #*
does not have enough items on the stack.  Instead of containing
    a NearERef (for 42)
    10
     #*
it contains
    a PromiseERef (for 42 eventual isInteger)

and the send of #adaptToInteger:andSend: ends up taking more form the stack than the VM can handle and it crashes.  The bug appears to be with the use of sendNode irInstruction nextBytecodeOffsetAfterJump in Object>>mustBeBooleanMagic: since execution should resume at bytecode 55 below, but does so at bytecode 57

41 <10> pushTemp: 0
42 <D0> send: isInteger
43 <AC 09> jumpFalse: 54
45 <70> self
46 <10> pushTemp: 0
47 <70> self
48 <D1> send: negative
49 <10> pushTemp: 0
50 <D1> send: negative
51 <E2> send: ~~
52 <F3> send: digitMultiply:neg:
53 <7C> returnTop
54 <10> pushTemp: 0
55 <70> self
56 <24> pushConstant: #*
57 <F5> send: adaptToInteger:andSend:
58 <7C> returnTop

So the positioning of the context's pc must be before any argument marshaling for the next send, not simply the send itself.

Put a breakpoint at the end of Object>>mustBeBooleanMagic: and add initlaPC and resumePC temporaries at the beginning and capture them via
    initialPC := context pc.
at the beginning and then
context pc: (resumePC := sendNode irInstruction nextBytecodeOffsetAfterJump)
to see what I'm seeing.


Phew.  Glad it's not a VM bug :-)

HTH
_,,,^..^,,,_
best, Eliot