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

Greg Ungerer gerg at snapgear.com
Wed Mar 26 20:10:07 EST 2003


Hi Andrew,

Andrew Hall wrote:
> 	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().

So in other words the behavior is no different?


> 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.

Trap 0x10 is the software trap. Its is the system call mechanism.

Regards
Greg



------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Wizard        EMAIL:  gerg at snapgear.com
SnapGear Pty Ltd                               PHONE:    +61 7 3435 2888
825 Stanley St,                                  FAX:    +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia              WEB:   www.SnapGear.com




More information about the uClinux-dev mailing list