[squeak-dev] FileDoesNotExistException on existing changes file
during trunk update
Eliot Miranda
eliot.miranda at gmail.com
Mon Sep 1 13:56:27 UTC 2014
Hi Bert,
On Sep 1, 2014, at 4:31 AM, Bert Freudenberg <bert at freudenbergs.de> wrote:
> On 31.08.2014, at 09:50, Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com> wrote:
>
>> 2014-08-30 15:31 GMT+02:00 Bernhard Pieber <bernhard at pieber.com>:
>>> During processing of update-eem.287.mcm a popup menu appears saying that the Squeak4.5-13680.changes file does not exist. This is incorrect because the file exists. When I choose Debug I get FileDoesNotExistException. See the attached PNG and SqueakDebug.log.
>> It happens to me from time to time.
>> I suspect that there are two many files opened before the reclamation facility has a chance to work.
>> I suspect the read-only copy of change file to open those files.
>
> Yep. I noticed that on my SqueakJS VM (which does not yet support weak refs/finalization), in a Squeak 4.5 image the sources and changes files are opened many many times but never closed (I'm refcounting the handles).
>
> I suspect a strategically placed #close after we're done with the read-only copy would solve this problem for good.
>
> Even with finalization support it's a good idea to actually close files when you're done, because it's unpredictable when the finalizer will actually run.
>
> Another thought is that given the abundance of memory these days, we might cache both sources and changes in main memory (which would also speed up full-text searches).
Pharo is planning to eliminate them altogether which is more coherent than caching them. But IMO the solution is easy, maintain a *single* read-only copy of the sources and changes files in SourceFilesArray (or whatever the class is called; I'm on my phone) and read source through them instead of reopen ing the damn things all the time. Then the file's own buffers will provide done caching. Annoying that I write this code in 2008 for newspeak but we still rely on the mad "run the GC to finalize files when open fails" approach.
> - Bert -
Eliot phone
More information about the Squeak-dev
mailing list
|