All,

I cannot describe how thankful I am to Dmitry for figuring out this issue for 
us.
I just had to spend 28 hours straight repairing database corruption due to this 
error.

fstat call can return EAGAIN error when Linux kernel is under load.

This then leads to massive database corruption.

I believe this fix should be mentioned in WhatsNew.

On 12.04.2012 20:32, dim...@users.sourceforge.net wrote:
> Modified: firebird/branches/B2_5_Release/src/jrd/os/posix/unix.cpp
> ===================================================================
> --- firebird/branches/B2_5_Release/src/jrd/os/posix/unix.cpp  2012-04-12 
> 13:03:25 UTC (rev 54371)
> +++ firebird/branches/B2_5_Release/src/jrd/os/posix/unix.cpp  2012-04-12 
> 16:32:05 UTC (rev 54372)
> @@ -431,7 +431,9 @@
>    *
>    **************************************/
>       struct stat statistics;
> -     fstat(file->fil_desc,&statistics);
> +     if (fstat(file->fil_desc,&statistics) != 0) {
> +             unix_error("fstat", file, isc_io_access_err);
> +     }
>
>       const size_t len1 = sizeof(statistics.st_dev);
>       const size_t len2 = sizeof(statistics.st_ino);
>
>

-- 
Nikolay Samofatov, MBA
Red Soft Corporation
+7 495 668 3735


------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to