Bugzilla – Bug 12195
Scanning hangs on file that can't be read
Last modified: 2009-10-30 15:27:10 UTC
Hi, There is a bug in the AFP implementation on my NAS box that revealed a bug in the SqueezeCenter scanner. The scanner was scanning files on an AFP share, and the AFP bug resulted in a file that appears visible in the readdir result, can be stat'ed, but then returns "no such file or directory" when it is opened. This causes the scanner to hang indefinitely. While there is a bug in AFP that caused this, I wondered if removing a file while the scanner is running could cause the same problem, as there is a potential race condition if the file is unlinked between readdir and open calls. This is hard to replicate without the AFP bug. For what it's worth. Thanks, Forest
Forest: can you please attach the file that is causing the hang to this bug report?
Hi, Attaching the file wouldn't be helpful. Like I said, the problem is that the filesystem was not behaving normally: * readdir returned the filename in the directory listing * stat was successful * open failed with "no such file or directory" The only reason I filed a bug here is because the same symptom could potentially be caused on a correctly functioning filesystem by removing a file between the readdir and open calls. (Actually, it would be slightly different because subsequent readdir calls would no longer include the file.) It's possible that the scanner actually handles this situation correctly; verifying would be difficult because you would have to simulate the race condition somehow. This may also be useful: I believe that removing the file "unstuck" the scanner. It was probably repeatedly trying to open the file, and repeatedly failing.
Can you give us details on your hardware, we need to be able to reproduce the issue here, to figure it out a proper fix.
No further information, no bug to fix, closing bug