VM scavenge crash

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

VM scavenge crash

Holger Kleinsorgen-4
Hi,

after experiencing random 7.2.1 VM crashes in the past, I finally found
a reliable way to crash the VM, even 7.4.

1. Take a plain visual. im
2. Evaluate

ObjectMemory sizesAtStartup: #(1.0 1.0 1.0 100.0 1.0 1.0 1.0)

(yeah, a somewhat ridiculous stack size)

3. Save image, exit, load image again

4. Evaluate

     |  points maxsize numObjects |
     ObjectMemory installMemoryPolicy: MemoryPolicy new setDefaults.
     maxsize := ObjectMemory currentMemoryPolicy memoryUpperBound.
     numObjects := maxsize // 100.
     points := OrderedCollection new.
     1 to: numObjects do: [ : i |
         points add: (1@2)
     ].

Crashes on my machine (Win XP, 1 GB RAM, AMD64 3000) all the time
(mmScavenge.c, line 2370, out of memory).

The installation of the memory policy (the first line) is crucial,
without it the test won't crash. It seems that the installed memory
differs from the memory policy of the plain image
(availableSpaceSafetyMargin is much higher).
Another observation:
The crash can be prevented when free memory upper bound is set to a high
value:

     ObjectMemory installMemoryPolicy: (MemoryPolicy new setDefaults;
freeMemoryUpperBound: 40000000;yourself).

Reply | Threaded
Open this post in threaded view
|

Re: VM scavenge crash

Holger Kleinsorgen-4
> 1. Take a plain visual. im
> 2. Evaluate
>
> ObjectMemory sizesAtStartup: #(1.0 1.0 1.0 100.0 1.0 1.0 1.0)
>

I tried a few more settings, using a plain VW 7.4 image & VM

#(20.0 1.0 1.0 1.0 1.0 1.0 1.0)
(Eden Space increased by factor 20)) ==> Crash

#(10.0 1.0 1.0 1.0 1.0 1.0 1.0)
(Eden Space factor 10) ==> No Crash

#(20.0 1.0 1.0 1.0 1.0 20.0 1.0)
(Eden Space, Old Space Headroom factor 20) ==> No Crash

(20.0 1.0 1.0 1.0 1.0 2.0 1.0)
(Eden Space, Old Space Headroom factor 2) ==> Crash

#(1.0 20.0 1.0 1.0 1.0 1.0 1.0)
(Survivor Space) ==> No Crash

#(1.0 1.0 20.0 1.0 1.0 1.0 1.0)
(Large Space) ==> No Crash

#(1.0 1.0 1.0 20.0 1.0 1.0 1.0)
(Stack Space) ==> No Crash

#(1.0 1.0 1.0 20.0 1.0 1.0 1.0)
(Stack Space, factor 50) ==> Crash

#(1.0 1.0 1.0 20.0 1.0 1.0 1.0)
(Stack Space, factor 20) ==> No Crash

#(1.0 1.0 1.0 50.0 1.0 5.0 1.0)
(Stack Space, factor 50, Old Space Headroom) ==> No Crash