Summary: | [7.6.3.1] Crashes on startup: segmentation fault in pthread_mutex_lock | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Bernhard Rosenkraenzer <bero> |
Component: | LibreOffice | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | NEW --- | ||
Severity: | critical | CC: | stephane.guillou |
Priority: | medium | Keywords: | haveBacktrace, needsDevAdvice |
Version: | 7.6.3.1 rc | ||
Hardware: | All | ||
OS: | Linux (All) | ||
See Also: | https://bugs.documentfoundation.org/show_bug.cgi?id=158107 | ||
Whiteboard: | |||
Crash report or crash signature: | Regression By: | ||
Bug Depends on: | |||
Bug Blocks: | 133092 | ||
Attachments: | information from debugger on FreeBSD-14/amd64 |
Description
Bernhard Rosenkraenzer
2023-11-05 22:58:32 UTC
No repro with: Version: 7.6.3.1 (X86_64) / LibreOffice Community Build ID: c4af5b1259bceea6e979e6fe2435dbee7a5a87c2 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded Also tried qt5/kf5 (cairo+xcb) and gen VCL plugins, no crash either. Which distribution and desktop environment are you using? OpenMandriva Cooker with Plasma 6. Like bug 158107, we also use LLVM 17, so there may be a connection there. It looks like this is triggered by something the compiler does (I can produce a working build by adding -O0 to compiler flags in some directories), but I doubt it's a compiler bug because I get the crash on startup with both clang 17.0.5 and gcc 13.1. Probably undefined behavior somewhere that happens to work as expected with some compilers and (disabled) optimizations. So far I haven't isolated the particular file that needs to be built with -O0 to make it work (if any -- might of course be multiple files). I also reproduce this on Chimera Linux (clang 17 and musl), same backtrace. (7.6.2.1 likewise also works for us) Created attachment 191927 [details]
information from debugger on FreeBSD-14/amd64
"Me too" -- running into the same crash on FreeBSD-14/amd64. Compiled via port using the default compiler (clang-17.0.6) with LTO enabled.
I invoke it as `libreoffice /path/to/my/spreadsheet.csv`
The program starts, asks me about recovering the same CSV (after the earlier crashes), I tell it to "discard all" and it proceeds to ask me about the CS-conversion options (column-delimiter, etcætera), I accept the choices and BOOM.
Attaching the debug-session showing very similar stack to that seen by the others here, and the invalid value of the mutex-pointer, which is the immediate reason for the crash...
I'm going to try recompiling it all again _without LTO_ now...
FWIW we're currently "fixing" this in OpenMandriva by building LO with: make # FIXME workaround for what is either nasty undefined behavior in LO # or a pretty bad compiler bug sed -i -e 's,export CXXFLAGS=.*,export CXXFLAGS=-O0,' config_host.mk sed -i -e 's,export CFLAGS=.*,export CFLAGS=-O0,' config_host.mk sed -i -e 's,export LDFLAGS=.*,export LDFLAGS=-O0,' config_host.mk for i in framework svtools; do cd $i make clean make cd .. done Obviously this is not the nicest thing to do, but better than the crash or disabling optimizations globally any day. (In reply to Mikhail T. from comment #6) > I'm going to try recompiling it all again _without LTO_ now... Yes, rebuilding without LTO helped... By the way, my version is 7.6.4.1. Setting to "new" as 3 people can reproduce, and "critical" as it's a crash. But asking for dev input. |