Hello everyone,
I'm currently working on the project file policy and I'm having a problem that I don't understand I import my code, configure my image as readOnly (Pharo won't try to write on changesFiles,source,image....), set the folder of the image in readonly and try to open the image again and it's not possible, I don't get any stacktrace so it's hard to understand the problem. PS : If we set back the folder in write mode, it's possible again to open the image again. Here is the code to reproduce the bug, could someone give me a clue please? sudo rm -r testPharo mkdir testPharo cd testPharo echo "Metacello new smalltalkhubUser: 'Uryon' project: 'Coral'; configuration: 'Coral'; version: #development; onConflictUseIncoming; load. SmalltalkImage configureSystemAsReadonlyAndQuit:true " >> load.st mkdir coral cd coral curl get.pharo.org/alpha | bash curl get.pharo.org/vm60 | bash pharo-vm/pharo Pharo.image ../load.st cd .. chmod -R -w coral coral/pharo-vm/pharo coral/Pharo.image |
I would try to run pharo through strace (http://linux.die.net/man/1/strace).
This way, you will probably see a system call trying to write to a file in read-only mode.
Hope this helps. Christophe
|
In reply to this post by Valentin Ryckewaert
Hi Victor, In addition to what Christophe said, you can do the following: 0) Start the VM from command line as you already do: coral/pharo-vm/pharo coral/Pharo.image 1) get the pid of previous step 2) In the command line do: kill -SIGUSR1 XXX That should output the smalltalk stacktrace in the stdout. And that might give you an idea in which part it is hanging from the IMAGE side. Hope this helps. On Tue, Jul 12, 2016 at 10:33 AM, Valentin Ryckewaert <[hidden email]> wrote:
|
In reply to this post by Valentin Ryckewaert
HI valentin
did you solve your problem?
Stef Le 12/7/16 à 15:33, Valentin Ryckewaert
a écrit :
|
Hello Stef, no i'm still on it :( I'm going to test every code I modified Valentin 2016-07-17 15:23 GMT+02:00 stepharo <[hidden email]>:
|
did you try to solution proposed? Stef Le 17/7/16 à 16:22, Valentin Ryckewaert
a écrit :
|
i will do it tomorrow. 2016-07-17 17:23 GMT+02:00 stepharo <[hidden email]>:
|
Hi Valentin, Ithink you can not print to stdout during shutdown and restart. Am 17.07.2016 18:36 schrieb "Valentin Ryckewaert" <[hidden email]>:
|
Thanks for the suggestion. It is probably the case.
Le 17/7/16 à 23:27, Nicolai Hess a
écrit :
|
Hello, with Pavel we tried to print with a lot of methods but it didn't work, i'm searching the source of the problem manually. 2016-07-18 14:32 GMT+02:00 stepharo <[hidden email]>:
|
2016-07-18 14:36 GMT+02:00 Valentin Ryckewaert <[hidden email]>:
What do you mean witth: "tried to print with a lot of methods" ? You can not use stdout to print when doing image shutdown and restart, because all file streams will be closed during the shutdown (see session manager). If you want to use stdout to print log messages (right after image startup), you need to make sure that the stdout/err stream are already recreated. (And for example, reinitialize Coral, if coral has reference to the (old) closed filestream.
|
We tried to put it in a file, print in in stdout, put it as an display in the image.... 2016-07-18 21:48 GMT+02:00 Nicolai Hess <[hidden email]>:
|
Now it seems to work, I followed you instruction from the first mail and just added another line to the load.stMetacello new smalltalkhubUser: 'Uryon' project: 'Coral'; configuration: 'Coral'; version: #development; onConflictUseIncoming; load. PharoFilesOpener default unsetInformAboutReadOnlyChanges. SmalltalkImage configureSystemAsReadonlyAndQuit:true 2016-07-19 0:27 GMT+02:00 Valentin Ryckewaert <[hidden email]>:
|
I'll try this as soon as I'm at work thanks you :) 2016-07-19 21:59 GMT+02:00 Nicolai Hess <[hidden email]>:
|
It's working I integrated it, but I don't understand why it was making my image crash (It wasn't crashing few weeks ago) 2016-07-20 8:35 GMT+02:00 Valentin Ryckewaert <[hidden email]>:
|
Free forum by Nabble | Edit this page |