On Tue, Nov 17, 2009 at 09:30:16AM +0100, Adrian Lienhard wrote:
Hi Dave,
On Nov 17, 2009, at 01:40 , David T. Lewis wrote:
[...]
If the above examples do not work for you, it is very likely due to the current inconsistencies between OSProcess and Pharo, for which I do not yet have a solution (I would welcome any tips here, I tried again last night to figure out what's wrong and gave up in frustration :-/ ).
What is the simplest thing to do to reproduce the problem?
Do we know if it is on all platforms? Does it work in a Squeak Trunk image?
Hi Adrian, There are unit tests for OSProcess as well as for CommandShell, and these should all be green. Yes, all tests pass on Squeak trunk (see attached). I get inconsistent results on a Pharo image. I just tried again tonight on pharo1.0-10495-rc1dev09.11.3, and things look better than the last time I tried (which might be coincidental, I'm running various VMs and maybe I got myself confused the other evening). I'm not sure, but I think I am seeing two types of problem. The easy one is that I'm getting test failures in AioEventHandlerTestCase that are probably caused by changes in the socket code for Pharo compared to Squeak. I have not found the cause yet, but I'm not worried about it because it's probably just a change in the socket code for Pharo, and I probably will just need to adjust the tests for this. The harder problem is that I am getting intermittent failures, most often showing up in CommandShellTestCase (which does a lot of pipes, event handling, and OS process handling). I think that I am seeing failures in reading from pipes, which in turn results in failure to find end of file and clean up exiting processes. This causes the tests to get "stuck", and if I look in a terminal window, I can see that many of the processes spawned by the unit tests are in zombie mode, indicating that the grimReaperProcess running in Pharo/Squeak is failing to clean up processes that are ready to exit. I think that when I ran this on earlier Pharo images I was getting errors that had something to do with the fileID of a file stream (sorry I did not save the specific errors), so I am wondering if anything may have changed that would affect access to the fileID handle for a file stream. I have also seen VM crashes when running the tests, which suggests possibly passing the wrong kind of object to a primitive that expects a fileID byte array (and of course it also means that I need to do a better job of validating parameters passed to primitives in OSPP, but that's a separate topic ;)
Maybe I or other people can help to get more insights about what goes wrong. OSProcess is certainly a very important package for Pharo, so we should try to get it working again.
Thanks for offering to help. I suspect that this will turn out to be one or two simple problems, and I just have not found them yet. Dave