! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Intermittent crash on file rename after upgrading to GLib 2.46
Status:
RESOLVED: DUPLICATE
Severity:
critical

Comments

Description Evangelos Foutras 2015-10-11 18:29:41 CEST
Created attachment 6476 
(Not very interesting) backtrace

This is possibly related to bug 11983; however, the crash is reproducible on current master (a1e737146f79aa2f4497984162ff20c8c7949fb5).

I ran git bisect on glib 2.44.0..2.46.0 and apparently the issue started with glib commit 779c809a3d07 (inotify: rewrite inotify-kernel). [1]

I've noticed the crash occurring in two possible places in thunar-file.c:thunar_file_compare_by_name():

4023	  /* case insensitive checking */
4024	  if (G_LIKELY (!case_sensitive))
4025	    result = strcmp (file_a->collate_key_nocase, file_b->collate_key_nocase);
4026	
4027	  /* fall-back to case sensitive */
4028	  if (result == 0)
4029	    result = strcmp (file_a->collate_key, file_b->collate_key);

I've had instances of crashes at either strcmp() and, weirdly enough, sometimes none of the arguments are null and other times one or both are null. During one debugging session, I was able to jump to frame #1 in GDB and do:

(gdb) call strcmp (file_a->collate_key_nocase, file_b->collate_key_nocase)

and the function call didn't result in a segmentation fault, even though GDB had previously reported that it did.

All in all, I'm not sure what's going here. I suppose it could be a bug in glib but I failed to produce a crash in nautilus while repeatedly renaming the same file.

[1] https://git.gnome.org/browse/glib/commit/?id=779c809a3d07
Comment 1 flo.xfce 2015-11-04 16:01:44 CET
Can you describe how you made Thunar crash while using gdb? I can reproduce the bug only outside of any debugging environment (gdb, valgrind).
Comment 2 Evangelos Foutras 2015-11-04 17:47:16 CET
(In reply to flo.xfce from comment #1)
> Can you describe how you made Thunar crash while using gdb? I can reproduce
> the bug only outside of any debugging environment (gdb, valgrind).

I am not doing anything special when running it under GDB; I only make sure to kill any Thunar daemons before starting gdb (`killall Thunder; gdb thunar`).
Comment 3 Evangelos Foutras 2015-11-04 17:48:39 CET
(In reply to Evangelos Foutras from comment #2)
> `killall Thunder; gdb thunar`

I meant "killall Thunar" here.
Comment 4 alex 2015-11-09 17:55:34 CET
one important details to reproduce, you need to use the clipboard. let's say you have to files file_1 and file_2. in order to reproduce, select file_1 and press F2, delete file_1, then select file_2 and paste the copied name (file_1) press enter BOOM
Comment 5 Harald Judt editbugs 2015-11-13 20:35:48 CET
Likely a duplicate.

*** This bug has been marked as a duplicate of bug 12264 ***

Bug #12253

Reported by:
Evangelos Foutras
Reported on: 2015-10-11
Last modified on: 2016-04-29

People

Assignee:
Xfce Bug Triage
CC List:
11 users

Version

Version:
1.6.10

Attachments

(Not very interesting) backtrace (3.90 KB, text/plain)
2015-10-11 18:29 CEST , Evangelos Foutras
no flags

Additional information