[Vm-dev] Cog + Pi + OSProcess

David T. Lewis lewis at mail.msen.com
Fri Jun 17 01:40:53 UTC 2016


On Wed, Jun 08, 2016 at 11:42:57AM -0700, tim Rowledge wrote:
> 
> I finally got a moment to look at this - not that I really have much clue
> about the whole unix process thing - and it appears that something is odd
> with the compiled code in the plugin.
> 
> My test is very simple - run the UnixProcess class>listDirectory example.
> It exits with a segfault and the forkAndExec??? method as the last thing
> on the stack.
> 
> I build a debug vm (and had some fun with asserts and the ARM fp offset in
> the process, all fixed now) and??? it doesn???t fail. I???ve tried compiling
> the plugin with varying levels of optimisation, since we???ve fairly regularly
> seen problems there, and even at -O0 it fails. So debug -> OK, no-debug -> boom.
> Nice.
> 
> Ideas?
>

I just unpacked my new Raspberry Pi (thanks Ben and Tim for the shopping and
setup advice). Very cool. My only usability complaint is that the TV monitor
is in the next room, so I am getting a stiff neck trying to look at the monitor
while I type on my chiclet keyboard here in the kitchen. But it works, and it
is a real computer.

I started by compiling an interpreter VM to run against "trunk level" V3 image
with OSProcess/CommandShell loaded. What I found so far:

- The 32-bit VM running 64-bit image does not work, cannot load X11 driver.
This used to work 6 or 8 years ago on 64 bit x86, so probably some regression
because I have not been testing on 32-bit host, and Raspbian is 32-bit.

- After loading OSProcess/CommandShell, I was getting errors, something like
fork not being able to allocate memory. Sorry, I did not capture the error,
and it's gone now.

- I then ran the OSP/CommandShell test suite. This crashed my login session
and took me to a login prompt. WTF?!? This is supposed to be impossible on
a Unix system. I'm still provisionally impressed with Raspbian, but ...

- I logged back in and ran the OSP/CommandShell tests again. Everything looks
good now, except that tests related to file locking protocol are failing.
These are rarely used functions and may be linux distro dependent, so I'm
not worried about these failures.

- RemoteTask seems to be working also. Nice.

- Overall, most of the OSProcess functionality seems to be just working, so
that is a pleasant surprise.

- I have gotten a few image lockups. I don't think it is related to OSProcess,
more likely that I am trying to use a "trunk level" V3 image, maybe a bit
buggy at this point.

I will try setting up a Cog/Spur build next, and see what that looks like.
But probably not tonight :-)

Dave
 


More information about the Vm-dev mailing list