Thunar freezes when left inactive for a while

Bug #1679488 reported by Mikko Rytkönen on 2017-04-04
108
This bug affects 22 people
Affects Status Importance Assigned to Milestone
thunar (Ubuntu)
Status tracked in Artful
Xenial
Undecided
Sean Davis
Yakkety
Undecided
Sean Davis
Zesty
Undecided
Sean Davis
Artful
Undecided
Unassigned

Bug Description

[Impact]

 * Thunar freezes after a period of inactivity.
 * The process has to completely stopped so the user can resume usage.
 * Users have reported the issue to happen more frequently when files have been modified in the current directory.
 * Several affected users have reported the issue resolved with this patch.

[Test Case]

 * Open Thunar and wait.
 * Use another application to create files in the current directory.
 * After some time, the application will become unresponsive.

[Regression Potential]

 * The patch eliminates a deadlock in Thunar's file monitor mechanism, so regression potential is small.
 * Since Thunar will no longer freeze over time with this fix, other bugs could become more pronounced.

[Original Report]

Thunar keeps constantly freezing when I leave it inactive for a while.

I haven't seen it freeze while using it, but when I use some other application for a while and switch back to Thunar window it is often completely frozen and I have to kill it. Zero CPU usage, window not responding. This started to happen a couple of weeks ago.

I have the exact same problem in two different installations, one on virtual machine on Windows, other on a Asus Zenbook laptop.

Ubuntu 16.04.1 LTS
Thunar 1.6.10-2ubuntu1

I just found out how to reproduce this: Edit and save a file visible in Thunar using QtCreator.

Apparently QtCreator (4.2.1) creates a temporary file during saving. When I edit a test.txt file and save it, a new test.txt.YY4824 appears in the directory right before Thunar freezes.

This explains the behavior I have been seeing as I use QtCreator a lot on both machines.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in thunar (Ubuntu):
status: New → Confirmed
pete (a-gillen) wrote :

hallo,

could it depend on the external drive you are using ?

I have on some usb-ports the problem that there is not starting possible from suspend- or sleep-modus.

maybe that is a way to the sollution

The files I'm editing are not on external drives. I don't even have any external drives connected to the laptop, only internal SSD.

I have same problem on my desktop (xubuntu 16.04.4) with SSD (Kingston). And apparently reproduced with same way. When QtCreator(4.2.1) autosave file while folder with edited file is open in Thunar (1.6.11).

Alan Moore (alanmoore) wrote :

Hi all,

I have the same problem. I don't use QtCreator as such, but I often use Qt apps such as QGIS. I'm not sure there's a 1-to-1 correlation between me using QGIS and Thunar freezing in the background, I haven't done enough testing, but it's definitely possible there's something in Qt triggering this. My Thunar version is 1.6.11, running on Xubuntu 16.04.

Alan Moore (alanmoore) wrote :

Maybe I should add that I don't think I experienced this issue before I upgraded Thunar from 1.6.10 to 1.6.11, so it appears to me that it's a regression introduced in the latest version. But I could be wrong.

sqall (ubuntu-one-sqall) wrote :

In my case it is PyCharm which crashes Thunar.

Robert Jansen (rj6603) wrote :

Thunar 1.6.11 hangs (Xubuntu 16.04.2), mainly after doing a user switch and back again.
No SSD, no QtCreator nor a physical external drive involved.
This is what happens, reproducably:
User A ( home directory on an internal ext4 partition ) opens two Thunar windows. Then user B logs in ( home directory on a LUKS volume, not a LUKS partition but a file on a normal ext4 partition ) and also starts Thunar. Then user B logs out again and upon return to the user A session both Thunar windows hang.

This started around the end of febuary.

Andreas Nadobnik (andy1971) wrote :

I can confirm this issue on our computers running Ubuntu 16.04.2 LTS with Xfce.

As soon as qtcreator (3.5.1+dfsg-2ubuntu2) autosave a file, Thunar (1.6.11-0ubuntu0.16.04.1) freezes.

And also I can confirm that this behavior doesn't happen when downgrading to Thunar version 1.6.10-2ubuntu1.

sudo apt-get install thunar=1.6.10-2ubuntu1 thunar-data=1.6.10-2ubuntu1 libthunarx-2-0=1.6.10-2ubuntu1

Btw... it is independent if qtcreator was started from Thunar or from start menu. As long as Thunar shows the files within the directory where qtcreator autosave these files, Thunar will freeze.

Kev Bowring (flocculant) wrote :

We are testing a patch from Xfce for this issue, if you want to test that https://lists.ubuntu.com/archives/xubuntu-devel/2017-April/011481.html

Alan Moore (alanmoore) wrote :

Thanks a lot, Kev. I'm however not an advanced user, and I'm not sure what to do with the patch provided, how to implemented it on my system in order to test it. Could you post a link to some tutorial or something like that? Thank you!

Andreas Nadobnik (andy1971) wrote :

Thanks, Kev.

