Bug 150479 - LibreOffice does not open files After upgrading Ubuntu to 22.04.01
Summary: LibreOffice does not open files After upgrading Ubuntu to 22.04.01
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.3.5.2 release
Hardware: All Linux (All)
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-18 16:12 UTC by Slava
Modified: 2022-08-25 19:55 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
strace log (772.47 KB, application/octet-stream)
2022-08-19 19:10 UTC, Slava
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Slava 2022-08-18 16:12:59 UTC
Description:
After upgrading Ubuntu to 22.04.1 LTS, LibreOffice Calc and Writer (I did not try other applications) do not open documents, even newly created ones. It freezes and produces a dialog window: "Force quit|Wait".
However, it resumes working normally after reboot, but in ~30 min. stops opening files again.

Steps to Reproduce:
1.Open Calc
2.put some data
3.Save
4.Open 

Actual Results:
On opening a document, Calc freezes for a few seconds with a blank screen, then produces a dialog window "Force quit|Wait"

Expected Results:
Open a document.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
[Information automatically included from LibreOffice]
Locale: en-US
Module: safemode
[Information guessed from browser]
OS: Linux (All)
OS is 64bit: yes

Version: 7.3.5.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 16; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.5-0ubuntu0.22.04.1
Calc: threaded
Comment 1 m_a_riosv 2022-08-18 18:52:30 UTC
Please test with a clean profile, Menu/Help/Restart in Safe Mode
Comment 2 Slava 2022-08-18 18:54:47 UTC
That was done.
Comment 3 Julien Nabet 2022-08-19 18:17:35 UTC
To know if it's gtk related, could you try this:
- launch terminal/console
- type:
export SAL_USE_VCLPLUGIN=gen && soffice --calc
then try to reproduce the pb.

Also do you have any network printer?
Comment 4 Slava 2022-08-19 18:50:38 UTC
I have done:

  export SAL_USE_VCLPLUGIN=gen && soffice --calc

The bug is reproduced.

