From milinevskyy@gmail.com Fri Apr 17 20:19:50 2015 From: milinevskyy@gmail.com To: openldap-bugs@openldap.org Subject: Re: (ITS#8106) Retry pwrite operations in case of EINTR Date: Fri, 17 Apr 2015 20:19:48 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3869370342926772338==" --===============3869370342926772338== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable --047d7bd910b0d34afe0513f14c84 Content-Type: text/plain; charset=3DUTF-8 Hello, we've encountered this problem mainly on Android device. The kernel sends a fake signal and the baking storage(flash) is not so fast. I've noticed a typo in my patch for the macro DO_PWRITE in mdb_env_init_meta. The test should be done for EINTR, not EINVAL. Do you want me to resend the patch? Thanks, Dmytro On Fri, Apr 17, 2015 at 7:34 PM, Howard Chu wrote: > milinevskyy(a)gmail.com wrote: > >> Full_Name: Dmytro Milinevskyy >> Version: >> OS: Linux >> URL: ftp://ftp.openldap.org/incoming/ >> Submission from: (NULL) (92.132.131.166) >> >> >> On linux systems it's common to have system calls interrupted and >> restarted. >> LMDB should retry pwrites to avoid "false" failures. >> > > In practice, writes to a file are "fast" and will always write at least > one byte. But we've patched this as suggested, thanks. > > -- > -- Howard Chu > CTO, Symas Corp. http://www.symas.com > Director, Highland Sun http://highlandsun.com/hyc/ > Chief Architect, OpenLDAP http://www.openldap.org/project/ > --047d7bd910b0d34afe0513f14c84 Content-Type: text/html; charset=3DUTF-8 Content-Transfer-Encoding: quoted-printable
Hello,
we've encountered this proble= =3D m mainly on Android device. The kernel sends a fake signal and the baking s=3D torage(flash) is not so fast.
I've noticed a typo in my patch for th=3D e macro DO_PWRITE in mdb_env_init_meta. The test should be done for EINTR, =3D not EINVAL.
Do you want me to resend the patch?

Thank=3D s,
Dmytro

On Fri, Apr 17, 2015 at 7:34 PM, Howard Chu &l= =3D t;hyc(a)symas.com><=3D /span> wrote:
milinevskyy(a)gmail.com wrote:
Full_Name: Dmytro Milinevskyy
Version:
OS: Linux
URL: ftp:/= /f=3D tp.openldap.org/incoming/
Submission from: (NULL) (92.132.131.166)


On linux systems it's common to have system calls interrupted and resta=3D rted.
LMDB should retry pwrites to avoid "false" failures.

In practice, writes to a file are "fast" and will always write at=3D least one byte. But we've patched this as suggested, thanks.

--
=3DC2=3DA0 -- Howard Chu
=3DC2=3DA0 CTO, Symas Corp.=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2= =3DA0 =3DC2=3DA0http://www.symas.com
=3DC2=3DA0 Director, Highland Sun=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0http://highlandsun.com/hyc/
=3DC2=3DA0 Chief Architect, OpenLDAP=3DC2=3DA0 http://www.openldap.org/project/

--047d7bd910b0d34afe0513f14c84-- --===============3869370342926772338==--