[KDE/Mac] The meinproc4 segfault is finally REPRODUCIBLE

Ian Wadham iandw.au at gmail.com
Tue Apr 28 23:16:24 UTC 2015


Hi Marko,

On 29/04/2015, at 4:19 AM, Marko Käning wrote:
> in comment 27 of the KMyMoney issue on the respective MacPorts’ trac ticket [1] I could
> fix that we’ve a truly reproducibly segfault.
> 
> 	Actually, meinproc4 fails twice in a row!!

Thanks for pinpointing the lines where meinproc4 fails [1].  I think these Macports logs
must require a reading age of about 325… :-)  I cannot make head nor tail of them.
Otherwise I would have replied sooner.

Look back a few lines for occurrences of the string "meinproc4".  In each log you
find the same thing happening.  Two copies of meinproc4 are started, one for the
KMyMoney Handbook (file index.docbook) and the other for the manpage (file
man-kmymoney.1.docbook).  My guess is that there is some concurrency problem,
maybe a  clash over the use of a temp file.  The two logs seem to have the manpage
and Handbook runs starting in a different order, which could be another clue.

Try running the build with one stream only or perhaps with the manpage omitted
from the build and see if the problem goes away.

I notice that meinproc4 is coming from /opt/local/bin. In previous logs (builds of
kdelibs4), meinproc4 itself was being re-built and the newly built version was being
used further on in the build when it crashed, so maybe that caused the problem
somehow.  So, good, another hypothesis can be discarded for now.

> Since these crashes do not produce an Apple crash log, I figure the calls should be run
> through a debugger. I guess this should be gdb or LLVM’s debugger…

IF it is a concurrency problem, a crash log might not tell us much.  It is what happened
a few milliseconds *before* the crash that matters.  That is what led to the crash.  Also
on-line debuggers are of little use with timing-dependent problems, because they alter
the timing and so the problem goes away.

> Any recommendations for me how to proceed with this ticket in order to quickly locate
> what’s going on?

If it looks like a concurrency problem, we will need a "black box" recorder (as in an
airliner) to diagnose it.  I wonder if you can turn on log-file output in meinproc4, using
kdebugdialog.app.  That might tell us more about the process leading up to the crash.

Cheers, Ian W.

> [1] https://trac.macports.org/ticket/47496#comment:27


More information about the kde-mac mailing list