Bug 208341 - [PATCH] x11-fm/thunar: fix random crashes on file / folder rename
Summary: [PATCH] x11-fm/thunar: fix random crashes on file / folder rename
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Olivier Duchateau
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-03-27 21:33 UTC by Matthias Petermann
Modified: 2016-11-17 16:26 UTC (History)
5 users (show)

See Also:
bugzilla: maintainer-feedback? (xfce)


Attachments
Patch file for x11-fm/thunar (2.62 KB, patch)
2016-03-27 21:33 UTC, Matthias Petermann
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Petermann 2016-03-27 21:33:46 UTC
Created attachment 168705 [details]
Patch file for x11-fm/thunar

Thunar 1.6.10 has a bug which causes it to randomly crash when renaming files / folders [1]. There is no recent upstream version fixing this issue.
The attached patch applies the necessary changes to Thunar in FreeBSD ports. The origin of this solution is Slackware [2].

I did verify this solution and would really appreciate it if someone with the commit bit could check it in. In case of questions I'd be happy to hear from you.

Best regards & thanks,
Matthias


[1]
http://www.linuxquestions.org/questions/slackware-14/thunar-1-6-10-crash
es-randomly-while-renaming-files-64bit-current-4175560072/

[2]
http://mirrors.slackware.com/slackware/slackware64-current/source/xfce/T
hunar/0001-Deactivate-SEND_MOVED-code-paths.patch.gz
Comment 1 Vladimir Omelchuk 2016-03-29 01:59:04 UTC
Thunar 1.6.10 with this patch still crash, when renaming files / folders.

<uname>
FreeBSD 10.3-RELEASE amd64

<make.conf>
CPUTYPE?=core2
OPTIONS_SET=CUPS
WITHOUT_LPR=YES
DEFAULT_VERSIONS=apache=2.4
QT4_OPTIONS=CUPS NAS QGTKSTYLE
LOCALIZED_LANG=ru
DEFAULT_VERSIONS=perl5=5.20
MAKE_JOBS_UNSAFE=yes
DEFAULT_VERSIONS=mysql=5.7
Comment 2 Vladimir Omelchuk 2016-03-29 02:57:53 UTC
Sorry, patch work is fine!
Comment 3 Matthias Petermann 2016-03-29 05:40:47 UTC
Hello Vladimir,

so the patch is working for you now?

Best regards and thanks for testing,
Matthias
Comment 4 Vladimir Omelchuk 2016-03-29 07:22:14 UTC
Yes.
Thanks!
Comment 5 Philip Lacroix 2016-04-30 00:42:40 UTC
Hello FreeBSD friends

I'm a Slackware and OpenBSD user and I'm the one who started the mentioned thread at the Slackware forum. The origin of the patch mentioned by Matthias, which is used in Slackware-current, is Xfce developer Harald Judt:

https://bugzilla.xfce.org/show_bug.cgi?id=12264#c14

Harald shared a second patch a few posts later, which seems to fix the issue differently:

https://bugzilla.xfce.org/show_bug.cgi?id=12264#c30

The discussion there is still active, but according to the feedbacks the problem seems to be solved.

