|Anonymous | Login||04-23-2019 08:19 UTC|
|Main | My View | View Issues | Change Log | Docs|
|Viewing Issue Simple Details [ Jump to Notes ]||[ View Advanced ] [ Issue History ] [ Print ]|
|ID||Category||Severity||Reproducibility||Date Submitted||Last Update|
|0001041||[Squeak] Kernel||minor||N/A||04-04-05 19:26||12-20-05 15:17|
|Summary||0001041: [VM][ENH] LowSpaceAndInterruptHandler-dtl|
David T. Lewis <email@example.com>:
"These change sets are updates to the VM and to the low space watcher that
fix low space interrupt handling and user interrupt handling in Morphic.
Under certain conditions the low space watcher was unable to determine the
correct process to suspend following a low space signal. These changes permit
the VM to remember the identity of the process that caused the low space
condition, and to report it to the image through a primitive.
The low space watcher changes are backward compatible for use with VMs
that do not yet have the new primitive (i.e. broken the same way as was
the case in Squeak 3.7).
- This is done with VMMaker 3-8b2, hence is not updated for 64 bit VM.
- I added a numbered primitive, which is probably a bad thing (but I'm not
sure where best to put it, possibly MiscPrimitivePlugin?).
- There may be a simpler way to accomplish this, but at least this is a
- I have not tested the interpreter simulator, still need to make sure I did
not break it.
Cross posted to vm-dev and squeak-dev. Follow-ups should go to vm-dev
(unless someone can think of a way to handle this properly without
touching the VM)."
VMMLowSpaceAndInterruptHandler-dtl.cs.gz [^] (5,460 bytes) 04-04-05 19:26
LowSpaceAndInterruptHandler-dtl.cs.gz [^] (2,012 bytes) 04-04-05 19:27
LowSpaceAndInterruptHandlerMVC-dtl.cs.gz [^] (1,767 bytes) 04-10-05 20:40
LowSpaceAndInterruptHandler-2-dtl.cs.gz [^] (3,016 bytes) 04-16-05 06:43
VMMLowSpaceAndInterruptHandler-2-dtl.cs.gz [^] (3,300 bytes) 04-16-05 06:43
LowSpaceAndInterruptHandler-3-dtl.1.cs.gz [^] (3,110 bytes) 10-05-05 01:24
(0001357 - 702 - 824 - 824 - 824 - 824 - 824)
I added LowSpaceAndInterruptHandlerMVC-dtl.cs.gz, which adds low space and interrupt key handling for MVC. This should be loaded after LowSpaceAnddInterruptHandler-dtl. With the additional change set (and with the VM rebuilt), Squeak MVC and Morphic pass the four Andreas tests for interruptability:
* "[true] whileTrue"
* "[[true] whileTrue] forkAt: Processor userSchedulingPriority + 1"
* "Smalltalk createStackOverflow"
* "[Smalltalk createStackOverflow] forkAt: Processor userSchedulingPriority + 1"
This also corrects the previously unreported problem of not being able to interrupt a high priority background process in MVC (test 2 above), which goes back to at least Squeak 3.6.
(0001361 - 346 - 370 - 370 - 370 - 370 - 370)
See also 1070.
I think we can report the culprit process oop more easily (and the oop rather than the hash) via the specialObjectArray. Element 23 is unused for example so we don't even have to increase the size really.
Is it really a good idea to discover there is a lowspace situation and go on to allocate a possibly large object anyway?
(0001364 - 135 - 135 - 135 - 135 - 135 - 135)
|That's a wonderful idea! I had been worrying about this myself but sticking it into the splObjs would be the way to go. I'm all for it.|
(0001372 - 462 - 462 - 462 - 462 - 462 - 462)
|Probably obvious, but note that as a safety check it is a good idea to make sure the saved oop is saved once and only once, then cleared by the low space watcher. Otherwise, if the low space watcher does anything to allocate a chunk prior to obtaining the saved oop, you get the wrong value. This does not actually happen in practice (why would someone allocate memory in a low space handler), but if it ever did we would have another obscure deferred-crash bug.|
(0001381 - 368 - 406 - 406 - 406 - 406 - 406)
Tim suggested that the process causing the low space condition could be passed back to the image in the special objects array, rather than passing the identity hash via a primitive. An implemention is provided in these two change sets:
LowSpaceAndInterruptHandler-2-dtl - image side changes for Morphic and MVC
VMMLowSpaceAndInterruptHandler-2-dtl - VM changes
(0001489 - 705 - 735 - 735 - 735 - 735 - 735)
A slight variation (to make it 64bit clean etc) of this is in the upcoming VMMaker release. It assists the selection of the right process to debug and makes things a bit more reliable in Squeak.
In systems with many processes though I doubt that it can make much difference since one can easily imagine that a greedy process is chewing up memory like it was out of fashion, a dainty little high priority process triggers, just barely pushes the lowspace limit and gets to be the guilty party. Meanwhile Mr Greedy doesn't get his hand slapped and and continue on.
Mr UpdateManager -
The LowSpaceAndInterruptHandler-2-dtl-cs.gz needs to be added to the update stream to make use of the new VM parts.
(0002736 - 24 - 24 - 24 - 24 - 24 - 24)
|needs to be added to 3.9|
(0002767 - 43 - 49 - 49 - 49 - 49 - 49)
the cs are outdated.
David did another one
(0002768 - 905 - 941 - 941 - 941 - 941 - 941)
Stef asked me to check LowSpaceAndInterruptHandler-2-dtl for conflicts before he added it to the update stream. Good call; there were some bit rot issues.
I have uploaded LowSpaceAndInterruptHandler-3-dtl, which replaces LowSpaceAndInterruptHandler-2-dtl for Squeak3.9a-6693. This change set differs from LowSpaceAndInterruptHandler-2-dtl in the #lowSpaceWatcher and #recreateSpecialObjectsArray methods, both of which had changed in Squeak3.9a-6693 since the original LowSpaceAndInterruptHandler-2-dtl was done.
LowSpaceAndInterruptHandler-3-dtl has the fixes for both MVC and Morphic. Tim has put the VMMaker changes into VMM already. Therefore LowSpaceAndInterruptHandler-3-dtl is the only change set that needs to be added to the update stream.
This is a sensitive change, so I would appreciate if at least one qualified person can double-check it before it gets applied to the update stream.
(0002779 - 104 - 104 - 104 - 104 - 104 - 104)
|It loads and seems to function ok in a 3.9a image on a mac. Looks good to me - passes the four tests ok.|
(0002780 - 67 - 67 - 67 - 67 - 67 - 67)
|Tested on a VMM3.8-64bit VM on RISC OS as well and works just fine.|
(0003368 - 71 - 77 - 77 - 77 - 77 - 77)
6707 finally :)
I hope that this is ok and I did not mess up something
|04-04-05 19:26||KenCausey||New Issue|
|04-04-05 19:26||KenCausey||File Added: VMMLowSpaceAndInterruptHandler-dtl.cs.gz|
|04-04-05 19:27||KenCausey||File Added: LowSpaceAndInterruptHandler-dtl.cs.gz|
|04-04-05 19:27||KenCausey||Additional Information Updated|
|04-10-05 20:40||lewis||File Added: LowSpaceAndInterruptHandlerMVC-dtl.cs.gz|
|04-10-05 20:46||lewis||Note Added: 0001357|
|04-10-05 20:48||lewis||Issue Monitored: lewis|
|04-13-05 03:12||tim||Relationship added||related to 0001070|
|04-13-05 03:21||tim||Note Added: 0001361|
|04-13-05 09:58||andreas||Note Added: 0001364|
|04-13-05 14:01||lewis||Note Added: 0001372|
|04-16-05 06:43||lewis||File Added: LowSpaceAndInterruptHandler-2-dtl.cs.gz|
|04-16-05 06:43||lewis||File Added: VMMLowSpaceAndInterruptHandler-2-dtl.cs.gz|
|04-16-05 06:47||lewis||Note Added: 0001381|
|04-20-05 22:59||tim||Status||new => assigned|
|04-20-05 22:59||tim||Assigned To||=> tim|
|05-15-05 06:23||tim||Note Added: 0001489|
|05-15-05 06:23||tim||Assigned To||tim => dway|
|09-30-05 09:34||MarcusDenker||Status||assigned => resolved|
|09-30-05 09:34||MarcusDenker||Resolution||open => fixed|
|09-30-05 09:34||MarcusDenker||Note Added: 0002736|
|10-04-05 16:42||ducasse||Status||resolved => feedback|
|10-04-05 16:42||ducasse||Resolution||fixed => reopened|
|10-04-05 16:42||ducasse||Note Added: 0002767|
|10-05-05 01:24||lewis||File Added: LowSpaceAndInterruptHandler-3-dtl.1.cs.gz|
|10-05-05 01:33||lewis||Note Added: 0002768|
|10-05-05 23:22||tim||Note Added: 0002779|
|10-05-05 23:34||tim||Note Added: 0002780|
|12-20-05 15:17||ducasse||Status||feedback => closed|
|12-20-05 15:17||ducasse||Note Added: 0003368|
|12-20-05 15:17||ducasse||Resolution||reopened => fixed|
|12-20-05 15:17||ducasse||Fixed in Version||=> 3.9|
|11-17-11 01:55||lewis||Relationship added||child of 0007655|
| Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
116 total queries executed.|
62 unique queries executed.