[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#968107: POSIX locks not working on fuse fileystems for thunderbird



Package: src:linux
Version: 4.19.132-1
Severity: normal

After updating an i386 system from stretch to buster, it was found that
thunderbird no longer works, instead showing every time the message:
> Thunderbird is already running, but is not responding. To open a new
window, you must first close the existing Thunderbird process, or
restart your system.


strace showed that it is finally shown after thunderbird loops a number
of times on: 

 openat(AT_FDCWD, "<$HOME>/.thunderbird/Profiles/<profile name>/.parentlock", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 7
 fcntl64(7, F_GETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0, l_len=0, l_pid=3085726144}) = 0
 fcntl64(7, F_SETLK, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = -1 EACCES
 close(7)                    = 0

this is part of nsProfileLock::Lock() at source file nsProfileLock.cpp


The issue is, another instance of thunderbird was *NOT* running. The
issue manifesting itself every time, even just after booting, also after
removing the exiting .parentlock.

Manually doing these operations from a separate test program worked,
though, so it's not that POSIX locks (even on that same file)
*sometimes* work.

Finally, it was determined that the error only happened if the profile
was in a fuse filesystem, as tested on exFAT and ntfs-3g. Even more
intriguing, on sshfs the old profile doesn't work but a new one does?!

Downgrading thunderbird from 1:68.9.0-1~deb9u1 to 1:68.8.0-1~deb9u1 made
no difference, as didn't downgrading libfuse from 2.9.9-1+deb10u1 to
2.9.7-1+deb9u2. However, going back from 4.19.0-10-686-pae to the old
stretch kernel 4.9.0-12-686-pae makes thunderbird work again. Going
forwards to 5.6.0-0.bpo.2-686-pae, it still fails.

Thus, it seems that some change in the new kernel makes POSIX locks not
work on a fuse filesystem (and fail with EACCES, as opposed to e.g.
EOPNOTSUPP) but only under certain conditions that seem to be triggered
by thunderbird but not by a simpler program.
Interestingly, firefox (which would supposedly use the same profile
locking code) did not show any issue on that same system.

Also, the number of file locks was not limited (this is only the second
F_WRLCK in the process, anyway):
file locks                      (-x) unlimited


-- Package-specific info:
** Version:
Linux version 4.19.0-10-686-pae (debian-kernel@lists.debian.org) (gcc
version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.132-1 (2020-07-24)

** Command line:
BOOT_IMAGE=/boot/vmlinuz-4.19.0-10-686-pae root=UUID=<ellided> ro quiet

** Not tainted


** Model information

** Loaded modules:
netlink_diag
speedstep_lib
cpufreq_userspace
cpufreq_powersave
cpufreq_conservative
rfkill
binfmt_misc
fuse
snd_intel8x0
snd_ac97_codec
ac97_bus
snd_pcm
joydev
snd_timer
snd
iTCO_wdt
soundcore
intel_powerclamp
iTCO_vendor_support
sg
pcspkr
serio_raw
rng_core
evdev
parport_pc
ppdev
lp
parport
ip_tables
x_tables
autofs4
ext4
crc16
mbcache
jbd2
crc32c_generic
fscrypto
ecb
crypto_simd
cryptd
aes_i586
hid_generic
usbhid
hid
sd_mod
ata_generic
nouveau
psmouse
ata_piix
mxm_wmi
wmi
video
i2c_algo_bit
libata
ttm
drm_kms_helper
uhci_hcd
ehci_pci
i2c_i801
ehci_hcd
drm
scsi_mod
usbcore
8139too
8139cp
lpc_ich
mfd_core
mii
usb_common
thermal
fan
floppy
button


-- System Information:
Debian Release: 10.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 4.19.0-10-686-pae (SMP w/2 CPU cores)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages linux-image-4.19.0-10-686-pae depends on:
ii  initramfs-tools [linux-initramfs-tool]  0.133+deb10u1
ii  kmod                                    26-1
ii  linux-base                              4.6

Versions of packages linux-image-4.19.0-10-686-pae recommends:
ii  apparmor             2.13.2-10
ii  firmware-linux-free  3.4

Versions of packages linux-image-4.19.0-10-686-pae suggests:
pn  debian-kernel-handbook  <none>
ii  grub-pc                 2.02+dfsg1-20+deb10u2
pn  linux-doc-4.19          <none>

Versions of packages linux-image-4.19.0-10-686-pae is related to:
pn  firmware-amd-graphics     <none>
pn  firmware-atheros          <none>
pn  firmware-bnx2             <none>
pn  firmware-bnx2x            <none>
pn  firmware-brcm80211        <none>
pn  firmware-cavium           <none>
pn  firmware-intel-sound      <none>
pn  firmware-intelwimax       <none>
pn  firmware-ipw2x00          <none>
pn  firmware-ivtv             <none>
pn  firmware-iwlwifi          <none>
pn  firmware-libertas         <none>
pn  firmware-linux-nonfree    <none>
pn  firmware-misc-nonfree     <none>
pn  firmware-myricom          <none>
pn  firmware-netxen           <none>
pn  firmware-qlogic           <none>
pn  firmware-realtek          <none>
pn  firmware-samsung          <none>
pn  firmware-siano            <none>
pn  firmware-ti-connectivity  <none>
pn  xen-hypervisor            <none>

-- no debconf information


Reply to: