bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libio/gcc-3.0 status


From: Marcus Brinkmann
Subject: Re: libio/gcc-3.0 status
Date: Sat, 23 Feb 2002 07:56:47 -0500
User-agent: Mutt/1.3.25i

On Fri, Feb 22, 2002 at 08:27:29PM -0500, Roland McGrath wrote:
> > I tried to boot with -df (one of those, I don't remember which, makes sure
> > init pauses before calling file_exec), and attach gdb to the task, and set
> > break points.  
> 
> You have to make sure you're doing things in the proper order.

I got all steps correctly except making gdb notice after the file_exec
happened.  By the way, do I need to reset the breakpoints when attaching to
a new task (in a series of debuggings)?

I made the experience that a badly placed info threads makes gdb segfault in
such situation.

> > __task_terminate, which looks bogus.  The "backtrace" is bogus (I can
> > repeat a typical gdb session here later).
> 
> info reg and info frame too please.
> 
> > There doesn't seem to be a fundamental flaw in the system: 
> 
> What an optimist!  ;-)

That's my nature :)

> > I wonder if it is some thing in the way init runs the tasks in start_child.
> 
> The only thing really funny about it is that there are no fds.
> You could try seeing if that breaks things in a chroot'd environment
> (exec 0<&- 1>&- 2>&-; exec /libexec/console-run blah).

That is a hit!  Look at this:

# cd root2
# (LD_LIBRARY_PATH=lib exec lib/ld-2.2.5.so libexec/console-run bin/ping)
# (exec /lib/ld-2.2.90.so /libexec/console-run /bin/ping)
# (exec 0<&- 1>&- 2>&-; exec /lib/ld-2.2.90.so /libexec/console-run /bin/ping)
# (exec 0<&- 1>&- 2>&-; LD_LIBRARY_PATH=lib exec lib/ld-2.2.5.so 
libexec/console-run bin/ping)
Killed

Now, is that intuition or what?  So let's try:

# (exec 0<&- 1>&- 2>&-; LD_LIBRARY_PATH=lib exec libexec/console-run.static 
bin/ping)

And now I tried booting with a static console-run AND IT WORKS!
And this is strange, because I could *swear* I tried it before and it didn't
work.  But who cares about the 99 failed experiments of yesterday if it works
once today, right?

Everything looks allright now:
... init proc auth/libexec/console-run: cannot execute /libexec/runsystem: No 
such file or directory
/hurd/init: /libexec/runsystem exited with status 5
/libexec/console-run: cannot execute /bin/sh: No such file or directory
/hurd/init: /bin/sh exited with status 5
# /hurd/exec --usage
Usage: exec [-?V] [--help] [--usage] [--version]
PID 62 exit status 0

Now I will try gdb agains and see if I can tickle some more info out of it.
But it would also be nice to have bash and all those programs in the suhurd
to make it more convenient than starting a new subhurd each time you want to
debug it.

Thanks,
Marcus






reply via email to

[Prev in Thread] Current Thread [Next in Thread]