You are not logged in.

#1 2021-03-01 13:06:57

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 585

[SOLVED] libreoffice crashes with double free or corruption.

After my last full systeem update (Saturday 2021/27/02) Libreoffice Calc crashes when manipulating filters with.

double free or corruption (!prev)
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = soffice.bin path = /usr/lib/libreoffice/program pid = 49025
KCrash: Arguments: /usr/lib/libreoffice/program/soffice.bin --nocrashhandler

Any idea what this error means? I use KDE.

Last edited by firewalker (2021-03-09 10:21:24)


Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

#2 2021-03-01 13:15:17

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 585

Re: [SOLVED] libreoffice crashes with double free or corruption.

Now it crashed with corrupted size vs. prev_size

corrupted size vs. prev_size
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = soffice.bin path = /usr/lib/libreoffice/program pid = 51940
KCrash: Arguments: /usr/lib/libreoffice/program/soffice.bin --nocrashhandler

Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

#3 2021-03-01 13:55:40

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 585

Re: [SOLVED] libreoffice crashes with double free or corruption.

Now, with corrupted double-linked list.

What could be the common on those errors? Glibc?


Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

#4 2021-03-01 14:19:31

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,550

Re: [SOLVED] libreoffice crashes with double free or corruption.

stackoverflow

Is this really the entire backtrace/crashlog you can get? coredumpctl?
Do you use the KDE/plasma SAL and what if you don't?

Offline

#5 2021-03-01 14:41:56

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 585

Re: [SOLVED] libreoffice crashes with double free or corruption.

coredumpctl list, doesn't show any coredump for libreoffice. I will try to crash contisniously and check for a coredump. I am trying to attach gdb but it doesn't seem to work.


Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

#6 2021-03-01 14:45:25

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,550

Re: [SOLVED] libreoffice crashes with double free or corruption.

You need to
a) attach it to soffice.bin (libreoffice etc. are scripts)
b) "echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope" in order to be allowed to

Edit: "doesn't seem to work" is usually not a helpful problem description, see the stickies tongue

Last edited by seth (2021-03-01 14:46:22)

Offline

#7 2021-03-01 18:34:33

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 585

Re: [SOLVED] libreoffice crashes with double free or corruption.

I tried to attach gdb to soffice.bin but it would freeze it. Not just libreoffice. It will freeze anything gui related until I kill gdb. It;s been a while since I had to debug a program.

GNU gdb (GDB) 10.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Attaching to process 6026
[New LWP 6033]
[New LWP 6034]
[New LWP 6035]
[New LWP 6037]
[New LWP 6041]
[New LWP 6042]
[New LWP 6043]
[New LWP 6044]
[New LWP 6045]
[New LWP 6046]
[New LWP 6047]
[New LWP 6048]
[New LWP 6049]
[New LWP 6050]
[New LWP 6051]
[New LWP 6052]
[New LWP 6053]
[New LWP 6054]
[New LWP 6066]
[New LWP 6562]
Error while reading shared library symbols for /usr/lib/libpthread.so.0:
Cannot find user-level thread for LWP 6562: generic error
0x00007fe8f43dc37f in poll () from /usr/lib/libc.so.6
(gdb) c
Continuing.
Cannot find user-level thread for LWP 6906: generic error
Quit) 

Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

#8 2021-03-01 20:15:58

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 585

Re: [SOLVED] libreoffice crashes with double free or corruption.

OK... The same happens to a windows version of Libreoffice. I will try to generate a coredump on Arch and report it upstream.


Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

#9 2021-03-01 21:12:09

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,550

Re: [SOLVED] libreoffice crashes with double free or corruption.

I don't think stopping soffice.bin in the debugger could somehow freeze the entire GUI - did you maybe attach to kwin?
You could also edit the libreoffice script to "gdb soffice.bin" where you'd need to "run", cause the crash and then "bt".

Offline

#10 2021-03-01 21:37:05

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 585

Re: [SOLVED] libreoffice crashes with double free or corruption.

I can move the mouse but I can't click anything. If I attach gdb from a terminal (Ctrl+Shift+F2), when the "GUI freezes", pressing "c" on gdb it says

