SstOSObjectManager>>#freeBuffer: throws exceptions

159 views
Skip to first unread message

Marten Feldtmann

unread,
Oct 7, 2011, 3:03:10 AM10/7/11
to va-sma...@googlegroups.com
Very often - when I save my development image (including Seaside, SST, etc) and restart it later again - I get exceptions from that method., because the method tries to free external memory, which is not available any more (general exception fault is thrown).

The best way would be to free potential objects when starting this image (with exception handling) or to initialize this object at startup. I do not think, that there can be any valid OSObjects at startup of an image.





John O'Keefe

unread,
Oct 20, 2011, 4:36:01 PM10/20/11
to va-sma...@googlegroups.com
Marten -
 
What version of VA Smalltalk do you see this happening in (and what platform)? I know there used to be a problem with #freeBuffer:, but I thought it got fixed.
 
John

Marten Feldtmann

unread,
Oct 21, 2011, 3:41:15 AM10/21/11
to va-sma...@googlegroups.com
That's for 8.5 (under Windows), but I've seen this under Linux also - and I think it was also under 8.03

jtu...@objektfabrik.de

unread,
Nov 8, 2011, 7:39:56 AM11/8/11
to va-sma...@googlegroups.com
Hi,

I got it today. For the first time. There's nothing helpful the debugger could tell me about it, but OSUInt8(OSPtr)>>#free fails due to GPF during processing of the finalizeQueue...

Joachim

jtu...@objektfabrik.de

unread,
Nov 8, 2011, 7:40:43 AM11/8/11
to va-sma...@googlegroups.com
sorry, forgot to mention: VAST 8.5 on Win XP SP3.

jtu...@objektfabrik.de

unread,
Mar 7, 2012, 3:20:37 PM3/7/12
to va-sma...@googlegroups.com
I now see it almost every time I start an Image in which there was a running WASstAdaptor before the image got saved.
VAST 8.5 on Win 7, Win XP SP3 and ubuntu 11.10.

A second or two after the image opened, the debugger pops up. You can terminate the process without any problems and continue to work.


Here's the stack trace, but I guess it's not really helpful:

Debugger Stack Trace Report:
Error String: 'Primitive failed in: OSPtr>>#free due to General protection fault'
Resumable: false

Process
Name: Idle 20:27:36
Process State: suspended
Priority: 1

GPF Information:
Handler=0xf74a79ac
vmState=0x00000002
vmError=0x00000034
Signal=0x0000000b
GS=0x00000063
FS=0x00000000
ES=0x0000002b
DS=0x0000002b
EDI=0x00000002
ESI=0xf4d35ed3
EBP=0xfff7ef38
ESP=0xfff7ef0c
EAX=0x00000000
EBX=0xf72c9ff4
ECX=0x09c49af8
EDX=0xf434c1d0
TRAPNO=0x0000000e
ERR=0x00000004
EIP=0xf71c688e
CS=0x00000023
EFL=0x00210202
UESP=0xfff7ef0c
SS=0x0000002b

Executing in: OSUInt8(OSPtr)>>#free

System Configuration Dump


Copyright:

VA Smalltalk V8.5; Image: 8.5 [194]
VM Timestamp: 4.0,(NC) 8/17/2011 (82)
(C) Copyright Instantiations 1994, 2011.  All rights reserved.
(C) Copyright International Business Machines Corp. 1994, 2006.  All rights reserved.

Time:  21:17:26
Date:  07.03.2012

Platform:

Virtual machine:  ES
Bytecode version:  4.0
Manager version:  4.00
'OS' subsystem:  'UNIX'
'CLIM' subsystem:  'ES'
'CP' subsystem:  'X'
'CLDT' subsystem:  'ES'
'CFS' subsystem:  'POSIX'
'SCI' subsystem:  'UNIX'
'CW' subsystem:  'MOTIF'
'CPM' subsystem:  'ES'
'CG' subsystem:  'X'

Current user:  Joachim Tuchel

Connected Library:

Pathname:  ####
Library version:  6
Size of library:  203476688 bytes
Has consistent EOF:  true
Acquire read locks:  false
Single user mode:  false
Server address:  '####'

Library Access:

Host system name:  None
Use release lock mode:  true
Native primitives library:  libemntv50
Emsrv primitives library:  libemsrv50

Memory:

Total allocation:  37664300 bytes
Available:  4043912 bytes
Fixed Space:  33948 bytes
New Space:  1839192 bytes
Old Space:  2204108 bytes

