|Anonymous | Login||10-21-2021 08:10 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|
|0002149||[Squeak] System||major||always||11-02-05 10:37||11-03-05 20:20|
|Summary||0002149: Accessing source-code is not thread-save|
|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.|
syntax-error.png [^] (7,785 bytes) 11-02-05 10:37
SourceCodeAccessTest.st [^] (1,491 bytes) 11-02-05 11:01
(0003021 - 450 - 450 - 450 - 450 - 450 - 450)
|Ahh, I just happened to experience another prove of this particular problem: When having the process-browser open, auto update turned on, and having selected a particular process, this bug is observable again: browse around within your image, if you are 'lucky' you can see the code-browser actually load a incomplete method OR (what is more likely) the process browser will show a syntax-error morph as stated above when trying to display the stack.|
(0003022 - 734 - 758 - 758 - 758 - 758 - 758)
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....
(0003023 - 248 - 333 - 333 - 333 - 333 - 333)
From Craig (email@example.com)
> A read/write(file, pos, numbytes) is much safer.
The filesystem support in Flow does this, for example. Flow provides a complete replacement for the current filesystem framework, by the way.
(0003026 - 88 - 88 - 88 - 88 - 88 - 88)
|On platforms where mmap() is available, it would be easy to implement such a method set.|
|11-02-05 10:37||renggli||New Issue|
|11-02-05 10:37||renggli||File Added: syntax-error.png|
|11-02-05 10:53||renggli||Issue Monitored: renggli|
|11-02-05 11:01||renggli||File Added: SourceCodeAccessTest.st|
|11-02-05 11:26||renggli||Note Added: 0003021|
|11-02-05 19:11||tim||Note Added: 0003022|
|11-02-05 19:11||tim||Note Added: 0003023|
|11-03-05 20:20||sam||Note Added: 0003026|
|12-10-05 15:32||pmm||Issue Monitored: pmm|
| Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
54 total queries executed.|
35 unique queries executed.