Hi,
I reported a new issue to mantis, that i consider to be quite critical. Unfortunately I don't have a fix, but a test-case and a screen-shot.
http://bugs.impara.de/view.php?id=2149
Description: If two processes concurrently access the source code of a method they might get an invalid string that cannot be compiled. This leads to a wide range of different bugs, the one most often visible is a syntax that pops up within the image (see attached screen-shot). This is especially annoying if Squeak is used within a server environment.
Lukas
-- Lukas Renggli http://www.lukas-renggli.ch
Description: If two processes concurrently access the source code of a method they might get an invalid string that cannot be compiled.
This isn't particularly related to source code though; more a general problem with the whole file accessing system. Unfortunately, Squeak uses one primitive to position the 'current pointer' for an open file and another to read x bytes from the current pointer. Obviously if multiple threads are working on the same file there is a reasonable chance that at some time the position and read/write will interleave and screw up your day.
The same problem is there in many low level OS libraries - Squeak just copied the model in the ANSI C stdio.h standard. I always did think it was pretty stupid. A read/write(file, pos, numbytes) is much safer.
It's one of the things that needs to be tackled by the File Team. Yet another....
tim
The same problem is there in many low level OS libraries - Squeak just copied the model in the ANSI C stdio.h standard. I always did think it was pretty stupid. A read/write(file, pos, numbytes) is much safer.
Interesting. Another strange thing about files is to cache their size, as it has been already reported several times in the list. When having different FileStream-instances onto the same file they don't necessarily have the same size :-(
Lukas
-- Lukas Renggli http://www.lukas-renggli.ch
On 2-Nov-05, at 8:05 AM, Lukas Renggli wrote:
Interesting. Another strange thing about files is to cache their size, as it has been already reported several times in the list. When having different FileStream-instances onto the same file they don't necessarily have the same size :-(
Wxactly. Strange, eh.
tim
Tim writes:
A read/write(file, pos, numbytes) is much safer.
The filesystem support in Flow[1] does this, for example. Flow provides a complete replacement for the current filesystem framework, by the way.
-C
On 2-Nov-05, at 9:24 AM, Craig Latta wrote:
Tim writes:
A read/write(file, pos, numbytes) is much safer.
The filesystem support in Flow[1] does this, for example. Flow
provides a complete replacement for the current filesystem framework, by the way.
I've noted this in the mantis report in the hope it reminds whoever finally gets to do something about it
tim
squeak-dev@lists.squeakfoundation.org