[Pharo-project] Too many semaphores, image blocked
Hi guys I have nonstartable Pharo 1.3 image, is there any way to get it started? This image was running all the time, being on the net directly (Aida based web development image) and snapshoting every hour. The problem happens at such snapshot, raising Not enough space for external objects/too many semaphores error and block. After I killed it, snapshoted image is not startable anymore, more exactly: it starts in blank window and stays unresponsive. Is this too many semaphores error related to too many open sockets problem we discussed not to long ago? Any help greatly appreciated. Not to mention finding a bug and removing it forever, because Pharo should become stable as a rock, as VW for instance is :) Best regards Janko PharoDebug.log: THERE_BE_DRAGONS_HERE Error: Not enough space for external objects, set a larger size at startup! 4 October 2011 4:00:01 am VM: unix - i686 - linux-gnu - Croquet Closure Cog VM [CoInterpreter VMMaker-oscog.35] Image: Pharo1.3 [Latest update: #13299] SmalltalkImage(Object)>>error: Receiver: Smalltalk Arguments and temporary variables: aString: 'Not enough space for external objects, set a larger size at startup!'...etc... Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil SmalltalkImage>>maxExternalSemaphores: Receiver: Smalltalk Arguments and temporary variables: aSize: 520 inProduction: false Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil ExternalSemaphoreTable class>>freedSlotsIn:ratherThanIncreaseSizeTo: Receiver: ExternalSemaphoreTable Arguments and temporary variables: externalObjects: an Array(a Semaphore() a Semaphore() a Semaphore() a Semaphore...etc... newSize: 520 needToGrow: false maxSize: 512 Receiver's instance variables: superclass: Object methodDict: a MethodDictionary() format: 2 instanceVariables: nil organization: ('as yet unclassified') subclasses: nil name: #ExternalSemaphoreTable classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a Semaphore(...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'System-Support' traitComposition: {} localSelectors: nil ExternalSemaphoreTable class>>collectionBasedOn:withRoomFor: Receiver: ExternalSemaphoreTable Arguments and temporary variables: externalObjects: an Array(a Semaphore() a Semaphore() a Semaphore() a Semaphore...etc... anObject: a Semaphore() newObjects: nil newSize: 520 Receiver's instance variables: superclass: Object methodDict: a MethodDictionary() format: 2 instanceVariables: nil organization: ('as yet unclassified') subclasses: nil name: #ExternalSemaphoreTable classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a Semaphore(...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'System-Support' traitComposition: {} localSelectors: nil ExternalSemaphoreTable class>>safelyRegisterExternalObject: Receiver: ExternalSemaphoreTable Arguments and temporary variables: anObject: a Semaphore() objects: an Array(a Semaphore() a Semaphore() a Semaphore() a Semaphore(a Proce...etc... firstEmptyIndex: nil obj: nil sz: nil newObjects: nil Receiver's instance variables: superclass: Object methodDict: a MethodDictionary() format: 2 instanceVariables: nil organization: ('as yet unclassified') subclasses: nil name: #ExternalSemaphoreTable classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a Semaphore(...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'System-Support' traitComposition: {} localSelectors: nil [self safelyRegisterExternalObject: anObject] in ExternalSemaphoreTable class>>registerExternalObject: Receiver: ExternalSemaphoreTable Arguments and temporary variables: anObject: a Semaphore() Receiver's instance variables: superclass: Object methodDict: a MethodDictionary() format: 2 instanceVariables: nil organization: ('as yet unclassified') subclasses: nil name: #ExternalSemaphoreTable classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a Semaphore(...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'System-Support' traitComposition: {} localSelectors: nil [caught := true. self wait. blockValue := mutuallyExcludedBlock value] in Semaphore>>critical: Receiver: a Semaphore() Arguments and temporary variables: <<error during printing> Receiver's instance variables: firstLink: nil lastLink: nil excessSignals: 0 BlockClosure>>ensure: Receiver: [caught := true. self wait. blockValue := mutuallyExcludedBlock value] Arguments and temporary variables: aBlock: [caught ifTrue: [self signal]] complete: nil returnValue: nil Receiver's instance variables: outerContext: Semaphore>>critical: startpc: 42 numArgs: 0 Semaphore>>critical: Receiver: a Semaphore() Arguments and temporary variables: <<error during printing> Receiver's instance variables: firstLink: nil lastLink: nil excessSignals: 0 ExternalSemaphoreTable class>>registerExternalObject: Receiver: ExternalSemaphoreTable Arguments and temporary variables: anObject: a Semaphore() Receiver's instance variables: superclass: Object methodDict: a MethodDictionary() format: 2 instanceVariables: nil organization: ('as yet unclassified') subclasses: nil name: #ExternalSemaphoreTable classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a Semaphore(...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'System-Support' traitComposition: {} localSelectors: nil SmalltalkImage>>registerExternalObject: Receiver: Smalltalk Arguments and temporary variables: anObject: a Semaphore() Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil InputEventPollingFetcher(InputEventFetcher)>>startUp Receiver: an InputEventPollingFetcher Arguments and temporary variables: Receiver's instance variables: eventHandlers: an OrderedCollection(an InputEventSensor an UserInterruptHandler...etc... fetcherProcess: a Process in [delaySemaphore wait] in Delay>>wait inputSemaphore: a Semaphore() InputEventPollingFetcher class(InputEventFetcher class)>>startUp Receiver: InputEventPollingFetcher Arguments and temporary variables: Receiver's instance variables: superclass: InputEventFetcher methodDict: a MethodDictionary(#terminateEventLoop->(InputEventPollingFetcher>>...etc... format: 136 instanceVariables: nil organization: ('events' waitForInput) ('initialize-release' terminateEventLoop)...etc... subclasses: nil name: #InputEventPollingFetcher classPool: a Dictionary(#EventPollDelay->a Delay(10 msecs; 9 msecs remaining) )...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'Kernel-Processes' traitComposition: {} localSelectors: nil InputEventPollingFetcher class(Behavior)>>startUp: Receiver: InputEventPollingFetcher Arguments and temporary variables: resuming: false Receiver's instance variables: superclass: InputEventFetcher methodDict: a MethodDictionary(#terminateEventLoop->(InputEventPollingFetcher>>...etc... format: 136 instanceVariables: nil organization: ('events' waitForInput) ('initialize-release' terminateEventLoop)...etc... subclasses: nil name: #InputEventPollingFetcher classPool: a Dictionary(#EventPollDelay->a Delay(10 msecs; 9 msecs remaining) )...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'Kernel-Processes' traitComposition: {} localSelectors: nil [:name | | class | class := self at: name ifAbsent: []. class isNil ifTrue: [removals add: name] ifFalse: [class perform: startUpOrShutDown with: argument]] in SmalltalkImage>>send:toClassesNamedIn:with: Receiver: Smalltalk Arguments and temporary variables: startUpOrShutDown: #InputEventPollingFetcher argument: #startUp: removals: false name: an OrderedCollection() class: InputEventPollingFetcher Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil OrderedCollection>>do: Receiver: an OrderedCollection(#Delay #OSPlatform #DisplayScreen #Cursor #InputEventFetcher #Process...etc... Arguments and temporary variables: aBlock: [:name | | class | class := self at: name ifAbsent: []. class...etc... index: 60 Receiver's instance variables: array: #(nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil ni...etc... firstIndex: 36 lastIndex: 74 SmalltalkImage>>send:toClassesNamedIn:with: Receiver: Smalltalk Arguments and temporary variables: startUpOrShutDown: #startUp: startUpOrShutDownList: an OrderedCollection(#Delay #OSPlatform #DisplayScreen #...etc... argument: false removals: an OrderedCollection() Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil SmalltalkImage>>processStartUpList: Receiver: Smalltalk Arguments and temporary variables: resuming: false Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil [self processStartUpList: resuming. resuming ifTrue: [self recordStartupStamp]] in SmalltalkImage>>snapshot:andQuit: Receiver: Smalltalk Arguments and temporary variables: resuming: false Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil BlockClosure>>ensure: Receiver: [self processStartUpList: resuming. resuming ifTrue: [self recordStartupStamp]] Arguments and temporary variables: aBlock: [Default := self] complete: nil returnValue: nil Receiver's instance variables: outerContext: SmalltalkImage>>snapshot:andQuit: startpc: 185 numArgs: 0 MorphicUIManager(UIManager)>>boot:during: Receiver: a MorphicUIManager Arguments and temporary variables: bootingFromDisk: false aBlock: [self processStartUpList: resuming. resuming ifTrue: [self recordSta...etc... Receiver's instance variables: interactiveParser: nil SmalltalkImage>>snapshot:andQuit: Receiver: Smalltalk Arguments and temporary variables: save: true quit: false snapshotResult: false resuming: false Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil SmalltalkImage>>saveSession Receiver: Smalltalk Arguments and temporary variables: Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil [SmalltalkImage current saveSession] in AIDASite class>>imageSnapshot Receiver: AIDASite Arguments and temporary variables: Receiver's instance variables: superclass: SwazooSite methodDict: a MethodDictionary(size 203) format: 156 instanceVariables: #('style' 'settings' 'systemServices' 'userServices' 'timest...etc... organization: ('private-serving' activityAnnouncers addAllowHeaderTo: addDontCa...etc... subclasses: nil name: #AIDASite classPool: a Dictionary(#Default->an AIDASite #Dialect->#Pharo #HourlySnapshot-...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'Aida-Core' traitComposition: {} localSelectors: nil Time class>>millisecondsToRun: Receiver: Time Arguments and temporary variables: timedBlock: [SmalltalkImage current saveSession] initialMilliseconds: 155447683 Receiver's instance variables: superclass: Magnitude methodDict: a MethodDictionary(#<->(Time>>#< "a CompiledMethod(736624640)") #=-...etc... format: 134 instanceVariables: #('seconds' 'nanos') organization: ('ansi protocol' < = duration hash hour hour12 hour24 meridianAbb...etc... subclasses: nil name: #Time classPool: nil sharedPools: an OrderedCollection(ChronologyConstants) environment: a SystemDictionary(lots of globals) category: #'Kernel-Chronology' traitComposition: nil localSelectors: nil AIDASite class>>imageSnapshot Receiver: AIDASite Arguments and temporary variables: elapsed: nil Receiver's instance variables: superclass: SwazooSite methodDict: a MethodDictionary(size 203) format: 156 instanceVariables: #('style' 'settings' 'systemServices' 'userServices' 'timest...etc... organization: ('private-serving' activityAnnouncers addAllowHeaderTo: addDontCa...etc... subclasses: nil name: #AIDASite classPool: a Dictionary(#Default->an AIDASite #Dialect->#Pharo #HourlySnapshot-...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'Aida-Core' traitComposition: {} localSelectors: nil [AIDASite preImageSnapshot; imageSnapshot] in AIDASite>>initHourlySnapshot Receiver: an AIDASite Arguments and temporary variables: Receiver's instance variables: enabled: true uriPattern: an OrderedCollection(a SiteIdentifier) parent: a ServerRootComposite children: an OrderedCollection() name: 'aidademo' serving: true style: a WasteStyle settings: a Dictionary(#afterLogin->#lastPage #contextProcesses->false #countin...etc... systemServices: a Dictionary(#Admin->a WebAdmin #Authenticator->a DefaultAuthen...etc... userServices: a Dictionary(#Blog->a Blog #Repository->a WasteRepository #SiteCo...etc... timestamps: an IdentityDictionary(#Created->3491250844 #LastRequest->3494848717...etc... counters: an IdentityDictionary(#NewVisitors->a WebCounter #NotFound->a WebCoun...etc... other: a Dictionary(#activityAnnouncers->a Dictionary() ) [self block value] in WebScheduledEvent>>run Receiver: a WebScheduledEvent Arguments and temporary variables: Receiver's instance variables: parent: a WebScheduler timestamp: a SpTimestamp period: #hour->0 method: nil object: nil block: [AIDASite preImageSnapshot; imageSnapshot] [self value. Processor terminateActive] in BlockClosure>>newProcess Receiver: [self block value] Arguments and temporary variables: Receiver's instance variables: outerContext: WebScheduledEvent>>run startpc: 78 numArgs: 0 --- The full stack --- SmalltalkImage(Object)>>error: SmalltalkImage>>maxExternalSemaphores: ExternalSemaphoreTable class>>freedSlotsIn:ratherThanIncreaseSizeTo: ExternalSemaphoreTable class>>collectionBasedOn:withRoomFor: ExternalSemaphoreTable class>>safelyRegisterExternalObject: [self safelyRegisterExternalObject: anObject] in ExternalSemaphoreTable class>>registerExternalObject: [caught := true. self wait. blockValue := mutuallyExcludedBlock value] in Semaphore>>critical: BlockClosure>>ensure: Semaphore>>critical: ExternalSemaphoreTable class>>registerExternalObject: SmalltalkImage>>registerExternalObject: InputEventPollingFetcher(InputEventFetcher)>>startUp InputEventPollingFetcher class(InputEventFetcher class)>>startUp InputEventPollingFetcher class(Behavior)>>startUp: [:name | | class | class := self at: name ifAbsent: []. class isNil ifTrue: [removals add: name] ifFalse: [class perform: startUpOrShutDown with: argument]] in SmalltalkImage>>send:toClassesNamedIn:with: OrderedCollection>>do: SmalltalkImage>>send:toClassesNamedIn:with: SmalltalkImage>>processStartUpList: [self processStartUpList: resuming. resuming ifTrue: [self recordStartupStamp]] in SmalltalkImage>>snapshot:andQuit: BlockClosure>>ensure: MorphicUIManager(UIManager)>>boot:during: SmalltalkImage>>snapshot:andQuit: SmalltalkImage>>saveSession [SmalltalkImage current saveSession] in AIDASite class>>imageSnapshot Time class>>millisecondsToRun: AIDASite class>>imageSnapshot [AIDASite preImageSnapshot; imageSnapshot] in AIDASite>>initHourlySnapshot [self block value] in WebScheduledEvent>>run [self value. Processor terminateActive] in BlockClosure>>newProcess ------------------------------------------------------------ -- Janko Mivšek Aida/Web Smalltalk Web Application Server http://www.aidaweb.si
On 04.10.2011 20:57, Janko Mivšek wrote:
Hi guys
I have nonstartable Pharo 1.3 image, is there any way to get it started?
This image was running all the time, being on the net directly (Aida based web development image) and snapshoting every hour.
The problem happens at such snapshot, raising Not enough space for external objects/too many semaphores error and block. After I killed it, snapshoted image is not startable anymore, more exactly: it starts in blank window and stays unresponsive.
Is this too many semaphores error related to too many open sockets problem we discussed not to long ago?
Any help greatly appreciated. Not to mention finding a bug and removing it forever, because Pharo should become stable as a rock, as VW for instance is :)
Best regards Janko Yes, it is. Seems there are so many semaphores open, it cannot register the one used for event handler (done during startup), thus the image is unresponsive... Which is rather weird, as it deregisters the current one as part of shutDown, so there should always be at least one free, and this should never happen... Unless you have something earlier in the startuplist which consumes external semaphores without releasing them at shutDown?
... Which it seems to me you might. HTTPServer when being #stop'ed correctly loses its socket (sets them to nil so they are finalizable), but connections do not nil their sockets. While the connections get removed from the HTTPServer instance's connection list, are they mayhaps still referenced somewhere else? A good way to debug it might be to open a connection to a Swazoo server, save the image, then do a garbagecollect, HTTPConnection allInstances, and follow references to see why the sockets aren't finalizable. Cheers, Henry
Stable as a rock sounds good to me :) The log you posted contains the string "Not enough space for external objects, set a larger size at startup!" Maybe a command-line switch to the vm will give you more memory and a way to get the image going? Good luck! I have rescued a few Pharo images, mostly ones that I damaged by running two IDEs on Linux :( As much as I don't like doing this, going to a working backup and recovering lost changes works fairly well. Ian Bartholomew's Dolphin Goodies in general, and his Chunk Browser in particular, are excellent tools. The Chunk Browser does a wonderful job of sorting, filtering to most-recent chunks per entity (really useful), etc. Snoop is a great IDE inspector. Ghoul (Chris Uppal's work) creates a debugger-like view from Dolphin's crash dumps. Recent changes to Pharo's profiler are starting to create some of the feel of these excellent tools. Bill ________________________________________ From: pharo-project-bounces@lists.gforge.inria.fr [pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Janko Mivšek [janko.mivsek@eranova.si] Sent: Tuesday, October 04, 2011 2:57 PM To: Pharo-project@lists.gforge.inria.fr Subject: [Pharo-project] Too many semaphores, image blocked Hi guys I have nonstartable Pharo 1.3 image, is there any way to get it started? This image was running all the time, being on the net directly (Aida based web development image) and snapshoting every hour. The problem happens at such snapshot, raising Not enough space for external objects/too many semaphores error and block. After I killed it, snapshoted image is not startable anymore, more exactly: it starts in blank window and stays unresponsive. Is this too many semaphores error related to too many open sockets problem we discussed not to long ago? Any help greatly appreciated. Not to mention finding a bug and removing it forever, because Pharo should become stable as a rock, as VW for instance is :) Best regards Janko PharoDebug.log: THERE_BE_DRAGONS_HERE Error: Not enough space for external objects, set a larger size at startup! 4 October 2011 4:00:01 am VM: unix - i686 - linux-gnu - Croquet Closure Cog VM [CoInterpreter VMMaker-oscog.35] Image: Pharo1.3 [Latest update: #13299] SmalltalkImage(Object)>>error: Receiver: Smalltalk Arguments and temporary variables: aString: 'Not enough space for external objects, set a larger size at startup!'...etc... Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil SmalltalkImage>>maxExternalSemaphores: Receiver: Smalltalk Arguments and temporary variables: aSize: 520 inProduction: false Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil ExternalSemaphoreTable class>>freedSlotsIn:ratherThanIncreaseSizeTo: Receiver: ExternalSemaphoreTable Arguments and temporary variables: externalObjects: an Array(a Semaphore() a Semaphore() a Semaphore() a Semaphore...etc... newSize: 520 needToGrow: false maxSize: 512 Receiver's instance variables: superclass: Object methodDict: a MethodDictionary() format: 2 instanceVariables: nil organization: ('as yet unclassified') subclasses: nil name: #ExternalSemaphoreTable classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a Semaphore(...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'System-Support' traitComposition: {} localSelectors: nil ExternalSemaphoreTable class>>collectionBasedOn:withRoomFor: Receiver: ExternalSemaphoreTable Arguments and temporary variables: externalObjects: an Array(a Semaphore() a Semaphore() a Semaphore() a Semaphore...etc... anObject: a Semaphore() newObjects: nil newSize: 520 Receiver's instance variables: superclass: Object methodDict: a MethodDictionary() format: 2 instanceVariables: nil organization: ('as yet unclassified') subclasses: nil name: #ExternalSemaphoreTable classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a Semaphore(...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'System-Support' traitComposition: {} localSelectors: nil ExternalSemaphoreTable class>>safelyRegisterExternalObject: Receiver: ExternalSemaphoreTable Arguments and temporary variables: anObject: a Semaphore() objects: an Array(a Semaphore() a Semaphore() a Semaphore() a Semaphore(a Proce...etc... firstEmptyIndex: nil obj: nil sz: nil newObjects: nil Receiver's instance variables: superclass: Object methodDict: a MethodDictionary() format: 2 instanceVariables: nil organization: ('as yet unclassified') subclasses: nil name: #ExternalSemaphoreTable classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a Semaphore(...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'System-Support' traitComposition: {} localSelectors: nil [self safelyRegisterExternalObject: anObject] in ExternalSemaphoreTable class>>registerExternalObject: Receiver: ExternalSemaphoreTable Arguments and temporary variables: anObject: a Semaphore() Receiver's instance variables: superclass: Object methodDict: a MethodDictionary() format: 2 instanceVariables: nil organization: ('as yet unclassified') subclasses: nil name: #ExternalSemaphoreTable classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a Semaphore(...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'System-Support' traitComposition: {} localSelectors: nil [caught := true. self wait. blockValue := mutuallyExcludedBlock value] in Semaphore>>critical: Receiver: a Semaphore() Arguments and temporary variables: <<error during printing> Receiver's instance variables: firstLink: nil lastLink: nil excessSignals: 0 BlockClosure>>ensure: Receiver: [caught := true. self wait. blockValue := mutuallyExcludedBlock value] Arguments and temporary variables: aBlock: [caught ifTrue: [self signal]] complete: nil returnValue: nil Receiver's instance variables: outerContext: Semaphore>>critical: startpc: 42 numArgs: 0 Semaphore>>critical: Receiver: a Semaphore() Arguments and temporary variables: <<error during printing> Receiver's instance variables: firstLink: nil lastLink: nil excessSignals: 0 ExternalSemaphoreTable class>>registerExternalObject: Receiver: ExternalSemaphoreTable Arguments and temporary variables: anObject: a Semaphore() Receiver's instance variables: superclass: Object methodDict: a MethodDictionary() format: 2 instanceVariables: nil organization: ('as yet unclassified') subclasses: nil name: #ExternalSemaphoreTable classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a Semaphore(...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'System-Support' traitComposition: {} localSelectors: nil SmalltalkImage>>registerExternalObject: Receiver: Smalltalk Arguments and temporary variables: anObject: a Semaphore() Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil InputEventPollingFetcher(InputEventFetcher)>>startUp Receiver: an InputEventPollingFetcher Arguments and temporary variables: Receiver's instance variables: eventHandlers: an OrderedCollection(an InputEventSensor an UserInterruptHandler...etc... fetcherProcess: a Process in [delaySemaphore wait] in Delay>>wait inputSemaphore: a Semaphore() InputEventPollingFetcher class(InputEventFetcher class)>>startUp Receiver: InputEventPollingFetcher Arguments and temporary variables: Receiver's instance variables: superclass: InputEventFetcher methodDict: a MethodDictionary(#terminateEventLoop->(InputEventPollingFetcher>>...etc... format: 136 instanceVariables: nil organization: ('events' waitForInput) ('initialize-release' terminateEventLoop)...etc... subclasses: nil name: #InputEventPollingFetcher classPool: a Dictionary(#EventPollDelay->a Delay(10 msecs; 9 msecs remaining) )...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'Kernel-Processes' traitComposition: {} localSelectors: nil InputEventPollingFetcher class(Behavior)>>startUp: Receiver: InputEventPollingFetcher Arguments and temporary variables: resuming: false Receiver's instance variables: superclass: InputEventFetcher methodDict: a MethodDictionary(#terminateEventLoop->(InputEventPollingFetcher>>...etc... format: 136 instanceVariables: nil organization: ('events' waitForInput) ('initialize-release' terminateEventLoop)...etc... subclasses: nil name: #InputEventPollingFetcher classPool: a Dictionary(#EventPollDelay->a Delay(10 msecs; 9 msecs remaining) )...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'Kernel-Processes' traitComposition: {} localSelectors: nil [:name | | class | class := self at: name ifAbsent: []. class isNil ifTrue: [removals add: name] ifFalse: [class perform: startUpOrShutDown with: argument]] in SmalltalkImage>>send:toClassesNamedIn:with: Receiver: Smalltalk Arguments and temporary variables: startUpOrShutDown: #InputEventPollingFetcher argument: #startUp: removals: false name: an OrderedCollection() class: InputEventPollingFetcher Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil OrderedCollection>>do: Receiver: an OrderedCollection(#Delay #OSPlatform #DisplayScreen #Cursor #InputEventFetcher #Process...etc... Arguments and temporary variables: aBlock: [:name | | class | class := self at: name ifAbsent: []. class...etc... index: 60 Receiver's instance variables: array: #(nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil ni...etc... firstIndex: 36 lastIndex: 74 SmalltalkImage>>send:toClassesNamedIn:with: Receiver: Smalltalk Arguments and temporary variables: startUpOrShutDown: #startUp: startUpOrShutDownList: an OrderedCollection(#Delay #OSPlatform #DisplayScreen #...etc... argument: false removals: an OrderedCollection() Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil SmalltalkImage>>processStartUpList: Receiver: Smalltalk Arguments and temporary variables: resuming: false Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil [self processStartUpList: resuming. resuming ifTrue: [self recordStartupStamp]] in SmalltalkImage>>snapshot:andQuit: Receiver: Smalltalk Arguments and temporary variables: resuming: false Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil BlockClosure>>ensure: Receiver: [self processStartUpList: resuming. resuming ifTrue: [self recordStartupStamp]] Arguments and temporary variables: aBlock: [Default := self] complete: nil returnValue: nil Receiver's instance variables: outerContext: SmalltalkImage>>snapshot:andQuit: startpc: 185 numArgs: 0 MorphicUIManager(UIManager)>>boot:during: Receiver: a MorphicUIManager Arguments and temporary variables: bootingFromDisk: false aBlock: [self processStartUpList: resuming. resuming ifTrue: [self recordSta...etc... Receiver's instance variables: interactiveParser: nil SmalltalkImage>>snapshot:andQuit: Receiver: Smalltalk Arguments and temporary variables: save: true quit: false snapshotResult: false resuming: false Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil SmalltalkImage>>saveSession Receiver: Smalltalk Arguments and temporary variables: Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil [SmalltalkImage current saveSession] in AIDASite class>>imageSnapshot Receiver: AIDASite Arguments and temporary variables: Receiver's instance variables: superclass: SwazooSite methodDict: a MethodDictionary(size 203) format: 156 instanceVariables: #('style' 'settings' 'systemServices' 'userServices' 'timest...etc... organization: ('private-serving' activityAnnouncers addAllowHeaderTo: addDontCa...etc... subclasses: nil name: #AIDASite classPool: a Dictionary(#Default->an AIDASite #Dialect->#Pharo #HourlySnapshot-...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'Aida-Core' traitComposition: {} localSelectors: nil Time class>>millisecondsToRun: Receiver: Time Arguments and temporary variables: timedBlock: [SmalltalkImage current saveSession] initialMilliseconds: 155447683 Receiver's instance variables: superclass: Magnitude methodDict: a MethodDictionary(#<->(Time>>#< "a CompiledMethod(736624640)") #=-...etc... format: 134 instanceVariables: #('seconds' 'nanos') organization: ('ansi protocol' < = duration hash hour hour12 hour24 meridianAbb...etc... subclasses: nil name: #Time classPool: nil sharedPools: an OrderedCollection(ChronologyConstants) environment: a SystemDictionary(lots of globals) category: #'Kernel-Chronology' traitComposition: nil localSelectors: nil AIDASite class>>imageSnapshot Receiver: AIDASite Arguments and temporary variables: elapsed: nil Receiver's instance variables: superclass: SwazooSite methodDict: a MethodDictionary(size 203) format: 156 instanceVariables: #('style' 'settings' 'systemServices' 'userServices' 'timest...etc... organization: ('private-serving' activityAnnouncers addAllowHeaderTo: addDontCa...etc... subclasses: nil name: #AIDASite classPool: a Dictionary(#Default->an AIDASite #Dialect->#Pharo #HourlySnapshot-...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'Aida-Core' traitComposition: {} localSelectors: nil [AIDASite preImageSnapshot; imageSnapshot] in AIDASite>>initHourlySnapshot Receiver: an AIDASite Arguments and temporary variables: Receiver's instance variables: enabled: true uriPattern: an OrderedCollection(a SiteIdentifier) parent: a ServerRootComposite children: an OrderedCollection() name: 'aidademo' serving: true style: a WasteStyle settings: a Dictionary(#afterLogin->#lastPage #contextProcesses->false #countin...etc... systemServices: a Dictionary(#Admin->a WebAdmin #Authenticator->a DefaultAuthen...etc... userServices: a Dictionary(#Blog->a Blog #Repository->a WasteRepository #SiteCo...etc... timestamps: an IdentityDictionary(#Created->3491250844 #LastRequest->3494848717...etc... counters: an IdentityDictionary(#NewVisitors->a WebCounter #NotFound->a WebCoun...etc... other: a Dictionary(#activityAnnouncers->a Dictionary() ) [self block value] in WebScheduledEvent>>run Receiver: a WebScheduledEvent Arguments and temporary variables: Receiver's instance variables: parent: a WebScheduler timestamp: a SpTimestamp period: #hour->0 method: nil object: nil block: [AIDASite preImageSnapshot; imageSnapshot] [self value. Processor terminateActive] in BlockClosure>>newProcess Receiver: [self block value] Arguments and temporary variables: Receiver's instance variables: outerContext: WebScheduledEvent>>run startpc: 78 numArgs: 0 --- The full stack --- SmalltalkImage(Object)>>error: SmalltalkImage>>maxExternalSemaphores: ExternalSemaphoreTable class>>freedSlotsIn:ratherThanIncreaseSizeTo: ExternalSemaphoreTable class>>collectionBasedOn:withRoomFor: ExternalSemaphoreTable class>>safelyRegisterExternalObject: [self safelyRegisterExternalObject: anObject] in ExternalSemaphoreTable class>>registerExternalObject: [caught := true. self wait. blockValue := mutuallyExcludedBlock value] in Semaphore>>critical: BlockClosure>>ensure: Semaphore>>critical: ExternalSemaphoreTable class>>registerExternalObject: SmalltalkImage>>registerExternalObject: InputEventPollingFetcher(InputEventFetcher)>>startUp InputEventPollingFetcher class(InputEventFetcher class)>>startUp InputEventPollingFetcher class(Behavior)>>startUp: [:name | | class | class := self at: name ifAbsent: []. class isNil ifTrue: [removals add: name] ifFalse: [class perform: startUpOrShutDown with: argument]] in SmalltalkImage>>send:toClassesNamedIn:with: OrderedCollection>>do: SmalltalkImage>>send:toClassesNamedIn:with: SmalltalkImage>>processStartUpList: [self processStartUpList: resuming. resuming ifTrue: [self recordStartupStamp]] in SmalltalkImage>>snapshot:andQuit: BlockClosure>>ensure: MorphicUIManager(UIManager)>>boot:during: SmalltalkImage>>snapshot:andQuit: SmalltalkImage>>saveSession [SmalltalkImage current saveSession] in AIDASite class>>imageSnapshot Time class>>millisecondsToRun: AIDASite class>>imageSnapshot [AIDASite preImageSnapshot; imageSnapshot] in AIDASite>>initHourlySnapshot [self block value] in WebScheduledEvent>>run [self value. Processor terminateActive] in BlockClosure>>newProcess ------------------------------------------------------------ -- Janko Mivšek Aida/Web Smalltalk Web Application Server http://www.aidaweb.si
On Oct 5, 2011, at 1:18 AM, Schwab,Wilhelm K wrote:
Stable as a rock sounds good to me :)
The log you posted contains the string "Not enough space for external objects, set a larger size at startup!" Maybe a command-line switch to the vm will give you more memory and a way to get the image going? Good luck! I have rescued a few Pharo images, mostly ones that I damaged by running two IDEs on Linux :( As much as I don't like doing this, going to a working backup and recovering lost changes works fairly well.
Ian Bartholomew's Dolphin Goodies in general, and his Chunk Browser in particular, are excellent tools. The Chunk Browser does a wonderful job of sorting, filtering to most-recent chunks per entity (really useful), etc. Snoop is a great IDE inspector. Ghoul (Chris Uppal's work) creates a debugger-like view from Dolphin's crash dumps. Recent changes to Pharo's profiler are starting to create some of the feel of these excellent tools.
do you know a video showing these tools? especially snoop
Bill
________________________________________ From: pharo-project-bounces@lists.gforge.inria.fr [pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Janko Mivšek [janko.mivsek@eranova.si] Sent: Tuesday, October 04, 2011 2:57 PM To: Pharo-project@lists.gforge.inria.fr Subject: [Pharo-project] Too many semaphores, image blocked
Hi guys
I have nonstartable Pharo 1.3 image, is there any way to get it started?
This image was running all the time, being on the net directly (Aida based web development image) and snapshoting every hour.
The problem happens at such snapshot, raising Not enough space for external objects/too many semaphores error and block. After I killed it, snapshoted image is not startable anymore, more exactly: it starts in blank window and stays unresponsive.
Is this too many semaphores error related to too many open sockets problem we discussed not to long ago?
Any help greatly appreciated. Not to mention finding a bug and removing it forever, because Pharo should become stable as a rock, as VW for instance is :)
Best regards Janko
PharoDebug.log:
THERE_BE_DRAGONS_HERE Error: Not enough space for external objects, set a larger size at startup! 4 October 2011 4:00:01 am
VM: unix - i686 - linux-gnu - Croquet Closure Cog VM [CoInterpreter VMMaker-oscog.35] Image: Pharo1.3 [Latest update: #13299]
SmalltalkImage(Object)>>error: Receiver: Smalltalk Arguments and temporary variables: aString: 'Not enough space for external objects, set a larger size at startup!'...etc... Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil
SmalltalkImage>>maxExternalSemaphores: Receiver: Smalltalk Arguments and temporary variables: aSize: 520 inProduction: false Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil
ExternalSemaphoreTable class>>freedSlotsIn:ratherThanIncreaseSizeTo: Receiver: ExternalSemaphoreTable Arguments and temporary variables: externalObjects: an Array(a Semaphore() a Semaphore() a Semaphore() a Semaphore...etc... newSize: 520 needToGrow: false maxSize: 512 Receiver's instance variables: superclass: Object methodDict: a MethodDictionary() format: 2 instanceVariables: nil organization: ('as yet unclassified')
subclasses: nil name: #ExternalSemaphoreTable classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a Semaphore(...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'System-Support' traitComposition: {} localSelectors: nil
ExternalSemaphoreTable class>>collectionBasedOn:withRoomFor: Receiver: ExternalSemaphoreTable Arguments and temporary variables: externalObjects: an Array(a Semaphore() a Semaphore() a Semaphore() a Semaphore...etc... anObject: a Semaphore() newObjects: nil newSize: 520 Receiver's instance variables: superclass: Object methodDict: a MethodDictionary() format: 2 instanceVariables: nil organization: ('as yet unclassified')
subclasses: nil name: #ExternalSemaphoreTable classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a Semaphore(...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'System-Support' traitComposition: {} localSelectors: nil
ExternalSemaphoreTable class>>safelyRegisterExternalObject: Receiver: ExternalSemaphoreTable Arguments and temporary variables: anObject: a Semaphore() objects: an Array(a Semaphore() a Semaphore() a Semaphore() a Semaphore(a Proce...etc... firstEmptyIndex: nil obj: nil sz: nil newObjects: nil Receiver's instance variables: superclass: Object methodDict: a MethodDictionary() format: 2 instanceVariables: nil organization: ('as yet unclassified')
subclasses: nil name: #ExternalSemaphoreTable classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a Semaphore(...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'System-Support' traitComposition: {} localSelectors: nil
[self safelyRegisterExternalObject: anObject] in ExternalSemaphoreTable class>>registerExternalObject: Receiver: ExternalSemaphoreTable Arguments and temporary variables: anObject: a Semaphore() Receiver's instance variables: superclass: Object methodDict: a MethodDictionary() format: 2 instanceVariables: nil organization: ('as yet unclassified')
subclasses: nil name: #ExternalSemaphoreTable classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a Semaphore(...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'System-Support' traitComposition: {} localSelectors: nil
[caught := true. self wait. blockValue := mutuallyExcludedBlock value] in Semaphore>>critical: Receiver: a Semaphore() Arguments and temporary variables: <<error during printing> Receiver's instance variables: firstLink: nil lastLink: nil excessSignals: 0
BlockClosure>>ensure: Receiver: [caught := true. self wait. blockValue := mutuallyExcludedBlock value] Arguments and temporary variables: aBlock: [caught ifTrue: [self signal]] complete: nil returnValue: nil Receiver's instance variables: outerContext: Semaphore>>critical: startpc: 42 numArgs: 0
Semaphore>>critical: Receiver: a Semaphore() Arguments and temporary variables: <<error during printing> Receiver's instance variables: firstLink: nil lastLink: nil excessSignals: 0
ExternalSemaphoreTable class>>registerExternalObject: Receiver: ExternalSemaphoreTable Arguments and temporary variables: anObject: a Semaphore() Receiver's instance variables: superclass: Object methodDict: a MethodDictionary() format: 2 instanceVariables: nil organization: ('as yet unclassified')
subclasses: nil name: #ExternalSemaphoreTable classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a Semaphore(...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'System-Support' traitComposition: {} localSelectors: nil
SmalltalkImage>>registerExternalObject: Receiver: Smalltalk Arguments and temporary variables: anObject: a Semaphore() Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil
InputEventPollingFetcher(InputEventFetcher)>>startUp Receiver: an InputEventPollingFetcher Arguments and temporary variables:
Receiver's instance variables: eventHandlers: an OrderedCollection(an InputEventSensor an UserInterruptHandler...etc... fetcherProcess: a Process in [delaySemaphore wait] in Delay>>wait inputSemaphore: a Semaphore()
InputEventPollingFetcher class(InputEventFetcher class)>>startUp Receiver: InputEventPollingFetcher Arguments and temporary variables:
Receiver's instance variables: superclass: InputEventFetcher methodDict: a MethodDictionary(#terminateEventLoop->(InputEventPollingFetcher>>...etc... format: 136 instanceVariables: nil organization: ('events' waitForInput) ('initialize-release' terminateEventLoop)...etc... subclasses: nil name: #InputEventPollingFetcher classPool: a Dictionary(#EventPollDelay->a Delay(10 msecs; 9 msecs remaining) )...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'Kernel-Processes' traitComposition: {} localSelectors: nil
InputEventPollingFetcher class(Behavior)>>startUp: Receiver: InputEventPollingFetcher Arguments and temporary variables: resuming: false Receiver's instance variables: superclass: InputEventFetcher methodDict: a MethodDictionary(#terminateEventLoop->(InputEventPollingFetcher>>...etc... format: 136 instanceVariables: nil organization: ('events' waitForInput) ('initialize-release' terminateEventLoop)...etc... subclasses: nil name: #InputEventPollingFetcher classPool: a Dictionary(#EventPollDelay->a Delay(10 msecs; 9 msecs remaining) )...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'Kernel-Processes' traitComposition: {} localSelectors: nil
[:name | | class | class := self at: name ifAbsent: []. class isNil ifTrue: [removals add: name] ifFalse: [class perform: startUpOrShutDown with: argument]] in SmalltalkImage>>send:toClassesNamedIn:with: Receiver: Smalltalk Arguments and temporary variables: startUpOrShutDown: #InputEventPollingFetcher argument: #startUp: removals: false name: an OrderedCollection() class: InputEventPollingFetcher Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil
OrderedCollection>>do: Receiver: an OrderedCollection(#Delay #OSPlatform #DisplayScreen #Cursor #InputEventFetcher #Process...etc... Arguments and temporary variables: aBlock: [:name | | class | class := self at: name ifAbsent: []. class...etc... index: 60 Receiver's instance variables: array: #(nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil ni...etc... firstIndex: 36 lastIndex: 74
SmalltalkImage>>send:toClassesNamedIn:with: Receiver: Smalltalk Arguments and temporary variables: startUpOrShutDown: #startUp: startUpOrShutDownList: an OrderedCollection(#Delay #OSPlatform #DisplayScreen #...etc... argument: false removals: an OrderedCollection() Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil
SmalltalkImage>>processStartUpList: Receiver: Smalltalk Arguments and temporary variables: resuming: false Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil
[self processStartUpList: resuming. resuming ifTrue: [self recordStartupStamp]] in SmalltalkImage>>snapshot:andQuit: Receiver: Smalltalk Arguments and temporary variables: resuming: false Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil
BlockClosure>>ensure: Receiver: [self processStartUpList: resuming. resuming ifTrue: [self recordStartupStamp]] Arguments and temporary variables: aBlock: [Default := self] complete: nil returnValue: nil Receiver's instance variables: outerContext: SmalltalkImage>>snapshot:andQuit: startpc: 185 numArgs: 0
MorphicUIManager(UIManager)>>boot:during: Receiver: a MorphicUIManager Arguments and temporary variables: bootingFromDisk: false aBlock: [self processStartUpList: resuming. resuming ifTrue: [self recordSta...etc... Receiver's instance variables: interactiveParser: nil
SmalltalkImage>>snapshot:andQuit: Receiver: Smalltalk Arguments and temporary variables: save: true quit: false snapshotResult: false resuming: false Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil
SmalltalkImage>>saveSession Receiver: Smalltalk Arguments and temporary variables:
Receiver's instance variables: globals: a SystemDictionary(lots of globals) deferredStartupActions: nil
[SmalltalkImage current saveSession] in AIDASite class>>imageSnapshot Receiver: AIDASite Arguments and temporary variables:
Receiver's instance variables: superclass: SwazooSite methodDict: a MethodDictionary(size 203) format: 156 instanceVariables: #('style' 'settings' 'systemServices' 'userServices' 'timest...etc... organization: ('private-serving' activityAnnouncers addAllowHeaderTo: addDontCa...etc... subclasses: nil name: #AIDASite classPool: a Dictionary(#Default->an AIDASite #Dialect->#Pharo #HourlySnapshot-...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'Aida-Core' traitComposition: {} localSelectors: nil
Time class>>millisecondsToRun: Receiver: Time Arguments and temporary variables: timedBlock: [SmalltalkImage current saveSession] initialMilliseconds: 155447683 Receiver's instance variables: superclass: Magnitude methodDict: a MethodDictionary(#<->(Time>>#< "a CompiledMethod(736624640)") #=-...etc... format: 134 instanceVariables: #('seconds' 'nanos') organization: ('ansi protocol' < = duration hash hour hour12 hour24 meridianAbb...etc... subclasses: nil name: #Time classPool: nil sharedPools: an OrderedCollection(ChronologyConstants) environment: a SystemDictionary(lots of globals) category: #'Kernel-Chronology' traitComposition: nil localSelectors: nil
AIDASite class>>imageSnapshot Receiver: AIDASite Arguments and temporary variables: elapsed: nil Receiver's instance variables: superclass: SwazooSite methodDict: a MethodDictionary(size 203) format: 156 instanceVariables: #('style' 'settings' 'systemServices' 'userServices' 'timest...etc... organization: ('private-serving' activityAnnouncers addAllowHeaderTo: addDontCa...etc... subclasses: nil name: #AIDASite classPool: a Dictionary(#Default->an AIDASite #Dialect->#Pharo #HourlySnapshot-...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'Aida-Core' traitComposition: {} localSelectors: nil
[AIDASite preImageSnapshot; imageSnapshot] in AIDASite>>initHourlySnapshot Receiver: an AIDASite Arguments and temporary variables:
Receiver's instance variables: enabled: true uriPattern: an OrderedCollection(a SiteIdentifier) parent: a ServerRootComposite children: an OrderedCollection() name: 'aidademo' serving: true style: a WasteStyle settings: a Dictionary(#afterLogin->#lastPage #contextProcesses->false #countin...etc... systemServices: a Dictionary(#Admin->a WebAdmin #Authenticator->a DefaultAuthen...etc... userServices: a Dictionary(#Blog->a Blog #Repository->a WasteRepository #SiteCo...etc... timestamps: an IdentityDictionary(#Created->3491250844 #LastRequest->3494848717...etc... counters: an IdentityDictionary(#NewVisitors->a WebCounter #NotFound->a WebCoun...etc... other: a Dictionary(#activityAnnouncers->a Dictionary() )
[self block value] in WebScheduledEvent>>run Receiver: a WebScheduledEvent Arguments and temporary variables:
Receiver's instance variables: parent: a WebScheduler timestamp: a SpTimestamp period: #hour->0 method: nil object: nil block: [AIDASite preImageSnapshot; imageSnapshot]
[self value. Processor terminateActive] in BlockClosure>>newProcess Receiver: [self block value] Arguments and temporary variables:
Receiver's instance variables: outerContext: WebScheduledEvent>>run startpc: 78 numArgs: 0
--- The full stack --- SmalltalkImage(Object)>>error: SmalltalkImage>>maxExternalSemaphores: ExternalSemaphoreTable class>>freedSlotsIn:ratherThanIncreaseSizeTo: ExternalSemaphoreTable class>>collectionBasedOn:withRoomFor: ExternalSemaphoreTable class>>safelyRegisterExternalObject: [self safelyRegisterExternalObject: anObject] in ExternalSemaphoreTable class>>registerExternalObject: [caught := true. self wait. blockValue := mutuallyExcludedBlock value] in Semaphore>>critical: BlockClosure>>ensure: Semaphore>>critical: ExternalSemaphoreTable class>>registerExternalObject: SmalltalkImage>>registerExternalObject: InputEventPollingFetcher(InputEventFetcher)>>startUp InputEventPollingFetcher class(InputEventFetcher class)>>startUp InputEventPollingFetcher class(Behavior)>>startUp: [:name | | class | class := self at: name ifAbsent: []. class isNil ifTrue: [removals add: name] ifFalse: [class perform: startUpOrShutDown with: argument]] in SmalltalkImage>>send:toClassesNamedIn:with: OrderedCollection>>do: SmalltalkImage>>send:toClassesNamedIn:with: SmalltalkImage>>processStartUpList: [self processStartUpList: resuming. resuming ifTrue: [self recordStartupStamp]] in SmalltalkImage>>snapshot:andQuit: BlockClosure>>ensure: MorphicUIManager(UIManager)>>boot:during: SmalltalkImage>>snapshot:andQuit: SmalltalkImage>>saveSession [SmalltalkImage current saveSession] in AIDASite class>>imageSnapshot Time class>>millisecondsToRun: AIDASite class>>imageSnapshot [AIDASite preImageSnapshot; imageSnapshot] in AIDASite>>initHourlySnapshot [self block value] in WebScheduledEvent>>run [self value. Processor terminateActive] in BlockClosure>>newProcess ------------------------------------------------------------
-- Janko Mivšek Aida/Web Smalltalk Web Application Server http://www.aidaweb.si
On 05.10.2011 01:18, Schwab,Wilhelm K wrote:
Stable as a rock sounds good to me :)
The log you posted contains the string "Not enough space for external objects, set a larger size at startup!" Maybe a command-line switch to the vm will give you more memory and a way to get the image going? Good luck! I have rescued a few Pharo images, mostly ones that I damaged by running two IDEs on Linux :( As much as I don't like doing this, going to a working backup and recovering lost changes works fairly well. Smalltalk vm maxExternalSemaphoresSilently: aSize would be the line to include. If the script passed on a command line is higher in the startuplist than the InputEventSensor, it would get it working again.
Somehow I doubt it, and a more elaborate approach like what Sean had to do http://forum.world.st/Oops-I-put-a-halt-in-a-startup-method-td3800163.html would be necessary to recover. Cheers, Henry
Hi Henrik, S, Henrik Sperre Johansen piše:
On 05.10.2011 01:18, Schwab,Wilhelm K wrote:
The log you posted contains the string "Not enough space for external objects, set a larger size at startup!" Maybe a command-line switch to the vm will give you more memory and a way to get the image going?
Smalltalk vm maxExternalSemaphoresSilently: aSize would be the line to include. If the script passed on a command line is higher in the startuplist than the InputEventSensor, it would get it working again.
Ok, I'm back having time to look at this problem and I made a start.st script below, start the image with it, but get the same blank screen as you can see in attached screenshot. Ctrl or Alt . doesn't help. start.st Smalltalk vm maxExternalSemaphoresSilently: 3000 ./Contents/Linux/squeak ./Contents/Resources/waste.image start.st Any more idea? Otherwise I'll start to recover from changes, but starting this nonresponsive image would of course be faster solution:) Best regards Janko -- Janko Mivšek Aida/Web Smalltalk Web Application Server http://www.aidaweb.si
Hi Janko, you need to /save/ the image having applied Smalltalk vm maxExternalSemaphoresSilently: 3000. This must be set in the image at start-up, not after the image has loaded. i.e. the VM inspects the value saved in the image header and applies the value *before* the image starts running. 2011/10/7 Janko Mivšek <janko.mivsek@eranova.si>
Hi Henrik,
S, Henrik Sperre Johansen piše:
On 05.10.2011 01:18, Schwab,Wilhelm K wrote:
The log you posted contains the string "Not enough space for external objects, set a larger size at startup!" Maybe a command-line switch to the vm will give you more memory and a way to get the image going?
Smalltalk vm maxExternalSemaphoresSilently: aSize would be the line to include. If the script passed on a command line is higher in the startuplist than the InputEventSensor, it would get it working again.
Ok, I'm back having time to look at this problem and I made a start.st script below, start the image with it, but get the same blank screen as you can see in attached screenshot. Ctrl or Alt . doesn't help.
start.st Smalltalk vm maxExternalSemaphoresSilently: 3000
./Contents/Linux/squeak ./Contents/Resources/waste.image start.st
Any more idea? Otherwise I'll start to recover from changes, but starting this nonresponsive image would of course be faster solution:)
Best regards Janko
-- Janko Mivšek Aida/Web Smalltalk Web Application Server http://www.aidaweb.si
-- best, Eliot
I don't understand why this problem appear only recently, and if i remember before i never heard that people had a problems with too many open sockets (and consequently exceeding a semaphore table space). Is there something we changed in language? in VM? or is it purely because we are lagging behind the scale of projects which today running on pharo? :) On 7 October 2011 22:22, Eliot Miranda <eliot.miranda@gmail.com> wrote:
Hi Janko,   you need to /save/ the image having applied Smalltalk vm maxExternalSemaphoresSilently: 3000.  This must be set in the image at start-up, not after the image has loaded.  i.e. the VM inspects the value saved in the image header and applies the value *before* the image starts running.
2011/10/7 Janko Mivšek <janko.mivsek@eranova.si>
Hi Henrik,
S, Henrik Sperre Johansen piše:
On 05.10.2011 01:18, Schwab,Wilhelm K wrote:
The log you posted contains the string "Not enough space for external objects, set a larger size at startup!" Â Maybe a command-line switch to the vm will give you more memory and a way to get the image going?
Smalltalk vm maxExternalSemaphoresSilently: aSize  would be the line to include. If the script passed on a command line is higher in the startuplist than the InputEventSensor, it would get it working again.
Ok, I'm back having time to look at this problem and I made a start.st script below, start the image with it, but get the same blank screen as you can see in attached screenshot. Ctrl or Alt . doesn't help.
start.st Smalltalk vm maxExternalSemaphoresSilently: 3000
./Contents/Linux/squeak ./Contents/Resources/waste.image start.st
Any more idea? Otherwise I'll start to recover from changes, but starting this nonresponsive image would of course be faster solution:)
Best regards Janko
-- Janko Mivšek Aida/Web Smalltalk Web Application Server http://www.aidaweb.si
-- best, Eliot
-- Best regards, Igor Stasenko.
On Fri, Oct 7, 2011 at 1:30 PM, Igor Stasenko <siguctua@gmail.com> wrote:
I don't understand why this problem appear only recently, and if i remember before i never heard that people had a problems with too many open sockets (and consequently exceeding a semaphore table space).
Is there something we changed in language? in VM? or is it purely because we are lagging behind the scale of projects which today running on pharo? :)
In the VM. In Cog I implemented a thread-safe non-blocking signal external semaphore facility but I was too lazy to implement a thread-safe non-blocking growing facility. It seems simple to set the size at start-up. You choose a value large enough for your application, set it, save the image and you're done. Whereas implementing a non-blocking growing facility is tricky.
On 7 October 2011 22:22, Eliot Miranda <eliot.miranda@gmail.com> wrote:
Hi Janko, you need to /save/ the image having applied Smalltalk vm maxExternalSemaphoresSilently: 3000. This must be set in the image at start-up, not after the image has loaded. i.e. the VM inspects the value saved in the image header and applies the value *before* the image starts running.
2011/10/7 Janko Mivšek <janko.mivsek@eranova.si>
Hi Henrik,
S, Henrik Sperre Johansen piše:
On 05.10.2011 01:18, Schwab,Wilhelm K wrote:
The log you posted contains the string "Not enough space for external objects, set a larger size at startup!" Maybe a command-line switch to the vm will give you more memory and a way to get the image going?
Smalltalk vm maxExternalSemaphoresSilently: aSize would be the line
to
include. If the script passed on a command line is higher in the startuplist than the InputEventSensor, it would get it working again.
Ok, I'm back having time to look at this problem and I made a start.st script below, start the image with it, but get the same blank screen as you can see in attached screenshot. Ctrl or Alt . doesn't help.
start.st Smalltalk vm maxExternalSemaphoresSilently: 3000
./Contents/Linux/squeak ./Contents/Resources/waste.image start.st
Any more idea? Otherwise I'll start to recover from changes, but starting this nonresponsive image would of course be faster solution:)
Best regards Janko
-- Janko Mivšek Aida/Web Smalltalk Web Application Server http://www.aidaweb.si
-- best, Eliot
-- Best regards, Igor Stasenko.
-- best, Eliot
On 7 October 2011 23:38, Eliot Miranda <eliot.miranda@gmail.com> wrote:
On Fri, Oct 7, 2011 at 1:30 PM, Igor Stasenko <siguctua@gmail.com> wrote:
I don't understand why this problem appear only recently, and if i remember before i never heard that people had a problems with too many open sockets (and consequently exceeding a semaphore table space).
Is there something we changed in language? in VM? or is it purely because we are lagging behind the scale of projects which today running on pharo? :)
In the VM. Â In Cog I implemented a thread-safe non-blocking signal external semaphore facility but I was too lazy to implement a thread-safe non-blocking growing facility. Â It seems simple to set the size at start-up. Â You choose a value large enough for your application, set it, save the image and you're done. Â Whereas implementing a non-blocking growing facility is tricky.
Hmm, that confuses me even more. In Squeak VM there is a single hard limit for SemaphoresToSignalA, and SemaphoresToSignalB tables - 500 (i dont remember correct name of these tables). In these tables, upon receiving a signal, it storing the index of semaphore to signal, when you using signalSemaphore() function. Then at interrupt time, these tables are flushed by signaling corresponding semaphores which are stored in external semaphore table under corresponding index. This means that between two interrupts you cannot signal more than 500 semaphores. And given that time between interrupts are pretty small (about 1 ms) i hardly beleive that you can put such high load on server to receive more than 500 signals in 1 ms time period. So the problem is not here, apparently, the problem is in size of external semaphore table , where semaphore objects are stored, which growth can be controlled completely by image size (this is a simple array), because signaling machinery operating only with indexes in this table but not with actual semaphores. Now, since i don't know well how much changes you did in signaling code in Cog. I only suspect that your conclusion that your changes might cause the problems are wrong.
-- best, Eliot
-- Best regards, Igor Stasenko.
On Sat, Oct 8, 2011 at 12:13 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 7 October 2011 23:38, Eliot Miranda <eliot.miranda@gmail.com> wrote:
On Fri, Oct 7, 2011 at 1:30 PM, Igor Stasenko <siguctua@gmail.com>
wrote:
I don't understand why this problem appear only recently, and if i remember before i never heard that people had a problems with too many open sockets (and consequently exceeding a semaphore table space).
Is there something we changed in language? in VM? or is it purely because we are lagging behind the scale of projects which today running on pharo? :)
In the VM. In Cog I implemented a thread-safe non-blocking signal external semaphore facility but I was too lazy to implement a thread-safe non-blocking growing facility. It seems simple to set the size at start-up. You choose a value large enough for your application, set it, save the image and you're done. Whereas implementing a non-blocking growing facility is tricky.
Hmm, that confuses me even more.
In Squeak VM there is a single hard limit for SemaphoresToSignalA, and SemaphoresToSignalB tables - 500 (i dont remember correct name of these tables).
In these tables, upon receiving a signal, it storing the index of semaphore to signal, when you using signalSemaphore() function. Then at interrupt time, these tables are flushed by signaling corresponding semaphores which are stored in external semaphore table under corresponding index. This means that between two interrupts you cannot signal more than 500 semaphores. And given that time between interrupts are pretty small (about 1 ms) i hardly beleive that you can put such high load on server to receive more than 500 signals in 1 ms time period.
That's not quite how it works. Each location in the VM's table maps to one semaphore in the image (each location remembers the number of signals to send to each external semaphore). So it's not the number of signals, it's the number of external semaphores in use. So the problem is not here, apparently, the problem is in size of
external semaphore table , where semaphore objects are stored, which growth can be controlled completely by image size (this is a simple array), because signaling machinery operating only with indexes in this table but not with actual semaphores.
Now, since i don't know well how much changes you did in signaling code in Cog. I only suspect that your conclusion that your changes might cause the problems are wrong.
Could be. In any case, a command-line parameter does not harm :)
-- best, Eliot
-- Best regards, Igor Stasenko.
-- best, Eliot
Hi guys, I'm measuring how my image is breathing through the time and what is interesting is how nr. of Semaphore instances is variating through the time. Every hour just before snapshot I report nr of instances, see last 10 hours: ** image state: 0 HTTPCommections 4 Sockets 22 Processes 259 Semaphores ** image state: 0 HTTPCommections 4 Sockets 22 Processes 274 Semaphores ** image state: 0 HTTPCommections 4 Sockets 22 Processes 312 Semaphores ** image state: 0 HTTPCommections 4 Sockets 22 Processes 356 Semaphores ** image state: 0 HTTPCommections 4 Sockets 22 Processes 346 Semaphores ** image state: 0 HTTPCommections 4 Sockets 22 Processes 141 Semaphores ** image state: 0 HTTPCommections 4 Sockets 22 Processes 310 Semaphores ** image state: 0 HTTPCommections 4 Sockets 26 Processes 79 Semaphores ** image state: 0 HTTPCommections 4 Sockets 20 Processes 300 Semaphores Janko S, Eliot Miranda piše:
On Sat, Oct 8, 2011 at 12:13 PM, Igor Stasenko <siguctua@gmail.com <mailto:siguctua@gmail.com>> wrote:
On 7 October 2011 23:38, Eliot Miranda <eliot.miranda@gmail.com <mailto:eliot.miranda@gmail.com>> wrote: > > > On Fri, Oct 7, 2011 at 1:30 PM, Igor Stasenko <siguctua@gmail.com <mailto:siguctua@gmail.com>> wrote: >> >> I don't understand why this problem appear only recently, and if i >> remember before i never heard that people >> had a problems with too many open sockets (and consequently exceeding >> a semaphore table space). >> >> Is there something we changed in language? in VM? or is it purely >> because we are lagging behind the scale of >> projects which today running on pharo? :) > > In the VM. In Cog I implemented a thread-safe non-blocking signal external > semaphore facility but I was too lazy to implement a thread-safe > non-blocking growing facility. It seems simple to set the size at start-up. > You choose a value large enough for your application, set it, save the > image and you're done. Whereas implementing a non-blocking growing facility > is tricky. >> Hmm, that confuses me even more.
In Squeak VM there is a single hard limit for SemaphoresToSignalA, and SemaphoresToSignalB tables - 500 (i dont remember correct name of these tables).
In these tables, upon receiving a signal, it storing the index of semaphore to signal, when you using signalSemaphore() function. Then at interrupt time, these tables are flushed by signaling corresponding semaphores which are stored in external semaphore table under corresponding index. This means that between two interrupts you cannot signal more than 500 semaphores. And given that time between interrupts are pretty small (about 1 ms) i hardly beleive that you can put such high load on server to receive more than 500 signals in 1 ms time period.
That's not quite how it works. Each location in the VM's table maps to one semaphore in the image (each location remembers the number of signals to send to each external semaphore). So it's not the number of signals, it's the number of external semaphores in use.
So the problem is not here, apparently, the problem is in size of external semaphore table , where semaphore objects are stored, which growth can be controlled completely by image size (this is a simple array), because signaling machinery operating only with indexes in this table but not with actual semaphores.
Now, since i don't know well how much changes you did in signaling code in Cog. I only suspect that your conclusion that your changes might cause the problems are wrong.
Could be. In any case, a command-line parameter does not harm :)
> > -- > best, > Eliot >
-- Best regards, Igor Stasenko.
-- best, Eliot
-- Janko Mivšek Svetovalec za informatiko Eranova d.o.o. Ljubljana, Slovenija www.eranova.si tel: 01 514 22 55 faks: 01 514 22 56 gsm: 031 674 565
2011/10/20 Janko Mivšek <janko.mivsek@eranova.si>:
Hi guys,
I'm measuring how my image is breathing through the time and what is interesting is how nr. of Semaphore instances is variating through the time. Every hour just before snapshot I report nr of instances, see last 10 hours:
** image state:  0 HTTPCommections  4 Sockets  22 Processes  259 Semaphores
** image state:  0 HTTPCommections  4 Sockets  22 Processes  274 Semaphores
** image state:  0 HTTPCommections  4 Sockets  22 Processes  312 Semaphores
** image state:  0 HTTPCommections  4 Sockets  22 Processes  356 Semaphores
** image state:  0 HTTPCommections  4 Sockets  22 Processes  346 Semaphores
** image state:  0 HTTPCommections  4 Sockets  22 Processes  141 Semaphores
** image state:  0 HTTPCommections  4 Sockets  22 Processes  310 Semaphores
** image state:  0 HTTPCommections  4 Sockets  26 Processes  79 Semaphores
** image state:  0 HTTPCommections  4 Sockets  20 Processes  300 Semaphores
Well, the number of semaphores tells nothing because not all of them serve for sockets. There are 3 semaphores per socket. So, if you have 4 sockets, there should be 12 external objects. Of course not counting others, which is there for other purposes. Could you add following to report: Socket registry size StandardFileStream registry size (ExternalSemaphoreTable unprotectedExternalObjects reject: #isNil) size
Janko
S, Eliot Miranda piše:
On Sat, Oct 8, 2011 at 12:13 PM, Igor Stasenko <siguctua@gmail.com <mailto:siguctua@gmail.com>> wrote:
  On 7 October 2011 23:38, Eliot Miranda <eliot.miranda@gmail.com   <mailto:eliot.miranda@gmail.com>> wrote:   >   >   > On Fri, Oct 7, 2011 at 1:30 PM, Igor Stasenko <siguctua@gmail.com   <mailto:siguctua@gmail.com>> wrote:   >>   >> I don't understand why this problem appear only recently, and if i   >> remember before i never heard that people   >> had a problems with too many open sockets (and consequently exceeding   >> a semaphore table space).   >>   >> Is there something we changed in language? in VM? or is it purely   >> because we are lagging behind the scale of   >> projects which today running on pharo? :)   >   > In the VM.  In Cog I implemented a thread-safe non-blocking signal   external   > semaphore facility but I was too lazy to implement a thread-safe   > non-blocking growing facility.  It seems simple to set the size at   start-up.   >  You choose a value large enough for your application, set it,   save the   > image and you're done.  Whereas implementing a non-blocking   growing facility   > is tricky.   >>   Hmm, that confuses me even more.
  In Squeak VM there is a single hard limit for SemaphoresToSignalA, and   SemaphoresToSignalB   tables - 500 (i dont remember correct name of these tables).
  In these tables, upon receiving a signal, it storing the index of   semaphore to signal, when you using signalSemaphore() function.   Then at interrupt time, these tables are flushed by signaling   corresponding semaphores which are stored in external semaphore table   under corresponding index.   This means that between two interrupts you cannot signal more than 500   semaphores. And given that time between interrupts are pretty small   (about 1 ms) i hardly beleive that you can put such high load on   server to receive more than 500 signals in 1 ms time period.
That's not quite how it works. Â Each location in the VM's table maps to one semaphore in the image (each location remembers the number of signals to send to each external semaphore). Â So it's not the number of signals, it's the number of external semaphores in use.
  So the problem is not here, apparently, the problem is in size of   external semaphore table , where semaphore objects are stored,   which growth can be controlled completely by image size (this is a   simple array), because signaling machinery operating only with indexes   in this table but not with actual semaphores.
  Now, since i don't know well how much changes you did in signaling   code in Cog. I only suspect that your conclusion that your changes   might   cause the problems are wrong.
Could be. Â In any case, a command-line parameter does not harm :)
  >   > --   > best,   > Eliot   >
  --   Best regards,   Igor Stasenko.
-- best, Eliot
-- Janko Mivšek Svetovalec za informatiko Eranova d.o.o. Ljubljana, Slovenija www.eranova.si tel:  01 514 22 55 faks: 01 514 22 56 gsm: 031 674 565
-- Best regards, Igor Stasenko.
On 20.10.2011 15:30, Igor Stasenko wrote:
2011/10/20 Janko Mivšek<janko.mivsek@eranova.si>:
Hi guys,
I'm measuring how my image is breathing through the time and what is interesting is how nr. of Semaphore instances is variating through the time. Every hour just before snapshot I report nr of instances, see last 10 hours:
** image state: 0 HTTPCommections 4 Sockets 22 Processes 259 Semaphores
** image state: 0 HTTPCommections 4 Sockets 22 Processes 274 Semaphores
** image state: 0 HTTPCommections 4 Sockets 22 Processes 312 Semaphores
** image state: 0 HTTPCommections 4 Sockets 22 Processes 356 Semaphores
** image state: 0 HTTPCommections 4 Sockets 22 Processes 346 Semaphores
** image state: 0 HTTPCommections 4 Sockets 22 Processes 141 Semaphores
** image state: 0 HTTPCommections 4 Sockets 22 Processes 310 Semaphores
** image state: 0 HTTPCommections 4 Sockets 26 Processes 79 Semaphores
** image state: 0 HTTPCommections 4 Sockets 20 Processes 300 Semaphores
Well, the number of semaphores tells nothing because not all of them serve for sockets.
There are 3 semaphores per socket. So, if you have 4 sockets, there should be 12 external objects. Of course not counting others, which is there for other purposes.
Could you add following to report:
Socket registry size StandardFileStream registry size (ExternalSemaphoreTable unprotectedExternalObjects reject: #isNil) size There's something wrong with startup/shutdown list, at least with my Pharo 1.4 image... The InputEventFetcher's shutdown/startup methods are called twice when you save, thus you end up with an extra semaphore in the table whenever you save.
Janko just runs into the consequences of this faster as he saves frequently. Cheers, Henry View transcript when saving with InputEventFetcher doing logging like: shutDown self crLog: 'Shutdown called!'. self terminateEventLoop. inputSemaphore ifNotNil: [|pre post| pre := (ExternalSemaphoreTable unprotectedExternalObjects select: [:each | each notNil]) size. Smalltalk unregisterExternalObject: inputSemaphore. post := (ExternalSemaphoreTable unprotectedExternalObjects select: [:each | each notNil]) size. pre = post ifTrue: [self logCr: 'Tried unregistering inputSemaphore, but still there!']] startUp self crLog: 'Startup called!'. inputSemaphore := Semaphore new. self primSetInputSemaphore: (Smalltalk registerExternalObject: inputSemaphore). inputSemaphore initSignals. self installEventLoop
Hi guys, It seems that we found the culpit, according to Igor advice I'm now measuring more and yes, ExternalSemaphoreTable is growing by one every snapshot, as Henrik already found out. Few latest hourly reports: 0 HTTPCommections 5 Sockets 28 Processes 108 Semaphores 1 Socket registry 2 StandardFileStream registry 49 ExternalSemaphoreTable 0 HTTPCommections 5 Sockets 28 Processes 109 Semaphores 1 Socket registry 2 StandardFileStream registry 50 ExternalSemaphoreTable 0 HTTPCommections 5 Sockets 28 Processes 110 Semaphores 1 Socket registry 2 StandardFileStream registry 51 ExternalSemaphoreTable 0 HTTPCommections 5 Sockets 28 Processes 111 Semaphores 1 Socket registry 2 StandardFileStream registry 52 ExternalSemaphoreTable S, Igor Stasenko piše:
2011/10/20 Janko Mivšek <janko.mivsek@eranova.si>:
Hi guys,
I'm measuring how my image is breathing through the time and what is interesting is how nr. of Semaphore instances is variating through the time. Every hour just before snapshot I report nr of instances, see last 10 hours:
** image state: 0 HTTPCommections 4 Sockets 20 Processes 300 Semaphores
Well, the number of semaphores tells nothing because not all of them serve for sockets.
There are 3 semaphores per socket. So, if you have 4 sockets, there should be 12 external objects. Of course not counting others, which is there for other purposes.
Could you add following to report:
Socket registry size StandardFileStream registry size (ExternalSemaphoreTable unprotectedExternalObjects reject: #isNil) size
Hi guys, S, Igor Stasenko piše:
I don't understand why this problem appear only recently, and if i remember before i never heard that people had a problems with too many open sockets (and consequently exceeding a semaphore table space).
It seems it appears to me mostly and reason probably is that I run Swazoo directly on the public internet, as I'm used for years on VisualWorks. That's why all dormant Pharo socket problems are now exposed, IMHO. Public internet is a wild place and web server needs to be robust to tackle it. If you run behind Apache, you are safe, if you run directly, both web server and sockets must work perfectly. That's why I suppose the socket finalization problem is probably the culpit here, as we discussed in July: Sockets don't close, 100% CPU http://forum.world.st/Sockets-don-t-close-100-CPU-tt3648046.html Best regards Janko
Is there something we changed in language? in VM? or is it purely because we are lagging behind the scale of projects which today running on pharo? :)
On 7 October 2011 22:22, Eliot Miranda <eliot.miranda@gmail.com> wrote:
Hi Janko, you need to /save/ the image having applied Smalltalk vm maxExternalSemaphoresSilently: 3000. This must be set in the image at start-up, not after the image has loaded. i.e. the VM inspects the value saved in the image header and applies the value *before* the image starts running.
2011/10/7 Janko Mivšek <janko.mivsek@eranova.si>
Hi Henrik,
S, Henrik Sperre Johansen piše:
On 05.10.2011 01:18, Schwab,Wilhelm K wrote:
The log you posted contains the string "Not enough space for external objects, set a larger size at startup!" Maybe a command-line switch to the vm will give you more memory and a way to get the image going?
Smalltalk vm maxExternalSemaphoresSilently: aSize would be the line to include. If the script passed on a command line is higher in the startuplist than the InputEventSensor, it would get it working again.
Ok, I'm back having time to look at this problem and I made a start.st script below, start the image with it, but get the same blank screen as you can see in attached screenshot. Ctrl or Alt . doesn't help.
start.st Smalltalk vm maxExternalSemaphoresSilently: 3000
./Contents/Linux/squeak ./Contents/Resources/waste.image start.st
Any more idea? Otherwise I'll start to recover from changes, but starting this nonresponsive image would of course be faster solution:)
Best regards Janko
-- Janko Mivšek Aida/Web Smalltalk Web Application Server http://www.aidaweb.si
-- best, Eliot
-- Janko Mivšek Svetovalec za informatiko Eranova d.o.o. Ljubljana, Slovenija www.eranova.si tel: 01 514 22 55 faks: 01 514 22 56 gsm: 031 674 565
Eliot, Is there a way to save the image given that it is non-responsive? Otherwise (and this could be "how it is") one would have to apply the fix before having the problem. Just curious. Should we all periodically take a semaphore head count in our images? I try to leave a reasonable trail of backups of working images just in case I do something stupid; a little uncertainty can motivate cautious behavior... Bill ________________________________________ From: pharo-project-bounces@lists.gforge.inria.fr [pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Eliot Miranda [eliot.miranda@gmail.com] Sent: Friday, October 07, 2011 4:22 PM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] Too many semaphores, image blocked Hi Janko, you need to /save/ the image having applied Smalltalk vm maxExternalSemaphoresSilently: 3000. This must be set in the image at start-up, not after the image has loaded. i.e. the VM inspects the value saved in the image header and applies the value *before* the image starts running. 2011/10/7 Janko Mivšek <janko.mivsek@eranova.si<mailto:janko.mivsek@eranova.si>> Hi Henrik, S, Henrik Sperre Johansen piše:
On 05.10.2011 01:18, Schwab,Wilhelm K wrote:
The log you posted contains the string "Not enough space for external objects, set a larger size at startup!" Maybe a command-line switch to the vm will give you more memory and a way to get the image going?
Smalltalk vm maxExternalSemaphoresSilently: aSize would be the line to include. If the script passed on a command line is higher in the startuplist than the InputEventSensor, it would get it working again.
Ok, I'm back having time to look at this problem and I made a start.st<http://start.st> script below, start the image with it, but get the same blank screen as you can see in attached screenshot. Ctrl or Alt . doesn't help. start.st<http://start.st> Smalltalk vm maxExternalSemaphoresSilently: 3000 ./Contents/Linux/squeak ./Contents/Resources/waste.image start.st<http://start.st> Any more idea? Otherwise I'll start to recover from changes, but starting this nonresponsive image would of course be faster solution:) Best regards Janko -- Janko Mivšek Aida/Web Smalltalk Web Application Server http://www.aidaweb.si -- best, Eliot
On Fri, Oct 7, 2011 at 2:31 PM, Schwab,Wilhelm K <bschwab@anest.ufl.edu>wrote:
Eliot,
Is there a way to save the image given that it is non-responsive? Otherwise (and this could be "how it is") one would have to apply the fix before having the problem. Just curious. Should we all periodically take a semaphore head count in our images?
I try to leave a reasonable trail of backups of working images just in case I do something stupid; a little uncertainty can motivate cautious behavior...
Hmm... I think what's needed is a command-line parameter. Give me a few...
Bill
________________________________________ From: pharo-project-bounces@lists.gforge.inria.fr [ pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Eliot Miranda [ eliot.miranda@gmail.com] Sent: Friday, October 07, 2011 4:22 PM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] Too many semaphores, image blocked
Hi Janko,
you need to /save/ the image having applied Smalltalk vm maxExternalSemaphoresSilently: 3000. This must be set in the image at start-up, not after the image has loaded. i.e. the VM inspects the value saved in the image header and applies the value *before* the image starts running.
2011/10/7 Janko Mivšek <janko.mivsek@eranova.si<mailto: janko.mivsek@eranova.si>> Hi Henrik,
S, Henrik Sperre Johansen piše:
On 05.10.2011 01:18, Schwab,Wilhelm K wrote:
The log you posted contains the string "Not enough space for external objects, set a larger size at startup!" Maybe a command-line switch to the vm will give you more memory and a way to get the image going?
Smalltalk vm maxExternalSemaphoresSilently: aSize would be the line to include. If the script passed on a command line is higher in the startuplist than the InputEventSensor, it would get it working again.
Ok, I'm back having time to look at this problem and I made a start.st< http://start.st> script below, start the image with it, but get the same blank screen as you can see in attached screenshot. Ctrl or Alt . doesn't help.
start.st<http://start.st> Smalltalk vm maxExternalSemaphoresSilently: 3000
./Contents/Linux/squeak ./Contents/Resources/waste.image start.st< http://start.st>
Any more idea? Otherwise I'll start to recover from changes, but starting this nonresponsive image would of course be faster solution:)
Best regards Janko
-- Janko Mivšek Aida/Web Smalltalk Web Application Server http://www.aidaweb.si
-- best, Eliot
-- best, Eliot
Eliot, A few (????!!!!!!!) :) Take your time, and THANKS. Bill ________________________________________ From: pharo-project-bounces@lists.gforge.inria.fr [pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Eliot Miranda [eliot.miranda@gmail.com] Sent: Friday, October 07, 2011 5:43 PM To: Pharo-project@lists.gforge.inria.fr Cc: Squeak Virtual Machine Development Discussion; The general-purpose Squeak developers list Subject: Re: [Pharo-project] Too many semaphores, image blocked On Fri, Oct 7, 2011 at 2:31 PM, Schwab,Wilhelm K <bschwab@anest.ufl.edu<mailto:bschwab@anest.ufl.edu>> wrote: Eliot, Is there a way to save the image given that it is non-responsive? Otherwise (and this could be "how it is") one would have to apply the fix before having the problem. Just curious. Should we all periodically take a semaphore head count in our images? I try to leave a reasonable trail of backups of working images just in case I do something stupid; a little uncertainty can motivate cautious behavior... Hmm... I think what's needed is a command-line parameter. Give me a few... Bill ________________________________________ From: pharo-project-bounces@lists.gforge.inria.fr<mailto:pharo-project-bounces@lists.gforge.inria.fr> [pharo-project-bounces@lists.gforge.inria.fr<mailto:pharo-project-bounces@lists.gforge.inria.fr>] On Behalf Of Eliot Miranda [eliot.miranda@gmail.com<mailto:eliot.miranda@gmail.com>] Sent: Friday, October 07, 2011 4:22 PM To: Pharo-project@lists.gforge.inria.fr<mailto:Pharo-project@lists.gforge.inria.fr> Subject: Re: [Pharo-project] Too many semaphores, image blocked Hi Janko, you need to /save/ the image having applied Smalltalk vm maxExternalSemaphoresSilently: 3000. This must be set in the image at start-up, not after the image has loaded. i.e. the VM inspects the value saved in the image header and applies the value *before* the image starts running. 2011/10/7 Janko Mivšek <janko.mivsek@eranova.si<mailto:janko.mivsek@eranova.si><mailto:janko.mivsek@eranova.si<mailto:janko.mivsek@eranova.si>>> Hi Henrik, S, Henrik Sperre Johansen piše:
On 05.10.2011 01:18, Schwab,Wilhelm K wrote:
The log you posted contains the string "Not enough space for external objects, set a larger size at startup!" Maybe a command-line switch to the vm will give you more memory and a way to get the image going?
Smalltalk vm maxExternalSemaphoresSilently: aSize would be the line to include. If the script passed on a command line is higher in the startuplist than the InputEventSensor, it would get it working again.
Ok, I'm back having time to look at this problem and I made a start.st<http://start.st><http://start.st> script below, start the image with it, but get the same blank screen as you can see in attached screenshot. Ctrl or Alt . doesn't help. start.st<http://start.st><http://start.st> Smalltalk vm maxExternalSemaphoresSilently: 3000 ./Contents/Linux/squeak ./Contents/Resources/waste.image start.st<http://start.st><http://start.st> Any more idea? Otherwise I'll start to recover from changes, but starting this nonresponsive image would of course be faster solution:) Best regards Janko -- Janko Mivšek Aida/Web Smalltalk Web Application Server http://www.aidaweb.si -- best, Eliot -- best, Eliot
For an immediate workaround, you can probably just open the image with an interpreter VM, change the parameter, save and restart on Cog. Dave On Fri, Oct 07, 2011 at 02:43:16PM -0700, Eliot Miranda wrote:
On Fri, Oct 7, 2011 at 2:31 PM, Schwab,Wilhelm K <bschwab@anest.ufl.edu>wrote:
Eliot,
Is there a way to save the image given that it is non-responsive? Otherwise (and this could be "how it is") one would have to apply the fix before having the problem. Just curious. Should we all periodically take a semaphore head count in our images?
I try to leave a reasonable trail of backups of working images just in case I do something stupid; a little uncertainty can motivate cautious behavior...
Hmm... I think what's needed is a command-line parameter. Give me a few...
Bill
________________________________________ From: pharo-project-bounces@lists.gforge.inria.fr [ pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Eliot Miranda [ eliot.miranda@gmail.com] Sent: Friday, October 07, 2011 4:22 PM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] Too many semaphores, image blocked
Hi Janko,
you need to /save/ the image having applied Smalltalk vm maxExternalSemaphoresSilently: 3000. This must be set in the image at start-up, not after the image has loaded. i.e. the VM inspects the value saved in the image header and applies the value *before* the image starts running.
2011/10/7 Janko Miv??ek <janko.mivsek@eranova.si<mailto: janko.mivsek@eranova.si>> Hi Henrik,
S, Henrik Sperre Johansen pi??e:
On 05.10.2011 01:18, Schwab,Wilhelm K wrote:
The log you posted contains the string "Not enough space for external objects, set a larger size at startup!" Maybe a command-line switch to the vm will give you more memory and a way to get the image going?
Smalltalk vm maxExternalSemaphoresSilently: aSize would be the line to include. If the script passed on a command line is higher in the startuplist than the InputEventSensor, it would get it working again.
Ok, I'm back having time to look at this problem and I made a start.st< http://start.st> script below, start the image with it, but get the same blank screen as you can see in attached screenshot. Ctrl or Alt . doesn't help.
start.st<http://start.st> Smalltalk vm maxExternalSemaphoresSilently: 3000
./Contents/Linux/squeak ./Contents/Resources/waste.image start.st< http://start.st>
Any more idea? Otherwise I'll start to recover from changes, but starting this nonresponsive image would of course be faster solution:)
Best regards Janko
-- Janko Miv??ek Aida/Web Smalltalk Web Application Server http://www.aidaweb.si
-- best, Eliot
-- best, Eliot
participants (8)
-
btc@openInWorld.com -
David T. Lewis -
Eliot Miranda -
Henrik Sperre Johansen -
Igor Stasenko -
Janko Mivšek -
Schwab,Wilhelm K -
Stéphane Ducasse