[PATCH] Provide a simple backtrace in the samba AD DC also

Andrew Bartlett abartlet at samba.org
Wed Apr 11 01:46:35 UTC 2018


On Tue, 2018-04-10 at 13:59 -0700, Jeremy Allison via samba-technical
wrote:
> On Tue, Apr 10, 2018 at 05:00:32PM +1200, Andrew Bartlett via samba-technical wrote:
> > smbd has for a long time been able to produce a simple internal
> > backtrace.
> > 
> > This patch allows 'samba' to do the same, by bringing that code into
> > lib/util.  An un-used IRIX mode, lost since the move to waf, was
> > removed to allow this to happen.  (That mode used become_root()). 
> > 
> > This is important because gdb_backtrace as a panic action is not
> > compatible with gitlab CI, so without this we have no way to tell where
> > the fault is. 
> > 
> > The cstyle.py failures are all in the moved code:
> > 
> > ad84ecfd836 s3-lib: Remove support for libexc for IRIX backtraces
> > 2469ab654a3 lib/util: Log PANIC before calling pacic action just like
> > s3
> > 212ae4db4bb lib/util: Move log_stack_trace() to common code
> >   :lib/util/fault.c:
> >       178  Comment line does not have * aligned with top
> >       179  Comment line does not have * aligned with top
> >       180  Comment line does not have * aligned with top
> >       181  Garbage before * in comment line
> >       181  Comment is 3+ lines but is not formatted as block comment
> >       197  Preprocessor statement in function body
> >       201  Comment is 3+ lines but is not formatted as block comment
> >       227  Space before close parenthesis
> >       234  Space after cast operator (or inline if/while body)
> >       242  Space after cast operator (or inline if/while body)
> >       252  Preprocessor statement in function body
> >       273  Preprocessor statement in function body
> >       275  Preprocessor statement in function body
> > 19dba766ad6 lib/util: Call log_stack_trace() in smb_panic_default()
> > 
> > Please review and push,
> 
> LGTM - RB+ and pushed with the minor change of DEBUG(0, -> DBG_ERR(
> to match updated coding standards.

Thanks.  The reason it was like that was to match exactly the code in
the s3 panic handler, so that should be fixed to match.  Ideally the
whole routine should be merged (for consistency) but that it a larger
task for some other day.

Andrew Bartlett

-- 
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT   
https://catalyst.net.nz/services/samba







More information about the samba-technical mailing list