FS#46657 - [thunar] random segfaults upon renaming a file

Attached to Project: Arch Linux
Opened by John (graysky) - Sunday, 11 October 2015, 10:11 GMT
Last edited by Evangelos Foutras (foutrelis) - Thursday, 09 February 2017, 02:42 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Evangelos Foutras (foutrelis)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 19
Private No

Details

I am experiencing periodic segfaults upon renaming a file from within Thunar. I cannot get the situation to reproduce on purpose; it seems to happen randomly.

thunar 1.6.10-2
glibc 2.22-3

Steps to reproduce:
What happens is I click a file from within Thunar. I hit F2 to rename it and I enter the new name. Upon hitting Enter for thunar to accept the new name, the entire Thunar window disappears (crashes). I see an entry in dmesg indicating a segfault. The file is renamed on the filesystem.

Example dmesg entries:
[ 8494.667080] Thunar[4300]: segfault at 0 ip 00007f1ab86b9bda sp 00007ffc3ddcd2c8 error 4 in libc-2.22.so[7f1ab8629000+19b000]
[14552.165781] Thunar[13994]: segfault at 0 ip 00007f72a4219bda sp 00007ffdc93b1d88 error 4 in libc-2.22.so[7f72a4189000+19b000]
This task depends upon

Closed by  Evangelos Foutras (foutrelis)
Thursday, 09 February 2017, 02:42 GMT
Reason for closing:  Fixed
Additional comments about closing:  thunar 1.6.10.174.g35e65ab0-1
Comment by Evangelos Foutras (foutrelis) - Sunday, 11 October 2015, 16:30 GMT Comment by indianahorst (indianahorst) - Monday, 25 January 2016, 18:02 GMT
Is there still no fixed version?!
Comment by Askhat Bakarov (sirocco) - Sunday, 14 February 2016, 17:27 GMT
Steps to reproduce:
1. Open а directory within Thunar
2. here run the terminal
3. run
touch file0; for i in {0..1000000}; do mv file$i file$((i+1)); done

(https://www.linux.org.ru/forum/desktop/12352498?#comment-12352998)
Comment by Evangelos Foutras (foutrelis) - Sunday, 14 February 2016, 17:33 GMT
Reproducing the bug isn't the issue; we're just waiting for upstream to fix it.

Also the bug has to do with renaming a file in Thunar; renaming it in a terminal shouldn't trigger it.
Comment by Adam Malysz (arthyp) - Tuesday, 29 March 2016, 12:48 GMT
Almost half year and nothing? :| What you need to have?
Comment by John (graysky) - Tuesday, 29 March 2016, 18:34 GMT
Did you read the comment directly above your comment?
Comment by nan (someonerandom) - Sunday, 17 April 2016, 06:19 GMT Comment by Evangelos Foutras (foutrelis) - Sunday, 17 April 2016, 06:54 GMT
I have tested the above patch in the past and it doesn't solve this issue.
Comment by Matt (ilikenwf) - Monday, 09 May 2016, 23:17 GMT
I can confirm that this patch fixes the issue: http://bug-attachment.xfce.org/attachment.cgi?id=6530

So far it appears it hasn't been put upstream. Is there a chance we could get the thunar maintainer to take notice?
Comment by John Lindgren (jlindgren) - Sunday, 17 July 2016, 04:15 GMT
Some notes:
1. Renaming in a terminal can reproduce the crash since Thunar monitors such renames via inotify.
2. The "Deactivate SEND_MOVED code paths" patch [1] by Harold Judt (upstream) probably prevents the crash but was meant for debugging and not as a true fix. See [2] where Harold states that it "will not solve the real issue(s) [but] it could give some clues where to look at".

This is my attempt at fixing the root cause:
https://github.com/jlindgren90/thunar/commit/9c6dbb1dae7074e7713f43438f471d75c823a0db

Please consider including this patch in the Arch Linux package. No XFCE developer has made any comment on the upstream bug since February, so waiting for an upstream fix in this case may not be a good plan.

[1] http://bug-attachment.xfce.org/attachment.cgi?id=6530
[2] https://bugzilla.xfce.org/show_bug.cgi?id=12264#c14
Comment by rotanid (rotanid) - Sunday, 25 September 2016, 12:13 GMT
would be nice if someone could include the fix, really annoying bug.
Comment by indianahorst (indianahorst) - Sunday, 25 September 2016, 12:42 GMT
You could use thunar-git from AUR, in this version it seems to be fixed.
Comment by John (graysky) - Sunday, 25 September 2016, 13:03 GMT
I think the patch should be applied to our repo package if it works given the glacial timescale on which xfce upstream operates... can anyone else confirm that the above patch[1] does indeed solve the issue? I have applied it as well and have not experienced a crash but as I reported, for me, the problem is seemingly random with the F2 method I reported.

1. http://bug-attachment.xfce.org/attachment.cgi?id=6530
Comment by John Mac (bjm113) - Monday, 26 September 2016, 16:38 GMT
I can confirm the above patch http://bug-attachment.xfce.org/attachment.cgi?id=6530 fixed this issue for me. I could consistently produce segfaults in thunar by either renaming files or dragging and dropping files between thunar windows every 5-10 times. I've now been using this patch for over a week with hundreds of these operations, and it has not segfaulted once.
Comment by indianahorst (indianahorst) - Monday, 26 September 2016, 22:36 GMT
Just to understand you correctly:

is the above patch actually included in the Thunar package extra/thunar 1.6.10-3?
Comment by John (graysky) - Tuesday, 27 September 2016, 11:57 GMT Comment by Evangelos Foutras (foutrelis) - Thursday, 09 February 2017, 02:42 GMT
According to upstream, this should be fixed in current Thunar git master (package version in Arch: 1.6.10.174.g35e65ab0-1):

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

Loading...