Bug in fsync in SuSE 9.3

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug in fsync in SuSE 9.3

Cavit Cahit VURAL
Hi ,


You use fsync to refresh the data to the disk as we were.

In SuSE 9.3 (don't know others) fsync does not work properly. Sometimes
it do not use the buffer you gave , writes garbage data to the file. It
took 25 days to determine the bug :-)

Regards

CC Vural
Reply | Threaded
Open this post in threaded view
|

Re: Bug in fsync in SuSE 9.3

Helmut Tschemernjak
Hi,

it is hard to believe that there is a bug in fsync under the Linux
kernel 2.6.10. What kind of filesystem have you used. (NFS, FAT, Reiser,
Ext2/3).

Are any special kernel or mount options used?
Is it a sparse file?
How have you found out that it is related to fsync?


best regards

Helmut Tschemernjak


Cavit Cahit VURAL wrote:

> Hi ,
>
>
> You use fsync to refresh the data to the disk as we were.
>
> In SuSE 9.3 (don't know others) fsync does not work properly. Sometimes
> it do not use the buffer you gave , writes garbage data to the file. It
> took 25 days to determine the bug :-)
>
> Regards
>
> CC Vural
Reply | Threaded
Open this post in threaded view
|

Re: Bug in fsync in SuSE 9.3

Cavit Cahit VURAL
Helmut Tschemernjak yazmış:

> Hi,
>
> it is hard to believe that there is a bug in fsync under the Linux
> kernel 2.6.10. What kind of filesystem have you used. (NFS, FAT,
> Reiser, Ext2/3).
>
> Are any special kernel or mount options used?
> Is it a sparse file?
> How have you found out that it is related to fsync?
>
>
> best regards
>
> Helmut Tschemernjak

We are using ReiserFS (it's default for SuSE)

It's kernel's version is 2.6.11.4-20a

No, they are regular files and no special kernel or mount options.



The application is about 10 years old and running on 25 servers.
We have an internal database which using b+tree algorithm. (We are
thinking to move SQLite)
So, before fsync, everything was ok. And when we began to use fsync ,  
database corruption began. We examined a lot of possibilities like disk
corruption, cable damages, memory damages or sofware bug. At last, in an
transaction, the main transaction file was corrupted. Then we analyzed a
lot , and all clues were showing fsync. We also could not believe, so we
disabled it but nothing else, absolutely nothing else. Everything began
to work properly and still does.

Yes, it's hard to believe, but am 99.99% sure, fsync has a bug in SuSE
9.3.  Just i dont know any other application in SuSE 9.3 affects it to
work buggy or it's buggy.

Best Regards

CC Vural
Reply | Threaded
Open this post in threaded view
|

Re: Bug in fsync in SuSE 9.3

David Morel
Cavit Cahit VURAL a écrit :
> Yes, it's hard to believe, but am 99.99% sure, fsync has a bug in SuSE
> 9.3.  Just i dont know any other application in SuSE 9.3 affects it to
> work buggy or it's buggy.

Guess you filed a bug report with suse ?

--
+-----------------------------------+
| David Morel <[hidden email]> |
| http://www.intradot.com           |
+-----------------------------------+
| Intradot Labs                     |
| 2, rue Cuzin                      |
| F-69120 Vaulx-en-Velin            |
| tel: +33 478 80 87 90             |
+-----------------------------------+


signature.asc (261 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Bug in fsync in SuSE 9.3

Frank Baumgart
In reply to this post by Cavit Cahit VURAL
On Mo, 27.06.2005, 16:20, Cavit Cahit VURAL sagte:

...
> Yes, it's hard to believe, but am 99.99% sure, fsync has a bug in SuSE
> 9.3.  Just i dont know any other application in SuSE 9.3 affects it to
> work buggy or it's buggy.

Do you use ATA drives?
With or without write caching enabled?

Regards,

F. Baumgart


Reply | Threaded
Open this post in threaded view
|

Re: Bug in fsync in SuSE 9.3

Cavit Cahit VURAL
Frank Baumgart yazmış:

>On Mo, 27.06.2005, 16:20, Cavit Cahit VURAL sagte:
>
>...
>  
>
>>Yes, it's hard to believe, but am 99.99% sure, fsync has a bug in SuSE
>>9.3.  Just i dont know any other application in SuSE 9.3 affects it to
>>work buggy or it's buggy.
>>    
>>
>
>Do you use ATA drives?
>With or without write caching enabled?
>
>Regards,
>
>F. Baumgart
>  
>
We have ATA and SCSI drivers and the result is same.
Write Cache is enabled for both.

Regards

CC Vural

Reply | Threaded
Open this post in threaded view
|

Re: Bug in fsync in SuSE 9.3

Helmut Tschemernjak
In reply to this post by Cavit Cahit VURAL

I still don't believe that is a Linux bug. Do you know that you can
trace all system calls of your app via the "strace" command?

If you can reproduce the problem I would report it to Suse.

best regards / mit freundlichen Gruessen,

Helmut Tschemernjak



Cavit Cahit VURAL wrote:

> Helmut Tschemernjak yazm??:
>
>> Hi,
>>
>> it is hard to believe that there is a bug in fsync under the Linux
>> kernel 2.6.10. What kind of filesystem have you used. (NFS, FAT,
>> Reiser, Ext2/3).
>>
>> Are any special kernel or mount options used?
>> Is it a sparse file?
>> How have you found out that it is related to fsync?
>>
>>
>> best regards
>>
>> Helmut Tschemernjak
>
>
> We are using ReiserFS (it's default for SuSE)
>
> It's kernel's version is 2.6.11.4-20a
>
> No, they are regular files and no special kernel or mount options.
>
>
>
> The application is about 10 years old and running on 25 servers.
> We have an internal database which using b+tree algorithm. (We are
> thinking to move SQLite)
> So, before fsync, everything was ok. And when we began to use fsync ,  
> database corruption began. We examined a lot of possibilities like disk
> corruption, cable damages, memory damages or sofware bug. At last, in an
> transaction, the main transaction file was corrupted. Then we analyzed a
> lot , and all clues were showing fsync. We also could not believe, so we
> disabled it but nothing else, absolutely nothing else. Everything began
> to work properly and still does.
>
> Yes, it's hard to believe, but am 99.99% sure, fsync has a bug in SuSE
> 9.3.  Just i dont know any other application in SuSE 9.3 affects it to
> work buggy or it's buggy.
>
> Best Regards
>
> CC Vural