I have a directory with several (almost 800) JSON files in a Eclipse project. I've noticed that refreshing this directory freezes Eclipse (Mars).
The directory is on a Ubuntu Linux server running Samba 4.1.6 and I'm using Eclipse x64 on Windows 8.
I've run strace
on the relevant smbd
process and I saw that Eclipse is repeatedly performing a stat()
on all the files (I'd expect once only):
newfstatat(32, "MYFILE-c15771bf38edb6f27f2e3a468eeda58f.json", {st_mode=S_IFREG|0644, st_size=1428, ...}, 0) = 0
stat("path/to/MYFILE-c15771bf38edb6f27f2e3a468eeda58f.json", {st_mode=S_IFREG|0644, st_size=1428, ...}) = 0
stat("path/to/MYFILE-c15771bf38edb6f27f2e3a468eeda58f.json", {st_mode=S_IFREG|0644, st_size=1428, ...}) = 0
The calls are in groups of three, one newfstatat
and two stat
's. While I'm writing and since I started strace
, 846 requests for the same file have accumulated:
$ grep MYFILE-c15771bf38edb6f27f2e3a468eeda58f.json stracefile | wc -l
846
The same holds for all the other files (my strace file is now 1352971 lines long, and growing).
All the while, Eclipse is frozen ("Not responding"). As luck would have it, I've an open file with uncommitted changes I'm quite keen to recover.
Before filing an Eclipse bug, did anyone encounter this behaviour? Is there a way of making Eclipse stop this ceaseless enquiry on the status of a static file, long enough to save one editor window? (Cut and paste doesn't work).
And what could be causing this? Too many files in a single directory? (of a specific type)? A conflict with Samba?
Not a complete answer (I'm probably filing a bug), but a temporary workaround to unblock Eclipse: