ISC_PLATFORM_USEBACKTRACE

Gary E. Miller gem at rellim.com
Wed May 31 00:03:30 UTC 2017


Yo Hal!

On Tue, 30 May 2017 16:44:48 -0700
Hal Murray <hmurray at megapathdsl.net> wrote:

> gdb doesn't work when ntpd is started automatically at boot time.

OK.

> strace solved that one.

Yes, we keep coming back to strace.

> There is another problem in this area.  That's translating a stack
> trace in the middle of libc into a syscall.  It's not simple, even
> with symbols for libc.  Mostly, I could guess.  I think I had to look
> at the source at least once.

And even if it works, ISC_PLATFORM_USEBACKTRACE is not going to 
give you any symbols.

> strace gives you exactly what you want with a huge overhead which
> probably isn't practical on a busy server.  It might be possible to
> modify it to keep a buffer of the last N syscalls and dump the buffer
> when the program being traced crashes.

Modifying strace is beyond what I would personally consider...

> > I remain a fan of ripping out unused and useless code.  
> 
> I generally agree.  This code is currently unused.  But is it useless?

I'll know in a few days.  If I can get it to compile.

> An alternative would be to debug it and set things up to use it.  I
> know about three cases where it might be very helpful.
>   SIGSYS or a seccomp trap.  
>   SIGBUS, usually an address fault.
>   The ASSERT handler.

And all 3 are supposedly tied into ISC_PLATFORM_USEBACKTRACE, at least
in a few cases.  Is there something that would be more modern and easier
to hook in those handlers?

> Since I seem to be the only one interested in that code, I have a
> simple solution.  Find somebody else to maintain the seccomp list.

I'm interested in seccomp.  The few times I was about to fix a syscall
you beat me to it.  I certainly want to give you tools that work to
help there.

> Then I'll shut up and you can dump that code and we can stop wasting
> time on discussions like this.

No matter who/when takes up seccomp next, they'll need better tools, and
I'm all for that.  I just need to make sure ISC_PLATFORM_USEBACKTRACE
is pointless before looking for alternatives.



RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20170530/226c475d/attachment.bin>


More information about the devel mailing list