Help requested for diagnosing libreoffice build failures with clang 3.9.0
Dimitry Andric
dim at FreeBSD.org
Wed Oct 19 18:54:44 UTC 2016
Hi,
During an exp-run for testing the projects/clang390-import branch, we
are seeing segfaults in the editors/libreoffice build on i386 [1].
These segfaults occur during CppUnitTesting, but seemingly in random
test cases. For instance during the exp-run, it segfaulted in
chart2_export:
...
[build CUT] chart2_export
Segmentation fault (core dumped)
No core file identified in directory /wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-5.0.6.3/workdir/CppunitTest/chart2_export.test.core
To show backtraces for crashes during test execution,
enable core files with:
ulimit -c unlimited
Error: a unit test failed, please do one of:
export DEBUGCPPUNIT=TRUE # for exception catching
export CPPUNITTRACE="gdb --args" # for interactive debugging on Linux
export VALGRIND=memcheck # for memory checking
and retry using: make CppunitTest_chart2_export
gmake[2]: *** [/wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-5.0.6.3/solenv/gbuild/CppunitTest.mk:88: /wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-5.0.6.3/workdir/CppunitTest/chart2_export.test] Error 1
During my own tests, it occurred in filter_xslt.test:
...
[build BIN] xmloff
S=/usr/work/share/dim/ports/editors/libreoffice/work/libreoffice-5.0.6.3 && I=$S/instdir && W=$S/workdir && mkdir -p $W/Module/nonl10n/ && touch $W/Module/nonl10n/xmloff
[build MOD] xmloff
S=/usr/work/share/dim/ports/editors/libreoffice/work/libreoffice-5.0.6.3 && I=$S/instdir && W=$S/workdir && mkdir -p $W/Module/ && touch $W/Module/xmloff
Segmentation fault (core dumped)
OK (2)
No core file identified in directory /usr/work/share/dim/ports/editors/libreoffice/work/libreoffice-5.0.6.3/workdir/CppunitTest/filter_xslt.test.core
To show backtraces for crashes during test execution,
enable core files with:
ulimit -c unlimited
Error: a unit test failed, please do one of:
export DEBUGCPPUNIT=TRUE # for exception catching
export CPPUNITTRACE="gdb --args" # for interactive debugging on Linux
export VALGRIND=memcheck # for memory checking
and retry using: make CppunitTest_filter_xslt
gmake[3]: *** [/usr/work/share/dim/ports/editors/libreoffice/work/libreoffice-5.0.6.3/solenv/gbuild/CppunitTest.mk:87: /usr/work/share/dim/ports/editors/libreoffice/work/libreoffice-5.0.6.3/workdir/CppunitTest/filter_xslt.test] Error 1
This last core file was usable by gdb, and it seemed to be some problem in forced unwinding during thread exit:
Program terminated with signal SIGSEGV, Segmentation fault.
#0 libunwind::EHHeaderParser<libunwind::LocalAddressSpace>::decodeEHHdr (addressSpace=..., ehHdrStart=750359276, ehHdrEnd=<optimized out>, ehHdrInfo=...) at /usr/src/gnu/lib/libgcc/../../../contrib/llvm/projects/libunwind/src/EHHeaderParser.hpp:61
61 if (version != 1)
[Current thread is 1 (LWP 101219)]
(gdb) bt
#0 libunwind::EHHeaderParser<libunwind::LocalAddressSpace>::decodeEHHdr (addressSpace=..., ehHdrStart=750359276, ehHdrEnd=<optimized out>, ehHdrInfo=...) at /usr/src/gnu/lib/libgcc/../../../contrib/llvm/projects/libunwind/src/EHHeaderParser.hpp:61
#1 0x28216027 in libunwind::LocalAddressSpace::findUnwindSections(unsigned int, libunwind::UnwindInfoSections&)::{lambda(dl_phdr_info*, unsigned int, void*)#1}::operator()(dl_phdr_info*, unsigned int, void*) const (this=<optimized out>, pinfo=<optimized out>, data=<optimized out>) at /usr/src/gnu/lib/libgcc/../../../contrib/llvm/projects/libunwind/src/AddressSpace.hpp:426
#2 0x28215f2d in libunwind::LocalAddressSpace::findUnwindSections(unsigned int, libunwind::UnwindInfoSections&)::{lambda(dl_phdr_info*, unsigned int, void*)#1}::__invoke(dl_phdr_info*, unsigned int, void*) (pinfo=0xbbafc878, data=0xbbafcae8) at /usr/src/gnu/lib/libgcc/../../../contrib/llvm/projects/libunwind/src/AddressSpace.hpp:391
#3 0x28054b70 in dl_iterate_phdr (callback=<optimized out>, param=<optimized out>) at /usr/src/libexec/rtld-elf/rtld.c:3558
#4 0x282141e5 in libunwind::LocalAddressSpace::findUnwindSections (targetAddr=4294967295, info=..., this=<optimized out>) at /usr/src/gnu/lib/libgcc/../../../contrib/llvm/projects/libunwind/src/AddressSpace.hpp:390
#5 libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86>::setInfoBasedOnIPRegister (this=<optimized out>, isReturnAddress=<optimized out>) at /usr/src/gnu/lib/libgcc/../../../contrib/llvm/projects/libunwind/src/UnwindCursor.hpp:1220
#6 0x28214062 in libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86>::step (this=0xbbafce88) at /usr/src/gnu/lib/libgcc/../../../contrib/llvm/projects/libunwind/src/UnwindCursor.hpp:1348
#7 0x28213539 in unw_step (cursor=0xbbafce88) at /usr/src/gnu/lib/libgcc/../../../contrib/llvm/projects/libunwind/src/libunwind.cpp:231
#8 0x28212b10 in unwind_phase2_forced (uc=<optimized out>, cursor=<optimized out>, exception_object=<optimized out>, stop=<optimized out>, stop_parameter=<optimized out>) at /usr/src/gnu/lib/libgcc/../../../contrib/llvm/projects/libunwind/src/UnwindLevel1.c:244
#9 0x28212c17 in _Unwind_ForcedUnwind (exception_object=0x28616288, stop=0x2838f7e0 <thread_unwind_stop>, stop_parameter=<optimized out>) at /usr/src/gnu/lib/libgcc/../../../contrib/llvm/projects/libunwind/src/UnwindLevel1.c:414
#10 0x2838f34f in _Unwind_ForcedUnwind (ex=0x28616288, stop_func=0x2838f7e0 <thread_unwind_stop>, stop_arg=0x0) at /usr/src/lib/libthr/thread/thr_exit.c:108
#11 0x2838f610 in thread_unwind () at /usr/src/lib/libthr/thread/thr_exit.c:173
#12 _pthread_exit_mask (status=<optimized out>, mask=<optimized out>) at /usr/src/lib/libthr/thread/thr_exit.c:258
#13 0x2838f42a in _pthread_exit (status=0x0) at /usr/src/lib/libthr/thread/thr_exit.c:207
#14 0x28381daf in thread_start (curthread=<optimized out>) at /usr/src/lib/libthr/thread/thr_create.c:289
#15 0x00000000 in ?? ()
Unfortunately the root cause is eluding me, as I do not have enough
machine resources to do many libreoffice builds, and I do not fully
understand the build process.
Also, when I re-run the CppunitTest_filter_xslt manually, using exactly
the same command line as logged during the build, it does *not* fail!
Is there anybody with experience in libreoffice builds able to reproduce
these errors? You can checkout the projects/clang390-import branch to
get a copy of head with clang 3.9.0, and rebuild it, or build clang
3.9.0 manually and then use it to build libreoffice. It lookse like
there is no clang39 port yet, though.
-Dimitry
[1] http://package18.nyi.freebsd.org/data/headi386PR212343-default/2016-09-11_07h04m19s/logs/errors/libreoffice-5.0.6_3.log
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-office/attachments/20161019/2fa56109/attachment.sig>
More information about the freebsd-office
mailing list