Date: Fri, 10 Oct 2014 20:30:25 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 194293] New: FUSE program freezes when seeking pos > file size Message-ID: <bug-194293-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194293 Bug ID: 194293 Summary: FUSE program freezes when seeking pos > file size Product: Base System Version: 10.1-BETA3 Hardware: amd64 OS: Any Status: Needs Triage Severity: Affects Many People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: nishida@asusa.net This happens with both 10.1-RC1 and 9.3-Release. I wrote a simple and straight forward file system program with FUSE. It just does like: open: open a file with the same name in a different directory read: read a file with the same name in a different directory write: write a file with the same name in a different directory etc. However, the program always freezes when saving a xcf file (Gimp's native format) with Gimp. Once it freezes, it cannot be killed even by shutdown. Therefore, I always have to reset my PC after shutdown. After investigating Gimp's source code, I found that this happened when Gimp tried to fseek() a position greater than the file size. In /usr/ports/graphics/gimp-app/work/gimp-2.8.10/app/xcf/xcf-seek.c, there is xcf_seek_pos(). Adding fstat(fd, &sb); if (pos > sb.st_size) { ftruncate(fd, pos); } to it solved the problem. This is not only a FUSE's problem, but I guess it will be better to deal with it. Sincerely, -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-194293-8>