Yes, I have a network printer.
Comment 5 Julien Nabet 2022-08-19 18:55:12 UTC Comment hidden (obsolete)
Comment 6 Slava 2022-08-19 18:58:08 UTC
I can give you an access to my computer to investigate the bug.
Comment 7 Slava 2022-08-19 18:58:36 UTC
I have turned off my printer, but the bug persists.
Comment 8 Julien Nabet 2022-08-19 19:03:14 UTC
Could you retrieve an strace during the freeze (see https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#GNU.2FLinux:_How_to_get_an_strace_log)?

I'm not a strace expert but I suppose some people may interpret it and find some hints in it.

(you can attach file by using this link:
https://bugs.documentfoundation.org/attachment.cgi?bugid=150479&action=enter)
Comment 9 Slava 2022-08-19 19:10:16 UTC
Created attachment 181891 [details]
strace log
Comment 10 Slava 2022-08-19 19:16:04 UTC
Before opening a document, LibreOffice has produced the first 80338 lines of the trace log, then it hung for ~30 sec., and produced the rest 80508 - 80338 = 170 lines.
Comment 11 Julien Nabet 2022-08-19 19:23:21 UTC
First could you uninstall any LO extension if you've got ones?

Then I know you used safe mode so shouldn't related with a profile pb but I see this on your file:
  80302 165037 15:06:14.324718 mkdir("/home/slava/.config/libreoffice/4/user", 0777) = -1 EEXIST (File exists)
  80303 165037 15:06:14.325116 getpid()         = 164940
  80304 165037 15:06:14.325439 openat(AT_FDCWD, "/home/slava/.config/libreoffice/4/user/Al59Rq", O_RDWR|O_CREAT|O_EXCL, 0600) = 32
  80305 165037 15:06:14.325666 newfstatat(32, "", {st_mode=S_IFREG|0600, st_size=0, ...}, AT_EMPTY_PATH) = 0
  80306 165037 15:06:14.325844 fcntl(32, F_SETLK, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0
  80307 165037 15:06:14.326444 mprotect(0x7f8700036000, 20480, PROT_READ|PROT_WRITE) = 0
  80308 165037 15:06:14.326726 mprotect(0x7f870003b000, 57344, PROT_READ|PROT_WRITE) = 0
  80309 165037 15:06:14.326974 mprotect(0x7f8700049000, 110592, PROT_READ|PROT_WRITE) = 0
  80310 165037 15:06:14.327370 pwrite64(32, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<oor:items xmlns:oor=\"http://openoffice.org/2001/registry\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n<item oor:path=\"/org.openoffice.Office.Common/Filter/Micros"..., 65556, 0) = 65556
  80311 165037 15:06:14.328287 pwrite64(32, "</it></value></prop></item>\n<item oor:path=\"/org.openoffice.Office.Linguistic/ServiceManager/HyphenatorList\"><prop oor:name=\"ru-RU\" oor:op=\"fuse\" oor:type=\"oor:string-list\"><value><it>org.openoffice.lingu.LibHnjHyphenator</it></value></prop></item>\n<item o"..., 32470, 65556) = 32470
  80312 165037 15:06:14.328699 close(32)        = 0
  80313 165037 15:06:14.328865 rename("/home/slava/.config/libreoffice/4/user/Al59Rq", "/home/slava/.config/libreoffice/4/user/registrymodifications.xcu") = 0

Just to be sure, could you apply this?
https://wiki.documentfoundation.org/QA/FirstSteps#Corrupted_user_profile
+ 

Also, do you have Java installed? If yes which precise version/editor/32-64 bits.
You must have in mind that if you use LO 32 bits, you must have Java 32 bits
and if you use LO 64 bits, you must have Java 64 bits.

Finally, after the upgrade, did you restart your machine? (just to be sure we start from a good basis, above all if the upgrade "upgraded" the kernel).
Comment 12 Slava 2022-08-19 19:37:22 UTC
What is "LO extension" and how can I remove it?
What is "profile pb"?

I do not use Java, but:

$ apt list --installed | grep -i java

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

ca-certificates-java/jammy,jammy,now 20190909 all [installed,automatic]
gir1.2-javascriptcoregtk-4.0/jammy-updates,jammy-security,now 2.36.6-0ubuntu0.22.04.1 amd64 [installed,automatic]
java-common/jammy,jammy,now 0.72build2 all [installed,automatic]
javascript-common/jammy,jammy,now 11+nmu1 all [installed,automatic]
libapache-pom-java/jammy,jammy,now 18-1 all [installed,automatic]
libatk-wrapper-java-jni/jammy,now 0.38.0-5build1 amd64 [installed,automatic]
libatk-wrapper-java/jammy,jammy,now 0.38.0-5build1 all [installed,automatic]
libbsh-java/jammy,jammy,now 2.0b4-20 all [installed,automatic]
libcommons-logging-java/jammy,jammy,now 1.2-2 all [installed,automatic]
libcommons-parent-java/jammy,jammy,now 43-1 all [installed,automatic]
libel-api-java/jammy,jammy,now 3.0.0-3 all [installed,automatic]
libfontbox-java/jammy,jammy,now 1:1.8.16-2 all [installed,automatic]
libhsqldb1.8.0-java/jammy,jammy,now 1.8.0.10+dfsg-11 all [installed,automatic]
libjavascriptcoregtk-4.0-18/jammy-updates,jammy-security,now 2.36.6-0ubuntu0.22.04.1 amd64 [installed,automatic]
libjsp-api-java/jammy,jammy,now 2.3.4-3 all [installed,automatic]
liblibreoffice-java/jammy-updates,jammy-updates,now 1:7.3.5-0ubuntu0.22.04.1 all [installed,automatic]
libpdfbox-java/jammy,jammy,now 1:1.8.16-2 all [installed,automatic]
libreoffice-java-common/jammy-updates,jammy-updates,now 1:7.3.5-0ubuntu0.22.04.1 all [installed,automatic]
libservlet-api-java/jammy,jammy,now 4.0.1-2 all [installed,automatic]
libservlet3.1-java/jammy,jammy,now 1:4.0.1-2 all [installed,automatic]
libunoloader-java/jammy-updates,jammy-updates,now 1:7.3.5-0ubuntu0.22.04.1 all [installed,automatic]
libwebsocket-api-java/jammy,jammy,now 1.1-2 all [installed,automatic]
ure-java/jammy-updates,now 1:7.3.5-0ubuntu0.22.04.1 amd64 [installed,automatic]



> Finally, after the upgrade, did you restart your machine?
Yes.

How can I remove my user profile?
By this command?
   rm -r .config/libreoffice/4/user
Comment 13 Slava 2022-08-19 19:47:06 UTC
I have removed all LibreOffice extensions, but the bug persists.
Comment 14 Julien Nabet 2022-08-19 20:03:33 UTC
(In reply to Slava from comment #12)
> ...
> What is "profile pb"?
everything is explained https://wiki.documentfoundation.org/QA/FirstSteps#Corrupted_user_profile (+ follow links) of this part.
In brief, it's the specific directory ~/.config/libreoffice/4/user/
It contains all LO config.

> I do not use Java, but:
> 
> $ apt list --installed | grep -i java
To know if you've got java and its version, just type:
java -version

In my case, I got:
openjdk version "11.0.16" 2022-07-19
OpenJDK Runtime Environment (build 11.0.16+8-post-Debian-1)
OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Debian-1, mixed mode, sharing)

If the command is not found, you should install Java. There are components in LO which depend on Java and I'm really not sure LO can work without Java.

> > Finally, after the upgrade, did you restart your machine?
> Yes.
Ok

> 
> How can I remove my user profile?
> By this command?
>    rm -r .config/libreoffice/4/user

rm -rf ~/.config/libreoffice/4/user

(you can make a backup before just in case you would need it).
Comment 15 Slava 2022-08-19 20:09:45 UTC
$ java -version
openjdk version "11.0.16" 2022-07-19
OpenJDK Runtime Environment (build 11.0.16+8-post-Ubuntu-0ubuntu122.04)
OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Ubuntu-0ubuntu122.04, mixed mode, sharing)

I have done:

$ cd ~/.config/libreoffice/4/
$ mv user user.old

The bug persists.
Comment 16 Julien Nabet 2022-08-19 20:12:37 UTC
Ok I must recognize Iā€™m stuck but surely other people will have some ideas.
Comment 17 Slava 2022-08-19 20:16:34 UTC
Can downgrading LibreOffice solve the problem?
How can i do that?
Comment 18 Slava 2022-08-19 20:25:52 UTC
The problem appears to have started here:

64959 15:06:33.078130 recvmsg(17, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\34\0X\0o\0\340\0\17\1\0\0\221\23\4\t\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0X\0o\0\340\0C\1\0\0\221\23\4\t\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 64
164959 15:06:33.078575 recvmsg(17, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
...
Comment 19 Julien Nabet 2022-08-20 07:14:01 UTC
(In reply to Slava from comment #17)
> Can downgrading LibreOffice solve the problem?
No idea

> How can i do that?
Putting this in Google:
ubuntu downgrade package
gives for example https://www.linuxuprising.com/2019/02/how-to-downgrade-packages-to-specific.html
Comment 20 Julien Nabet 2022-08-20 07:14:32 UTC
(In reply to Slava from comment #18)
> The problem appears to have started here:
> 
> 64959 15:06:33.078130 recvmsg(17, {msg_name=NULL, msg_namelen=0,
> msg_iov=[{iov_base="\34\0X\0o\0\340\0\17\1\0\0\221\23\4\t\0\0\0\0\0\0\0\0\0\0
> \0\0\0\0\0\0\34\0X\0o\0\340\0C\1\0\0\221\23\4\t\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
> \0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 64
> 164959 15:06:33.078575 recvmsg(17, {msg_namelen=0}, 0) = -1 EAGAIN (Resource
> temporarily unavailable)
> ...

which doesn't mean anything for me but perhaps it would for someone else.
Comment 21 Slava 2022-08-20 18:04:27 UTC
> ubuntu downgrade package
> gives for example https://www.linuxuprising.com/2019/02/how-to-downgrade-packages-to-specific.html

Too complicated:

$ apt policy libreoffice
libreoffice:
  Installed: 1:7.3.5-0ubuntu0.22.04.1
  Candidate: 1:7.3.5-0ubuntu0.22.04.1
  Version table:
 *** 1:7.3.5-0ubuntu0.22.04.1 500
        500 http://us.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages
        100 /var/lib/dpkg/status
     1:7.3.2-0ubuntu2 500
        500 http://us.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages

$ sudo apt install libreoffice=1:7.3.2-0ubuntu2
[sudo] password for slava: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libreoffice : Depends: libreoffice-core (= 1:7.3.2-0ubuntu2) but 1:7.3.5-0ubuntu0.22.04.1 is to be installed
               Recommends: libreoffice-nlpsolver but it is not going to be installed
               Recommends: libreoffice-wiki-publisher but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

$ sudo apt install libreoffice=1:7.3.2-0ubuntu2 libreoffice-core=1:7.3.2-0ubuntu2
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libreoffice : Depends: libreoffice-calc but it is not installable
               Recommends: libreoffice-gnome but it is not going to be installed or
                           libreoffice-plasma but it is not going to be installed
               Recommends: libreoffice-nlpsolver but it is not going to be installed
               Recommends: libreoffice-wiki-publisher but it is not going to be installed
 libreoffice-base : Depends: libreoffice-core (= 1:7.3.5-0ubuntu0.22.04.1) but 1:7.3.2-0ubuntu2 is to be installed
 libreoffice-core : Conflicts: libreoffice-core-nogui but 1:7.3.5-0ubuntu0.22.04.1 is to be installed
 libreoffice-core-nogui : Conflicts: libreoffice-core but 1:7.3.2-0ubuntu2 is to be installed
 libreoffice-draw : Depends: libreoffice-core (= 1:7.3.5-0ubuntu0.22.04.1) but 1:7.3.2-0ubuntu2 is to be installed
 libreoffice-impress : Depends: libreoffice-core (= 1:7.3.5-0ubuntu0.22.04.1) but 1:7.3.2-0ubuntu2 is to be installed
 libreoffice-math : Depends: libreoffice-core (= 1:7.3.5-0ubuntu0.22.04.1) but 1:7.3.2-0ubuntu2 is to be installed
 libreoffice-writer : Depends: libreoffice-core (= 1:7.3.5-0ubuntu0.22.04.1) but 1:7.3.2-0ubuntu2 is to be installed
E: Unable to correct problems, you have held broken packages.


I have stopped here.
Comment 22 Julien Nabet 2022-08-20 18:53:56 UTC
(In reply to Slava from comment #21)
> > ubuntu downgrade package
> > gives for example https://www.linuxuprising.com/2019/02/how-to-downgrade-packages-to-specific.html
> 
> Too complicated:
>...
I understand. Anyway, it would have been only a workaround, not the right solution.
Comment 23 Timur 2022-08-20 20:42:28 UTC
Next step is to test with another LO,to know if problem is LO or OS related. 
Preferably you should run LO daily master 7.5+ as single AppImage executable file. 
There are instructions in LO wiki how to download and make it, it's 'Linux parallel install'.
Comment 24 Slava 2022-08-20 22:03:53 UTC
> Preferably you should run LO daily master 7.5+ as single AppImage executable file. 
> There are instructions in LO wiki how to download and make it, it's 'Linux parallel install'.

Could you point me to the web page?
Comment 25 Timur 2022-08-21 08:05:47 UTC
https://wiki.documentfoundation.org/Installing_in_parallel/Linux

Appimage is under Automated installation, although it's not an installation, rather fetch and make the executable file.
Comment 26 Slava 2022-08-21 18:26:28 UTC
$ ./make_libreoffice_appimage.sh daily x86-64 N N N N Y
...
dlopen(): error loading libfuse.so.2

AppImages require FUSE to run. 
You might still be able to extract the contents of this AppImage 
if you run it with the --appimage-extract option. 
See https://github.com/AppImage/AppImageKit/wiki/FUSE 
for more information
+ [[ N == \Y ]]
+ mkdir -p ../out/
+ mv '*.AppImage*' ../out/
mv: cannot stat '*.AppImage*': No such file or directory

------------------------------------------------------------------

https://github.com/AppImage/AppImageKit/wiki/FUSE says:

    Warning: Do not install the fuse package as of 22.04 or you may break your system

I have "Ubuntu 22.04.1 LTS".

What should I do?
Comment 27 Timur 2022-08-21 20:06:40 UTC
Oh you just discovered another issue (Appimage, fuse, fuse3). I cannot test it myself for some time but we should address it somehow before closing this report. 

You may install daily master from debs from https://dev-builds.libreoffice.org/daily/master/current.html
It will keep current LO - which may be snap. 

And that's another test you may make. 
You may remove all LO then install 7.3.latest from snap (sudo snap install libreoffice) and test, then remove LO then install from apt using PPA repository (can be easily found how).
Comment 28 Slava 2022-08-21 23:47:51 UTC
> You may remove all LO then install 7.3.latest from snap (sudo snap install libreoffice) and test.

I have done:

$ sudo apt-get remove --purge libreoffice*
$ sudo apt-get clean
$ sudo apt-get autoremove
$ sudo snap install libreoffice

And the bug got fixed!

> then remove LO then install from apt using PPA repository (can be easily found how).

Can I leave the snap LO on my computer?

I can do something else for you for testing, but I need more detailed instructions.
Comment 29 Timur 2022-08-22 13:05:26 UTC
Snap and Apt programs can coexist, you only need to know how to start them so to differentiate. 
You are welcome to install via apt to also test  that. 

So this is NotABug in LO. 
We don't know how bug arose, is it some glitch solved with LO removal or a reproducible  problem in Ubuntu upgrade (if there will be more reports, than its that).
Comment 30 Slava 2022-08-22 13:50:25 UTC
Before opening this ticket I have reinstalled LO via apt, and the bug persisted.
So, the bug looks to be with LO dependencies.
Comment 31 yengst 2022-08-25 19:55:50 UTC
I got it to work (linux mint 21 Cinnamon, kernel 5.15.0-46). Must have been a config file leftover...

$ sudo apt-get remove --purge libreoffice*
$ sudo apt-get clean
$ sudo apt-get autoremove
$ sudo apt install libreoffice

LO had to start in safe-mode. I selected 'factory settings' and restarted.
All seems functional now.