After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 756253 - Hits assert "file->details->directory == directory" when moving directory
Hits assert "file->details->directory == directory" when moving directory
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Crashers
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-08 17:13 UTC by Sebastien Bacher
Modified: 2015-12-14 18:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
directory-async: set NULL the count progress on cancel (1.75 KB, patch)
2015-12-14 18:19 UTC, Carlos Soriano
committed Details | Review

Description Sebastien Bacher 2015-10-08 17:13:24 UTC
The bug is quite easy to trigger using the steps described on https://bugzilla.redhat.com/show_bug.cgi?id=1218035

"1: Use Nautilus to create a new directory (filesystem or location do not seem to matter, but I tested it with ~/Downloads on BTRFS) enter the folder and create another one inside it.
2: Go back to the start directory and use the move-to function to move the new folders to another location (I chose ~/Documents).
3: Nautilus has a high probability of crashing as soon as the move-to action is confirmed."
Comment 1 Sebastien Bacher 2015-10-08 17:14:33 UTC
stacktrace

"#0  0x00007f61f042ca98 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
        resultvar = 0
        pid = 27764
        selftid = 27764
  • #1 __GI_abort
    at abort.c line 89
  • #2 g_assertion_message
  • #3 g_assertion_message_expr
    at gtestutils.c line 2371
  • #4 directory_count_stop
    at nautilus-directory-async.c line 2245
  • #5 start_or_stop_io
    at nautilus-directory-async.c line 4217
  • #6 nautilus_directory_async_state_changed
    at nautilus-directory-async.c line 4297
  • #7 call_files_changed_common
    at nautilus-directory.c line 901
  • #8 call_files_changed_free_list
    at nautilus-directory.c line 911
  • #9 g_hash_table_foreach
    at ghash.c line 1607
  • #10 nautilus_directory_notify_files_moved
    at nautilus-directory.c line 1442
  • #11 nautilus_file_changes_consume_changes
    at nautilus-file-changes-queue.c line 319
  • #12 link_job_done
    at nautilus-file-operations.c line 5490
  • #13 mainloop_proxy_func
    at gioscheduler.c line 200
  • #14 g_main_dispatch
    at gmain.c line 3122
  • #15 g_main_context_dispatch
    at gmain.c line 3737
  • #16 g_main_context_iterate
    at gmain.c line 3808
  • #17 g_main_context_iteration
    at gmain.c line 3869
  • #18 g_application_run
    at gapplication.c line 2308
  • #19 main
    at nautilus-main.c line 103

(nautilus 3.16.2)
Comment 2 Sebastien Bacher 2015-12-02 08:58:25 UTC
that's still an issue with 3.18
Comment 3 Sebastien Bacher 2015-12-08 17:15:06 UTC
Ubuntu report on https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1434573
Comment 4 Carlos Soriano 2015-12-14 18:19:01 UTC
Created attachment 317388 [details] [review]
directory-async: set NULL the count progress on cancel

When a file gets moved, nautilus directory cancel the loading of
the attributes of that file, in case that file is in the work queue
of that directory, since it will move to another directory.

For that, we cancel the cancellable associated to the async request
of the attributes of that file.

However, since this is threaded, if some client of the directory kick of
I/O with the nautilus_directory_async_state_changed and the cancellable
didn't reach the callback, the file attributes are still going on, and
we reach an assert when trying to stop them again, since the file
requesting for those attributes is no longer the one we want to stop
loading.

This was causing problems when the race kicks in, for example, the
move to context menu action.

To fix it, apart of cancel the cancellable associated, set the directory
private data files as null, to avoid trying to stop the already stopped
request.
Comment 5 Carlos Soriano 2015-12-14 18:48:30 UTC
Thanks Cosimo for review on IRC.

Attachment 317388 [details] pushed as 764958a - directory-async: set NULL the count progress on cancel