=============<STACK TRACE BEGINS>============
[] in <optimized block>(ExceptionalEvent class)>>#initializeSystemExceptions
signal=Signal on Exception: (ExError) An error has occurred.
Signal>>#evaluate:
self=Signal on Exception: (ExError) An error has occurred.
aBlock=[] in ExceptionalEvent class>>#initializeSystemExceptions
Signal>>#evaluateDefaultHandler:
self=Signal on Exception: (ExError) An error has occurred.
aBlock=[] in ExceptionalEvent class>>#initializeSystemExceptions
ExceptionalEvent>>#applyDefaultHandler:
self=Exception: (ExError) An error has occurred.
aSignal=Signal on Exception: (ExError) An error has occurred.
exception=Exception: (ExError) An error has occurred.
ExceptionalEvent>>#signalFor:
self=Exception: (ExError) An error has occurred.
aSignalOrExceptionSelector=Signal on Exception: (ExError) An error has occurred.
handler=nil
ExceptionalEvent>>#signalWithArguments:
self=Exception: (ExError) An error has occurred.
arguments=('Primitive failed in: OSPtr>>#free due to General protection fault')
ExceptionalEvent>>#signalWith:
self=Exception: (ExError) An error has occurred.
arg1='Primitive failed in: OSPtr>>#free due to General protection fault'
OSUInt8(Object)>>#error:
self=*OSUInt8 {16r09C49AF8}
aString='Primitive failed in: OSPtr>>#free due to General protection fault'
OSUInt8(Object)>>#primitiveFailed:withArgument:backUp:
self=*OSUInt8 {16r09C49AF8}
errorCode=52
argument=-1
backUp=1
OSUInt8(Object)>>#primitiveFailed
self=*OSUInt8 {16r09C49AF8}
OSUInt8(OSPtr)>>#free
self=*OSUInt8 {16r09C49AF8}
SstOSObjectManager>>#freeBuffer:
self=a SstOSObjectManager
anOSObject=*OSUInt8 {16r09C49AF8}
EsWeakSet>>#finalizedSlot:removedObject:
self=EsWeakSet()
index=1
anObject=*OSUInt8 {16r09C49AF8}
EsWeakArray>>#finalizedSlot:removedObject:
self=(nil nil ... recursive reference to EsWeakArray ... ... recursive reference to EsWeakArray ... ... recursive reference to EsWeakArray ... nil ... recursive reference to EsWeakArray ... ... recursive reference to EsWeakArray ... ... recursive reference to EsWeakArray ... ... recursive reference to EsWeakArray ... ... recursive reference to EsWeakArray ...)
slotIndex=2
anObject=*OSUInt8 {16r09C49AF8}
[] in <optimized block>(ProcessorScheduler)>>#finalizeCycle
finalizeQueue=an EsQueue()
EsCompactBlockContextTemplate(Block)>>#critical
self=[] in ProcessorScheduler>>#finalizeCycle
ProcessorScheduler>>#finalizeCycle
self=a ProcessorScheduler
[] in AbtWindowSystemStartUp class(EsImageStartUp class)>>#idleProcess
self=AbtWindowSystemStartUp
[] in Process>>#executeBlock:withArguments:
self=Process:Idle 20:27:36{suspended,1}
aBlock=[] in EsImageStartUp class>>#idleProcess
args=()
Process>>#executeBlock:withArguments:
self=Process:Idle 20:27:36{suspended,1}
aBlock=[] in EsImageStartUp class>>#idleProcess
args=()
Process>>#newProcessOn:stackSize:withArguments:named:
self=Process:Idle 20:27:36{suspended,1}
aBlock=[] in EsImageStartUp class>>#idleProcess
stackSize=1024
args=()
procName='23569'
==============<STACK TRACE ENDS>=============

jtu...@objektfabrik.de

unread,
Apr 2, 2012, 6:03:56 AM4/2/12
to va-sma...@googlegroups.com
Hi again,

is this one fixed in 8.5.1?

A packaged image should ideally not be affected by this, because there should never be a saved open socket or http session in it, but if there is for some reason, this might crash a server image right after its start.

Joachim

John O'Keefe

unread,
Apr 13, 2012, 11:26:11 AM4/13/12
to va-sma...@googlegroups.com
Marten -
 
The problem is caused by stale entries in the finalization queue when the image is started.  I will be changing the EmSystemConfiguration>>#initializeVM method to clear the finalization queue for V8.5.2.
 
John

On Friday, October 7, 2011 3:03:10 AM UTC-4, Marten Feldtmann wrote:
Very often - when I save my development image (including Seaside, SST, etc) and restart it later again - I get exceptions from that method., because the method tries to free external memory, which is not available any more (general exception fault is thrown).

The best way would be to free potential objects when starting this image (with exception handling) or to initialize this object at startup. I do not think, that there can be any valid OSObjects at startup of an image.

Reply all
Reply to author
Forward
0 new messages