This patch works fine on our side. I tested this under Ubuntu 16.04.2 LTS with Xfce Desktop. Any chance that this patch will be deployed through xenial-updates?

@Alan,
take a look into the attachment from Kev. It's a small script with some comments inside, which could help you.

Kev Bowring (flocculant) wrote :

@andy1971 - we plan to SRU the fix once it's had some testing - so anyone affected can do that ;)

halogen2 (halogen2) wrote :

Hi, another affected user here.

The patch noted in comment #11 does fix this bug for me. Thank you Kev!

The patch mentioned in #11 worked for me too. No more freezes!

Shuhao (shuhao) wrote :

Not sure if this is related, but I've also seen another issue where after the hang, subsequent startup of thunar will hang for a while before starting.

Running thunar under strace shows:

poll([{fd=5, events=POLLIN}], 1, 25000) = 1 ([{fd=5, revents=POLLIN}])
recvmsg(5, {msg_name(0)=NULL, msg_iov(1)=[{"l\2\1\1\t\0\0\0\3\0\0\0=\0\0\0\6\1s\0\7\0\0\0:1.1341\0"..., 2048}], msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEX
EC) = 89
write(4, "\1\0\0\0\0\0\0\0", 8) = 8
recvmsg(5, 0x7ffd25dc3a60, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)

Kev Bowring (flocculant) wrote :

@ shuhao - is that with current Thunar or with patched?

Kev Bowring (flocculant) wrote :

There is now a package available on one of the Xubuntu Dev ppa's - https://launchpad.net/~xubuntu-dev/+archive/ubuntu/xubuntu-staging for people more likely to want that. 16.04 and 17.04 only.

Wild Man (wildmanne39) wrote :

This bug effected my 16.04 system too, it took a little longer to present then I had expected, the patch from comment 11 solved the issue for me.

Alan Moore (alanmoore) wrote :

The patch works like a charm on Xubuntu 16.04. Thank you!

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package thunar - 1.6.11-1ubuntu1

---------------
thunar (1.6.11-1ubuntu1) devel; urgency=medium

  * d/p/02_fix-deadlock-in-mutex-causing-thunar-to-hang.patch:
    - Add an upstream commit to fix hanging. (LP: #1679488, Xfce bz #13481)

 -- Unit 193 <email address hidden> Sat, 29 Apr 2017 15:33:37 -0400

Changed in thunar (Ubuntu):
status: Confirmed → Fix Released
Robert Jansen (rj6603) wrote :

I am using Thunar 1.6.11 on

Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial

Thunar still freezes on a daily basis.

sqall (ubuntu-one-sqall) wrote :

In my system too. I am working on a fully patched Xubuntu 16.04.2 LTS. But it seems that the package is still not available in the repository:

sqall@de0b:~$ cat /etc/issue
Ubuntu 16.04.2 LTS \n \l

sqall@de0b:~$ dpkg -l | grep thunar
[...]
ii thunar 1.6.11-0ubuntu0.16.04.1
[...]

When will it be available there?

Kev Bowring (flocculant) wrote :

The updated version has landed in the artful repos - we needed that to happen before we could SRU it back to other releases.

Sean Davis (bluesabre) on 2017-05-25
description: updated
Sean Davis (bluesabre) wrote :

We're beginning the SRU process now as defined here: https://wiki.ubuntu.com/StableReleaseUpdates

Xenial, Yakketty, and Zesty SRU packages include this patch (originally included in Artful).

Sean Davis (bluesabre) on 2017-05-25
Changed in thunar (Ubuntu Xenial):
status: New → In Progress
assignee: nobody → Sean Davis (bluesabre)
Changed in thunar (Ubuntu Yakkety):
status: New → In Progress
assignee: nobody → Sean Davis (bluesabre)
Changed in thunar (Ubuntu Zesty):
status: New → In Progress
assignee: nobody → Sean Davis (bluesabre)

Hello Mikko, or anyone else affected,

Accepted thunar into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/thunar/1.6.11-1ubuntu0.17.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in thunar (Ubuntu Zesty):
status: In Progress → Fix Committed
tags: added: verification-needed
Changed in thunar (Ubuntu Yakkety):
status: In Progress → Fix Committed
Andy Whitcroft (apw) wrote :

Hello Mikko, or anyone else affected,

Accepted thunar into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/thunar/1.6.11-0ubuntu0.16.10.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in thunar (Ubuntu Xenial):
status: In Progress → Fix Committed
Andy Whitcroft (apw) wrote :

Hello Mikko, or anyone else affected,

Accepted thunar into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/thunar/1.6.11-0ubuntu0.16.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

halogen2 (halogen2) wrote :

Looks fixed here in the Thunar version from xenial-proposed, 1.6.11-0ubuntu0.16.04.2

Thanks!

davidhcefx (davidhcefx) wrote :

[Test Case]
 * Open Thunar and wait.
 * Use another application to create files in the current directory.
 * After some time, the application will become unresponsive.

------------------------------------------------------------------
It's not that easy for me to reproduce this issue.
I've tried to edit file with Terminal, Gedit, SublimeText, CodeBlocks, while Thunar was opened, but I hadn't seen anything goes wrong, until I switch to the desktop dir.

Here's how I reproduce it:
1. Open up thunar at ~/.config/xfce4/desktop
2. Change a file's position on your desktop
3. Go back to thunar, and it freezes immediately.

$ uname -rvp
4.8.0-54-generic #57~16.04.1-Ubuntu SMP Wed May 24 16:22:28 UTC 2017 x86_64
$ xfdesktop -V
這是 xfdesktop 版本 4.12.3,運行於 Xfce 4.12。
依 GTK+ 2.24.28 建置,以 GTK+ 2.24.30 連結。
建置選項:
桌面選單:已啟用
桌面圖示:已啟用
桌面檔案圖示:已啟用

davidhcefx (davidhcefx) wrote :

sorry for providing a wrong info
It should be:
  Linux 4.8.0-54
  Ubuntu 16.04.1
  Thunar 1.6.11 (Xfce 4.12)

Installed version 1.6.11-0ubuntu0.16.04.2 and could not reproduce the freeze anymore. Seems to be fixed.

Matt Hall (haldix) wrote :

Have just done a clean install of Xubuntu 16.04.2. (Linux 4.8.0-54)
Thunar 1.6.11 freezes completely every time a file is changed in the current folder. In most cases the only way to close it is to kill it with task manager. For practical purposes this makes it unusable.
When frozen task manager shows Thunar with zero cpu usage

Sean Davis (bluesabre) wrote :

@Matt Hall

This sounds exactly like the issue that this update is trying to resolve. Can you restart your machine and paste the output from this command:

apt-cache policy thunar

I just want to be sure that you are running the latest version and that the old version is no longer in memory.

Sean Davis (bluesabre) wrote :

It appears that verification is done for Xenial.

tags: added: verification-needed-xenial verification-needed-yakkety verification-needed-zesty

As part of a recent change in the Stable Release Update verification policy we would like to inform that for a bug to be considered verified for a given release a verification-done-$RELEASE tag needs to be added to the bug where $RELEASE is the name of the series the package that was tested (e.g. verification-done-xenial). Please note that the global 'verification-done' tag can no longer be used for this purpose.

Thank you!

Marf (lpad-o-sirtwist) on 2017-06-29
Changed in thunar (Ubuntu Xenial):
status: Fix Committed → Fix Released
Marf (lpad-o-sirtwist) wrote :

Wrongly clicked "Fix released". Please can someone revert this?

I'm very sorry for the incovenience!

Sean Davis (bluesabre) wrote :

Reverted, thanks Marf.

Changed in thunar (Ubuntu Xenial):
status: Fix Released → Fix Committed
Kev Bowring (flocculant) wrote :

tested on a xenial I installed - using 1.6.11-0ubuntu0.16.04.2

tags: added: verification-done-xenial
removed: verification-needed verification-needed-xenial
Łukasz Zemczak (sil2100) wrote :

Could anyone test this on zesty as well?

Kev Bowring (flocculant) wrote :

@sil2100 - tested on a virtual zesty.

thunar 1.6.11-1ubuntu0.17.04.1

tags: added: verification-done-zesty
removed: verification-needed-zesty
Kev Bowring (flocculant) wrote :

Won't be doing any testing yakkety though. EOL pretty much imminent.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package thunar - 1.6.11-0ubuntu0.16.04.2

---------------
thunar (1.6.11-0ubuntu0.16.04.2) xenial; urgency=medium

  * d/p/02_fix-deadlock-in-mutex-causing-thunar-to-hang.patch:
    - Fixes process hang after inactivity (LP: #1679488)

 -- Sean Davis <email address hidden> Wed, 24 May 2017 21:40:29 -0400

Changed in thunar (Ubuntu Xenial):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for thunar has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package thunar - 1.6.11-1ubuntu0.17.04.1

---------------
thunar (1.6.11-1ubuntu0.17.04.1) zesty; urgency=medium

  * No change backport to zesty
    - Fixes process hang after inactivity (LP: #1679488)

 -- Sean Davis <email address hidden> Wed, 24 May 2017 21:35:20 -0400

Changed in thunar (Ubuntu Zesty):
status: Fix Committed → Fix Released
Ralph Williamson (ralphkw1) wrote :

Wanted to add an additional trigger in case someone else is searching for a solution. Running yocto bitbake build in a terminal will cause thunar lockup also. This patch fixed it for me also.

Robert Jansen (rj6603) wrote :

Cool, fixed at last :)

So when will is this patch going to hit my machines ?
Cant find it in the repo

Kev Bowring (flocculant) wrote :

@rj6603 - landed in repos middle of July for 16.04 and 17.04

Sean Davis (bluesabre) wrote :

Yakkety is EOL as of July 20, 2017

Changed in thunar (Ubuntu Yakkety):
status: Fix Committed → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers