gio's function g_file_trash blocks access to kerberized, NFS4 mounted filesystem
Submitted by jsa..@..eld.de
Link to original bug (#684375)
Description
When moving files to trash using gio's g_file_trash function on a NFS4 filesystem that uses Kerberos for authentication, the trashing takes about a minute. This affects Nautilus and Thunar and probably other software using gio for trashing.
To reproduce:
- Mount a filesystem with mountoptions -o sec=krb5 (we have tried other options, which have no effect on the problem)
- compile the following C program:
#include <gio/gio.h> #include <stdio.h>
int main(int argc, char **argv) { char *path; GFile *file;
g_type_init();
if(argc != 2) exit(1);
path=argv[1];
printf("Moving %s to trash...\n", path);
file = g_file_new_for_path(path);
/* The following call hangs for about one minute if path points to NFSv4 mounted volumes with Kerberos, then succeeds. */
if (g_file_trash(file, NULL, NULL)) printf("true\n"); else printf("false\n"); }
-
run the program and provide the full path of the file to be trashed as parameter
-
wait for about a minute
-
the file will be deleted at the end of the wait, while waiting other processes access to the filesystem is blocked; e.g. top won't start until the wait is over.