Best regards,
Philip
Comment 6 Vladimir Omelchuk 2016-05-26 10:51:29 UTC
(In reply to Matthias Petermann from comment #3)

I noticed, that sometimes Thunar freeze and does not respond.
Comment 7 Marko Cupać 2016-06-07 09:33:24 UTC
Hi,

when are Thunar crashes on rename reported in this PR going to be fixed in official FreeBSD port? Latest comment regarding this issue in XFCE's bugzilla is from month ago.

Thank you in advance.
Comment 8 Olivier Duchateau freebsd_committer freebsd_triage 2016-06-07 16:52:26 UTC
(In reply to Marko Cupać from comment #7)

Probably this week end, currently I have no time.
Comment 9 Vladimir Omelchuk 2016-08-24 15:39:56 UTC
(In reply to Olivier Duchateau from comment #8)

Olivier, when you plan to see this patch?
Comment 10 commit-hook freebsd_committer freebsd_triage 2016-08-30 16:10:27 UTC
A commit references this bug:

Author: olivierd
Date: Tue Aug 30 16:09:47 UTC 2016
New revision: 421122
URL: https://svnweb.freebsd.org/changeset/ports/421122

Log:
  - Add 2 patches, which avoid crashes:
   * When renaming files / folders [1] (we use the official patch)
   * When reloading target file after move
  - Bump PORTREVISION

  PR:		208341
  Submitted by:	Matthias Petermann [1] (obtained from Slackware repository)
  Tested by:	Vladimir Omelchuk
  Obtained from:	Upstream git repository
  MFH:		2016Q3

Changes:
  head/x11-fm/thunar/Makefile
  head/x11-fm/thunar/files/patch-thunar_thunar-file.c
  head/x11-fm/thunar/files/patch-thunar_thunar-folder.c
Comment 11 Vladimir Omelchuk 2016-08-30 21:09:00 UTC
PR must be closed.
Comment 12 Olivier Duchateau freebsd_committer freebsd_triage 2016-08-31 03:16:12 UTC
(In reply to Vladimir Omelchuk from comment #11)

PR will be closed, after commit in 2016Q3 branch.

I asked authorization to commit in this stable branch (MFH, merge from head, keyword in commit log).
Comment 13 commit-hook freebsd_committer freebsd_triage 2016-08-31 16:13:20 UTC
A commit references this bug:

Author: olivierd
Date: Wed Aug 31 16:13:08 UTC 2016
New revision: 421170
URL: https://svnweb.freebsd.org/changeset/ports/421170

Log:
  MFH: r421122

  - Add 2 patches, which avoid crashes:
   * When renaming files / folders [1] (we use the official patch)
   * When reloading target file after move
  - Bump PORTREVISION

  PR:		208341
  Submitted by:	Matthias Petermann [1] (obtained from Slackware repository)
  Tested by:	Vladimir Omelchuk
  Obtained from:	Upstream git repository

  Approved by:	ports-secteam (junovitch@)

Changes:
_U  branches/2016Q3/
  branches/2016Q3/x11-fm/thunar/Makefile
  branches/2016Q3/x11-fm/thunar/files/patch-thunar_thunar-file.c
  branches/2016Q3/x11-fm/thunar/files/patch-thunar_thunar-folder.c
Comment 14 Olivier Duchateau freebsd_committer freebsd_triage 2016-08-31 16:24:24 UTC
Committed, thanks!

I decided to apply the official patch (yours is first approach of main developer of Thunar), instead removed G_FILE_MONITOR_SEND_MOVED enum.

I also add fix when we reload application after a move (files or directories).
Comment 15 Matt Adams 2016-11-15 20:27:39 UTC
This bug does not appear to be completely fixed. I am experiencing the same kind of buggy behavior on 11.0-RELEASE-p3 with Thunar-1.6.10_2 while trying to rename single files.

My /usr/home where I experience this behavior is an NFS mount with the following options in the autofs config file:

-intr,hard,noatime,rsize=32768,wsize=32768

Has anyone else experienced this problem?
Comment 16 Olivier Duchateau freebsd_committer freebsd_triage 2016-11-16 17:43:45 UTC
Me too, sometimes Thunar crashes when I rename files (and directories) on FreeBSD 11.0-p3 (with UFS file system).

To be honest, I did not agree with this bug report, because at that time (for me) Thunar worked perfectly. And several users reported, that patch fixed this behaviour (that's why I waited 5 months).

I applied official patch, and I think problem comes from GLib.
Comment 17 Marko Cupać 2016-11-17 16:26:18 UTC
I am currently on 11.0-RELEASE-p3 amd64, have latest Thunar-1.6.10_2 compiled in poudriere with default options, and it just dumped core on rename again.

I don't have debugging signals, so I guess my gdb output won't mean much, but it starts with:

Core was generated by `thunar'.
Program terminated with signal 11, Segmentation fault.

...and ends with:
Loaded symbols for /usr/lib/liblzma.so.5
Reading symbols from /usr/local/lib/thunarx-2/thunar-uca.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/thunarx-2/thunar-uca.so
Reading symbols from /usr/local/lib/thunarx-2/thunar-wallpaper-plugin.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/thunarx-2/thunar-wallpaper-plugin.so
Reading symbols from /usr/local/lib/thunarx-2/thunar-archive-plugin.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/thunarx-2/thunar-archive-plugin.so
Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x0000000803ecdf44 in strcmp () from /lib/libc.so.7
[New Thread 80be56500 (LWP 100855/<unknown>)]
[New Thread 80be56000 (LWP 101787/<unknown>)]
[New Thread 80ac18d00 (LWP 100732/<unknown>)]
[New Thread 80ac16f00 (LWP 100724/<unknown>)]
[New Thread 80ac17400 (LWP 100722/<unknown>)]
[New Thread 80ac16000 (LWP 100575/<unknown>)]

Any help appreciated.