[uClinux-dev] leon, uclibc and vfork()

Andrew Hall andrew at andy-hall.net
Wed Mar 26 08:45:44 EST 2003


Hi,
	At the start of January (when I last looked at this) I was having problems with uclinux on leon sparc. When vfork() was called to spawn a new process the system froze, with the vfork failing to complete (even failing to fail properly).

At the time I was using uc-libc, in order to look for an easy solution I have now moved to uclibc which seems to be essentially working, things compile against it and init (simpleinit from /user/init) starts up, but the whole thing grinds to a halt when attempting to vfork().

By scattering printfs liberally through simpleinit.c I have narrowed it down to vfork, and using gdb/insight I have followed it through at kernel level, do_fork is run but it dies with an illegal instruction SIGILL in the later stages of execution. 

I can't exactly pinpoint where it is doing it because it gives the appearance of not executing the commands in order. Execution jumpsd backwards through the source a few lines frequently. I imagine this behaviour is due to the internal scheduling of the kernel as it goes about its business, or insight playing tricks on me.

But - in an attempt to trace the whole execution of vfork from start to finish I am trying to follow the source through from the uclibc vfork call inwards. Looking at vfork.S in uClibc/libc/sysdeps/linux/sparc/ I am trying to follow the logic of the assembler (I've been doing sparc assembler for all of 3 days now, so please bear with me) line 36 has a trap instruction to 0x10. There isn't a trap 0x10 defined in the sparc manual or the leon manual - does anyone know why it is there? It's likely that I am missing something vital, but it's puzzling me.

If anyone has solved this vfork issue I'd be interested in hearing about it (wishful thinking) otherwise I'll keep hacking away at it.

Cheers all,

Andrew



More information about the uClinux-dev mailing list