[bug] Strange, non-deterministic exceptions

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

[bug] Strange, non-deterministic exceptions

Tony Garnock-Jones-4
Issue status update for
http://smalltalk.gnu.org/node/158
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/158

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    VM
 Category:     bug reports
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  tonyg
 Updated by:   tonyg
 Status:       active
 Attachment:   http://smalltalk.gnu.org/files/issues/termination-bug.st (799 bytes)

When you run TerminationExperiment's #run, it can sometimes reach
several tens of thousands of iterations of busyLoop before faulting,
but will often fault before 20,000 iterations have completed on my
machine.

When you run #run2, things behave as I would have expected them to
behave. No faulting occurs, and the process is sensibly terminated.

Here's a selection of some of the faults I see from #run after several
seconds. Each comes at the end of a single run of the script, as
attached.

Object: '' error: Invalid argument : must be a SmallInteger
SystemExceptions.WrongClass(Exception)>>signal
SystemExceptions.WrongClass class>>signalOn:mustBe:
SystemExceptions.WrongClass class>>signalOn:mustBe:
String(Object)>>checkIndexableBounds:put:
String>>at:put:
String class(ArrayedCollection class)>>with:
Character>>asString
[] in TextCollector>>showCr:
[] in Semaphore>>critical:
BlockClosure>>ensure:
Semaphore>>critical:
TextCollector>>showCr:
String(Object)>>printNl
TerminationExperiment>>busyLoop
TerminationExperiment>>run
UndefinedObject>>executeStatements

Object: nil error: did not understand #generality
MessageNotUnderstood(Exception)>>signal
UndefinedObject(Object)>>doesNotUnderstand: #generality
SmallInteger>>+
FileStream(FileDescriptor)>>write:from:to:
FileStream>>flush
FileStream(Stream)>>nextPutAllFlush:
TextCollector>>primNextPutAll:
[] in TextCollector>>showCr:
[] in Semaphore>>critical:
BlockClosure>>ensure:
Semaphore>>critical:
TextCollector>>showCr:
String(Object)>>printNl
TerminationExperiment>>busyLoop
TerminationExperiment>>run
UndefinedObject>>executeStatements

Object: String error: Invalid argument 'b': must be a SmallInteger
SystemExceptions.WrongClass(Exception)>>signal
SystemExceptions.WrongClass class>>signalOn:mustBe:
SystemExceptions.WrongClass class>>signalOn:mustBe:
String class(Behavior)>>new:
String(Collection)>>copyEmpty:
String(ArrayedCollection)>>copyFrom:to:
WriteStream>>contents
String(Object)>>printString
String(Object)>>printNl
TerminationExperiment>>busyLoop
TerminationExperiment>>run
UndefinedObject>>executeStatements

Object: 3 error: did not understand #replaceFrom:to:with:startingAt:
MessageNotUnderstood(Exception)>>signal
SmallInteger(Object)>>doesNotUnderstand:
#replaceFrom:to:with:startingAt:
String(ArrayedCollection)>>copyFrom:to:
WriteStream>>contents
String(Object)>>printString
String(Object)>>printNl
TerminationExperiment>>busyLoop
TerminationExperiment>>run
UndefinedObject>>executeStatements

This one includes the end of the stdout, to illustrate an odd doubling
of 'c':

'a'
'b'
'c''c'Object: nil error: did not understand #generality
MessageNotUnderstood(Exception)>>signal
UndefinedObject(Object)>>doesNotUnderstand: #generality
SmallInteger>>+
FileStream(FileDescriptor)>>write:from:to:
FileStream>>flush
FileStream(Stream)>>nextPutAllFlush:
TextCollector>>primNextPutAll:
[] in TextCollector>>showCr:
[] in Semaphore>>critical:
BlockClosure>>ensure:
Semaphore>>critical:
TextCollector>>showCr:
String(Object)>>printNl
TerminationExperiment>>busyLoop
TerminationExperiment>>run
UndefinedObject>>executeStatements

Object: String error: did not understand #copyEmpty:
MessageNotUnderstood(Exception)>>signal
String class(Object)>>doesNotUnderstand: #copyEmpty:
WriteStream>>growCollection
WriteStream>>nextPut:
String>>printOn:
String(Object)>>printString
String(Object)>>printNl
TerminationExperiment>>busyLoop
TerminationExperiment>>run
UndefinedObject>>executeStatements

etc. etc.




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: [bug] Processes created by the VM cannot be cleanly #terminate-d

Paolo Bonzini-3
Issue status update for
http://smalltalk.gnu.org/project/issue/158
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/158

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    VM
 Category:     bug reports
 Priority:     normal
-Assigned to:  Unassigned
+Assigned to:  bonzinip
 Reported by:  tonyg
 Updated by:   bonzinip
 Status:       active

Processes created by the VM do not have a handler for
ProcessBeingTerminated.  With the current master and stable-3.0,
wrapping #busyLoop with

   [
       ...
   ] on: SystemExceptions.ProcessBeingTerminated do: [ :ex | ex return
]

will work around the bug.




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: [bug] Processes created by the VM cannot be cleanly #terminate-d

Paolo Bonzini-3
In reply to this post by Tony Garnock-Jones-4
Issue status update for
http://smalltalk.gnu.org/project/issue/158
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/158

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    VM
 Category:     bug reports
 Priority:     normal
 Assigned to:  bonzinip
 Reported by:  tonyg
 Updated by:   bonzinip
-Status:       active
+Status:       fixed

Fixed in e3bab84 (stable-3.0) and 47c11dd (master).




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk