bug-hurd
[Top][All Lists]
Advanced

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

Re: Bug while calling dlcose


From: marco
Subject: Re: Bug while calling dlcose
Date: Mon, 19 May 2003 12:23:56 +0200 (CEST)

Hi,

> I may understand you incorrectly, but it doesn't seem like a bug to me.
> SIGTRAP is (and should be) emitted only if a program is being traced
> (usually by gdb) when a thread is created (or destroyed?).  The program
> doesn't usually handle this signal, and ignoring it doesn't kill the
> program.  The reason it exists is that the tracing program may require
> manual action when a thread is created: the user should choose which
> thread to trace.

I'm not sure about this. I've never seen this behaviour before and I
didn't tell GDB to do this.

> Now the fact that you call it a bug suggests that the program crashes.
> AFAIK that cannot happen as a result of the SIGTRAP, so (if I'm right)
> there must be an other reason for it.  You should probably follow the
> other thread after the SIGTRAP to see what it does.  I don't have my GNU
> system easily bootable at the moment, so I cannot try it myself for now.

It really crashes, I can not continue. The other threads don't crash. It
isn't possible other threads crash, it is just and endless loop.

> But you wrote it called exit().  I may be wrong again, but I thought
> exit() would terminate the program, not only the thread that calls it. I
> think stop() should call schedule() instead of exit(): once the thread
> is stopped, it will no longer be scheduled.  However, it is still
> running.  Calling exit() should kill the program, while calling
> schedule() lets the scheduler do its job and schedule other threads (of
> any program).  Since the thread is closed, it will not be called again.

No, exit should be called. This example I gave was a simplyfied example of
how the console client works.

The console client has an input thread. If the input "CTRL+ALT+Backspace"
is the function console_exit is called. console_exit unloads all drivers
(plugins) and exit()s. It crashes during the unload (I use dlclose() for
this).

Thanks,
Marco






reply via email to

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