Cannot execute this command while the selected thread is running.

It is like an invisible open file dialog or a message box that takes all focus. I really don't know how to describe it. I will try to screen capture it.


Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

#11 2021-03-01 21:42:21

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,550

Re: [SOLVED] libreoffice crashes with double free or corruption.

Do you attach gdb to soffice.bin *after* it has crashed and drkonqi is already presenting your a crash dialog?

Offline

#12 2021-03-02 06:36:55

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 585

Re: [SOLVED] libreoffice crashes with double free or corruption.

No. I attach it before the crash. Dr doesn't presents a dialog. After several tries, only the GUI of libreoffice locked. See the following video. I found some references for a gdb bug?

https://www.youtube.com/watch?v=2tTv-q2Et-0


Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

#13 2021-03-02 09:09:15

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,550

Re: [SOLVED] libreoffice crashes with double free or corruption.

This looks like a glibc mismatch and would fit your overall libreoffice issues.
I don't see a preloaded glibc in the general libreoffice-fresh package, but did you do anthing itr. or something as terrible as symlinking libc/libpthread versions around?

pacman -Qkk glibc
ls -l /usr/lib/libc.* /usr/lib/libpthread*

Offline

#14 2021-03-02 09:53:08

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 585

Re: [SOLVED] libreoffice crashes with double free or corruption.

I don;t remember messing with glibc. An the crash of libreoffice also happens in a Windows 10 system.

[11:43 - firewalker@laptop ~]$ pacman -Qkk glibc
backup file: glibc: /etc/locale.gen (Modification time mismatch)
backup file: glibc: /etc/locale.gen (Size mismatch)
glibc: 1578 total files, 0 altered files
[11:43 - firewalker@laptop ~]$ ls -l /usr/lib/libc.* /usr/lib/libpthread*
-rw-r--r-- 1 root root 5285168 Feb 13 23:39 /usr/lib/libc.a
-rw-r--r-- 1 root root     255 Feb 13 23:39 /usr/lib/libc.so
lrwxrwxrwx 1 root root      12 Feb 13 23:39 /usr/lib/libc.so.6 -> libc-2.33.so
-rwxr-xr-x 1 root root  154032 Feb 13 23:39 /usr/lib/libpthread-2.33.so
-rw-r--r-- 1 root root  420330 Feb 13 23:39 /usr/lib/libpthread.a
lrwxrwxrwx 1 root root      15 Feb 13 23:39 /usr/lib/libpthread.so -> libpthread.so.0
lrwxrwxrwx 1 root root      18 Feb 13 23:39 /usr/lib/libpthread.so.0 -> libpthread-2.33.so

I submitted an upstream bug report. I included the file that causes the crash and a video demonstrating the crash.

https://bugs.documentfoundation.org/sho … ?id=140754


Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

#15 2021-03-02 16:41:45

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 585

Re: [SOLVED] libreoffice crashes with double free or corruption.

I can no logger reproduce the issue on Windows 10. It seems that the crash on windows was unrelated. After a system restart no more crashes. Back to square one...


Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

#16 2021-03-03 06:55:24

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 585

Re: [SOLVED] libreoffice crashes with double free or corruption.

It seems more people corfimd it. On GNU/Linux and on Windows.

https://bugs.documentfoundation.org/sho … ?id=140754

Still dont;t know what the issue with gdb is.


Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

#17 2021-03-03 08:06:48

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,550

Re: [SOLVED] libreoffice crashes with double free or corruption.

An early stackoverflow or some preloaded lib or a static link … or something else sad
Try to run soffice.bin in gdb by editing the libreoffice script (you'll have to run it from an interactive shell and "run" it to make it do anything.

Offline

#18 2021-03-09 10:22:03

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 585

Re: [SOLVED] libreoffice crashes with double free or corruption.

The fix will be available on version 7.2.0.

As a workaround someone could disable the "Enable multi-threaded calculation" option.

https://i.imgur.com/dWZxdUP.png


moderator edit -- replaced oversized image with link.
Pasting pictures and code

Last edited by 2ManyDogs (2021-03-09 13:27:44)


Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

Board footer

Powered by FluxBB