Hi!
today I started to look at of why my benchmark in the CI stalled/didn't
complete and I see three separate issues and wonder how to address them
properly? I have a truncated log attached
Issues:
* In my CI script I disable Deprecation warnings but this has no influence on
Deprecation>>#transform. This means that it will try to write the changes?! To
scale we start the same image multiple times.
* Somehow writing the log fails (and the TCP connection fails the same time?!)
with a primitive error.
* Errors "recurse". So while we try to exit the image it seems to fail the same
way and tries again.. which fails again.. which fails again..at some point no
new context will be allocated.
Solutions?
* Prevent new errors in NonInteractiveUIManager>>#unhandledErrorDefaultAction:?
* Check in >>#transform if transformation is disabled and then return early?
* ??? No idea.. I will strace to see what happens to the Debug log.. but
ideally I would like this file writing to be disabled. :)
Should I create tickets?
holger
dispatch failed on "[ self doExpire.
statsdClient flush ]".
an OrderedCollection(MultiByteFileStream(Object)>>primitiveFailed:
MultiByteFileStream(Object)>>primitiveFailed
MultiByteFileStream(StandardFileStream)>>primFlush:
MultiByteFileStream(StandardFileStream)>>flush
MultiByteFileStream(WriteStream)>>nextChunkPut:
SourceFileArray>>writeSource:preamble:onSuccess:onFail:
CompiledMethod>>putSource:withPreamble:
CompiledMethod>>putSource:class:category:withStamp:priorMethod:
VODescriptionBuilder
class(ClassDescription)>>logMethodSource:forMethod:inCategory:withStamp:
VODescriptionBuilder
class(ClassDescription)>>compile:classified:withStamp:notifying:logSource:
VODescriptionBuilder
class(ClassDescription)>>compile:classified:withStamp:notifying:
VODescriptionBuilder class(ClassDescription)>>compile:classified:notifying:
VODescriptionBuilder class(ClassDescription)>>compile:classified: [ aMethod
origin
compile: aMethod ast formattedCode
classified: aMethod protocol ] in Deprecation>>transform
BlockClosure>>ensure: Author>>useAuthor:during: Author class>>useAuthor:during:
Deprecation>>transform Pragma(Object)>>deprecated:transformWith:
Pragma>>selector)
<snip log about lost TCP connection>
PrimitiveFailed: primitive #primClose: in MultiByteFileStream failed
MultiByteFileStream(Object)>>primitiveFailed:
MultiByteFileStream(Object)>>primitiveFailed
MultiByteFileStream(StandardFileStream)>>primClose:
MultiByteFileStream(StandardFileStream)>>close
SmalltalkImage>>closeLog:
[ self closeLog: logStream ] in SmalltalkImage>>logDuring: in Block: [ self
closeLog: logStream ]
BlockClosure>>ensure:
SmalltalkImage>>logDuring:
NonInteractiveUIManager(CommandLineUIManager)>>inform:
STCommandLineHandler(Object)>>inform:
STCommandLineHandler>>handleError:reference:
[ :e | self handleError: e reference: aReference ] in
STCommandLineHandler>>handleErrorsDuring:reference: in Block: [ :e | self
handleError: e reference: aReference ]...etc...
BlockClosure>>cull:
Context>>evaluateSignal:
Context>>handleSignal:
Context>>handleSignal:
Context>>handleSignal:
Context>>handleSignal:
Context>>handleSignal:
Context>>handleSignal:
Context>>handleSignal:
Context>>handleSignal:
Context>>handleSignal:
PrimitiveFailed(Exception)>>signal
PrimitiveFailed class(SelectorException class)>>signalFor:
MultiByteFileStream(Object)>>primitiveFailed:
MultiByteFileStream(Object)>>primitiveFailed
MultiByteFileStream(StandardFileStream)>>primClose:
MultiByteFileStream(StandardFileStream)>>close
SmalltalkImage>>closeLog:
FileWriteError: File /build/build/PharoDebug.log write failed
MultiByteFileStream(StandardFileStream)>>primWrite:from:startingAt:count:
MultiByteFileStream(StandardFileStream)>>nextPut:
MultiByteFileStream>>basicNextPut:
UTF8TextConverter>>nextPut:toStream:
[ :char | self nextPut: char toStream: aStream ] in
UTF8TextConverter(TextConverter)>>nextPutAll:toStream: in Block: [ :char | self
nextPut: char toStream: aStream ]
ByteSymbol(SequenceableCollection)>>do:
UTF8TextConverter(TextConverter)>>nextPutAll:toStream:
MultiByteFileStream>>nextPutAll:
Context>>printOn:
MultiByteFileStream(Stream)>>print:
Context>>errorReportOn:
[ :logger |
logger
nextPutAll: 'THERE_BE_DRAGONS_HERE';
cr;
nextPutAll: errMsg;
cr.
"just print the error message if no context is given"
aContext ifNotNil: [ aContext errorReportOn: logger ].
" write some type of separator"
logger
nextPutAll: (String new: 79 withAll: $-);
cr;
cr ] in SmalltalkImage>>logError:inContext: in Block: [ :logger | ...
[ logStream := self openLog.
aMonadicBlock value: logStream ] in SmalltalkImage>>logDuring: in Block: [
logStream := self openLog....
BlockClosure>>ensure:
SmalltalkImage>>logDuring:
SmalltalkImage>>logError:inContext:
[ Smalltalk logError: aString inContext: aContext.
" Print stacks of all current processes "
Smalltalk
logDuring: [ :logger |
logger
nextPutAll: 'Processes and their stacks: ';
cr.
Process allInstances
do: [ :each |
| ctx |
logger
nextPutAll: 'Process: ';
print: each;
cr;
nextPutAll: ' stack:';
cr;
cr.
ctx := each isActiveProcess
ifTrue: [ thisContext sender ]
ifFalse: [ each suspendedContext ].
ctx
ifNotNil: [ (ctx stackOfSize: 20)
do: [ :s |
logger
print:
s;
cr ] ].
logger
nextPutAll:
'------------------------------';
cr;
cr ] ] ] in
NonInteractiveUIManager(CommandLineUIManager)>>quitFrom:withMessage: in Block:
[ Smalltalk logError: aString inContext: aContext....etc...
BlockClosure>>ensure:
NonInteractiveUIManager(CommandLineUIManager)>>quitFrom:withMessage:
NonInteractiveUIManager(CommandLineUIManager)>>unhandledErrorDefaultAction:
UnhandledError>>defaultAction
UndefinedObject>>handleSignal:
UnhandledError(Exception)>>signal
UnhandledError class>>signalForException:
PrimitiveFailed(Error)>>defaultAction
UndefinedObject>>handleSignal:
PrimitiveFailed(Exception)>>pass
[ :ex |
ActiveWorld := priorWorld.
ActiveEvent := priorEvent.
ActiveHand := priorHand.
ex pass ] in WorldMorph(PasteUpMorph)>>becomeActiveDuring: in Block: [ :ex | ...
BlockClosure>>cull:
Context>>evaluateSignal:
FileWriteError: File /build/build/PharoDebug.log write failed
MultiByteFileStream(StandardFileStream)>>primWrite:from:startingAt:count:
MultiByteFileStream(StandardFileStream)>>next:putAll:startingAt:
MultiByteFileStream>>basicNext:putAll:startingAt:
UTF8TextConverter(TextConverter)>>next:putByteString:startingAt:toStream:
UTF8TextConverter(TextConverter)>>next:putAll:startingAt:toStream:
MultiByteFileStream>>next:putAll:startingAt:
UTF8TextConverter(TextConverter)>>nextPutByteString:toStream:
UTF8TextConverter(TextConverter)>>nextPutAll:toStream:
MultiByteFileStream>>nextPutAll:
Context>>printDetails:
Context>>errorReportOn:
[ :logger |
logger
nextPutAll: 'THERE_BE_DRAGONS_HERE';
cr;
nextPutAll: errMsg;
cr.
"just print the error message if no context is given"
aContext ifNotNil: [ aContext errorReportOn: logger ].
" write some type of separator"
logger
nextPutAll: (String new: 79 withAll: $-);
cr;
cr ] in SmalltalkImage>>logError:inContext: in Block: [ :logger | ...
[ logStream := self openLog.
aMonadicBlock value: logStream ] in SmalltalkImage>>logDuring: in Block: [
logStream := self openLog....
BlockClosure>>ensure:
SmalltalkImage>>logDuring:
SmalltalkImage>>logError:inContext:
[ Smalltalk logError: aString inContext: aContext.
" Print stacks of all current processes "
Smalltalk
logDuring: [ :logger |
logger
nextPutAll: 'Processes and their stacks: ';
cr.
Process allInstances
do: [ :each |
| ctx |
logger
nextPutAll: 'Process: ';
print: each;
cr;
nextPutAll: ' stack:';
cr;
cr.
ctx := each isActiveProcess
ifTrue: [ thisContext sender ]
ifFalse: [ each suspendedContext ].
ctx
ifNotNil: [ (ctx stackOfSize: 20)
do: [ :s |
logger
print:
s;
cr ] ].
logger
nextPutAll:
'------------------------------';
cr;
cr ] ] ] in
NonInteractiveUIManager(CommandLineUIManager)>>quitFrom:withMessage: in Block:
[ Smalltalk logError: aString inContext: aContext....etc...
BlockClosure>>ensure:
NonInteractiveUIManager(CommandLineUIManager)>>quitFrom:withMessage:
NonInteractiveUIManager(CommandLineUIManager)>>unhandledErrorDefaultAction:
UnhandledError>>defaultAction
UndefinedObject>>handleSignal:
UnhandledError(Exception)>>signal
UnhandledError class>>signalForException:
FileWriteError(Error)>>defaultAction
UndefinedObject>>handleSignal:
FileWriteError(Exception)>>signal
FileWriteError(Exception)>>signal:
MultiByteFileStream(StandardFileStream)>>primWrite:from:startingAt:count:
MultiByteFileStream(StandardFileStream)>>nextPut:
FileWriteError: File /build/build/PharoDebug.log write failed
MultiByteFileStream(StandardFileStream)>>primWrite:from:startingAt:count:
MultiByteFileStream(StandardFileStream)>>next:putAll:startingAt:
MultiByteFileStream>>basicNext:putAll:startingAt:
UTF8TextConverter(TextConverter)>>next:putByteString:startingAt:toStream:
UTF8TextConverter(TextConverter)>>next:putAll:startingAt:toStream:
MultiByteFileStream>>next:putAll:startingAt:
UTF8TextConverter(TextConverter)>>nextPutByteString:toStream:
UTF8TextConverter(TextConverter)>>nextPutAll:toStream:
MultiByteFileStream>>nextPutAll:
Context>>printOn:
MultiByteFileStream(Stream)>>print:
Context>>errorReportOn: