[snap] With libreoffice 5.4.0, soffice.bin is defunct after closing the application

Bug #1713730 reported by Olivier Tilloy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libreoffice (Ubuntu)
Fix Released
High
Olivier Tilloy

Bug Description

Testing the libreoffice 5.4.0.3 snap on x86-64, the first time around the app launches fine, but after closing it it won't launch again.

This is because soffice.bin remains as a zombie process and /snap/libreoffice/current/libreoffice.wrapper never exits.

Upon inspection, the following seccomp denial is what causes the process to hang:

type=SECCOMP msg=audit(1504011042.386:4724): auid=1000 uid=1000 gid=1000 ses=4 pid=13187 comm="soffice.bin" exe="/snap/libreoffice/x4/lib/libreoffice/program/soffice.bin" sig=31 arch=c000003e syscall=94 compat=0 ip=0x7fc938d2a327 code=0x0

syscall=94 is lchown, of which there is only one call in the libreoffice codebase, in attemptChangeMetadata (sal/osl/unx/file_misc.cxx).

Tags: snap
Revision history for this message
Olivier Tilloy (osomon) wrote :

When using strace (instructions at https://forum.snapcraft.io/t/stracing-snap-commands/1433), I'm seeing the app hang there:

[pid 23997] lstat("/home/osomon/snap/libreoffice/x9/.config/libreoffice/4/user/pack/database/biblio/biblio.pack", {st_dev=makedev(0, 81), st_ino=5641910, st_mode=S_IFREG|0600, st_nlink=1, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=48, st_size=13904, st_atime=2017-08-30T09:08:36+0200.279519047, st_mtime=2017-08-30T09:07:35+0200, st_ctime=2017-08-30T09:07:35+0200.926767602}) = 0
[pid 23997] unlink("/home/osomon/snap/libreoffice/x9/.config/libreoffice/4/user/pack/database/biblio/biblio.pack") = 0
[pid 23997] rename("/tmp/nRoOht", "/home/osomon/snap/libreoffice/x9/.config/libreoffice/4/user/pack/database/biblio/biblio.pack") = -1 EXDEV (Invalid cross-device link)
[pid 23997] lstat("/tmp/nRoOht", {st_dev=makedev(0, 43), st_ino=44, st_mode=S_IFREG|0600, st_nlink=1, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=32, st_size=13904, st_atime=2017-08-30T09:10:11+0200.116690453, st_mtime=2017-08-30T09:10:11+0200.116690453, st_ctime=2017-08-30T09:10:11+0200.116690453}) = 0
[pid 23997] stat("/home/osomon/snap/libreoffice/x9/.config/libreoffice/4/user/pack/database/biblio/biblio.pack", 0x7fff0a2ec3d0) = -1 ENOENT (No such file or directory)
[pid 23997] open("/tmp/nRoOht", O_RDONLY) = 16
[pid 23997] fstat(16, {st_dev=makedev(0, 43), st_ino=44, st_mode=S_IFREG|0600, st_nlink=1, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=32, st_size=13904, st_atime=2017-08-30T09:10:11+0200.116690453, st_mtime=2017-08-30T09:10:11+0200.116690453, st_ctime=2017-08-30T09:10:11+0200.116690453}) = 0
[pid 23997] open("/home/osomon/snap/libreoffice/x9/.config/libreoffice/4/user/pack/database/biblio/biblio.pack", O_WRONLY|O_CREAT, 0100600) = 17
[pid 23997] pread64(16, "PACK\0\0\0\2\0\tR\tAf\344K\0\0\31\37\0\6b\222\36*\353\31\0\0\35\21"..., 13904, 0) = 13904
[pid 23997] write(17, "PACK\0\0\0\2\0\tR\tAf\344K\0\0\31\37\0\6b\222\36*\353\31\0\0\35\21"..., 13904) = 13904
[pid 23997] close(16) = 0
[pid 23997] close(17) = 0
[pid 23997] utime("/home/osomon/snap/libreoffice/x9/.config/libreoffice/4/user/pack/database/biblio/biblio.pack", {actime=2017-08-30T09:10:11+0200, modtime=2017-08-30T09:10:11+0200}) = 0
[pid 23997] getuid() = 1000
[pid 23997] lchown("/home/osomon/snap/libreoffice/x9/.config/libreoffice/4/user/pack/database/biblio/biblio.pack", 1000, 1000) = ?

Revision history for this message
Olivier Tilloy (osomon) wrote :
Changed in libreoffice (Ubuntu):
status: Triaged → In Progress
Olivier Tilloy (osomon)
Changed in libreoffice (Ubuntu):
status: In Progress → Fix Committed
Olivier Tilloy (osomon)
Changed in libreoffice (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.