Samba dump (useless) core

Jan Beich jbeich at FreeBSD.org
Wed May 8 11:45:03 UTC 2019


Andrea Venturoli <ml at netfence.it> writes:

> While this sheds some light (seems the whole thing has to do with
> trust password change), it shows a stack overflow, not an assert.

"stack overflow detected" messages are part of -fstack-protector*.
Recently, ports/ default changed to -strong in order to follow base/.

https://svnweb.freebsd.org/changeset/ports/499897

> a) how do I get out of this? Remove the other member from the domain
> and rejoin? Try and fix the DB (how)? Other? (I understand this would
> be a question better answere on Samba list, but we are already here).

Try adding either to the port's Makefile:

  SSP_CFLAGS?=	-fstack-protector # XXX -strong crashes in some cases

or

  SSP_UNSAFE=	yes # XXX crashes in some cases

> b) if there's a stack overflow, isn't that a bug? How can I check it
> and report it (to FreeBSD or Samba, once the details can let me
> decide) if I cannot get a proper core?
> I guess I'd have to look into a way to generate debug info with
> Poudriere... what's the proper way to do this?

How debugging is implemented is up to port maintainer but the framework
provides WITH_DEBUG facility that *usually* allows to get debug symbols. 
If neither DEBUG port option nor WITH_DEBUG make variable provide symbols
then file a bug.

https://www.freebsd.org/doc/en/books/porters-handbook/install.html#install-strip

In addition to debug symbols try building with -fsanitize=address in
order to save time finding a place where the overflow occurs.


More information about the freebsd-ports mailing list