From unknown Wed Jun 25 09:08:39 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#22770 <22770@debbugs.gnu.org> To: bug#22770 <22770@debbugs.gnu.org> Subject: Status: Crash safety Reply-To: bug#22770 <22770@debbugs.gnu.org> Date: Wed, 25 Jun 2025 16:08:39 +0000 retitle 22770 Crash safety reassign 22770 gzip submitter 22770 Yanyan Jiang severity 22770 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 22 11:24:05 2016 Received: (at submit) by debbugs.gnu.org; 22 Feb 2016 16:24:06 +0000 Received: from localhost ([127.0.0.1]:38262 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aXtHJ-0006QK-Cc for submit@debbugs.gnu.org; Mon, 22 Feb 2016 11:24:05 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48001) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aXnj1-0000ye-1m for submit@debbugs.gnu.org; Mon, 22 Feb 2016 05:28:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aXniu-0006hg-Tr for submit@debbugs.gnu.org; Mon, 22 Feb 2016 05:28:13 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: **** X-Spam-Status: No, score=4.4 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,RECEIVED_FROM_WINDOWS_HOST,URI_HEX autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:57642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXniu-0006ha-RV for submit@debbugs.gnu.org; Mon, 22 Feb 2016 05:28:12 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXnit-0001OV-O9 for bug-gzip@gnu.org; Mon, 22 Feb 2016 05:28:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aXnip-0006g5-M8 for bug-gzip@gnu.org; Mon, 22 Feb 2016 05:28:11 -0500 Received: from blu004-omc3s26.hotmail.com ([65.55.116.101]:52832) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXnip-0006g0-I5 for bug-gzip@gnu.org; Mon, 22 Feb 2016 05:28:07 -0500 Received: from BLU436-SMTP70 ([65.55.116.72]) by BLU004-OMC3S26.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Mon, 22 Feb 2016 02:04:08 -0800 X-TMN: [Tv80l1fZ7+ElElx/6uo0maH5KvnXSGr3] X-Originating-Email: [jiangyy@outlook.com] Message-ID: From: Yanyan Jiang Content-Type: multipart/alternative; boundary="Apple-Mail=_BE06B48A-3F2F-46CA-B96D-703E6AEC024C" Subject: Crash safety Date: Mon, 22 Feb 2016 05:04:05 -0500 To: bug-gzip@gnu.org MIME-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) X-Mailer: Apple Mail (2.3112) X-OriginalArrivalTime: 22 Feb 2016 10:04:07.0082 (UTC) FILETIME=[5DED08A0:01D16D58] X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 22 Feb 2016 11:24:03 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.7 (--) --Apple-Mail=_BE06B48A-3F2F-46CA-B96D-703E6AEC024C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Hi, Gzip version: 1.6 I am developing a tool to validate crash safety of application software. = I have just found that the file deletion has a potential safety = venerability: if only a prefix of I/O operations are flushed to disk, = after reboot, the file-system would only contain a 0-byte file (old file = is deleted while the data is not reached to disk yet). A paper FYI: = http://0b4af6cdc2f0c5998459-c0245c5c937c5dedcca3f1764ecc9b2f.r43.cf2.rackc= dn.com/17780-osdi14-paper-pillai.pdf = (Table 1 on Page 440). Data = append can be (virtually) reordered with any operation at default ext3 = and ext4 settings. I recommend to use fsync() to persist the .gz file = before deletion. =E2=80=94 strace log =E2=80=94 36 open("a", O_RDONLY|O_NOCTTY|O_NONBLOCK|O_LARGEFILE|O_NOFOLLOW) =3D 3 37 fstat64(3, {st_mode=3DS_IFREG|0664, st_size=3D19730, ...}) =3D 0 38 rt_sigprocmask(SIG_BLOCK, [HUP INT PIPE TERM XCPU XFSZ], [], 8) =3D = 0 39 open("a.gz", O_WRONLY|O_CREAT|O_EXCL|O_LARGEFILE, 0600) =3D 4 40 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) =3D 0 41 read(3, "10017649652034232324895361757801"..., 65536) =3D 19730 42 read(3, "", 45806) =3D 0 43 write(4, = "\37\213\10\10\24\312\312V\0\3a\0-\334m\226\234\274\22\3\340\377Y\r = \30l\354\375o,z\324"..., 9954) =3D 9954 44 close(3) =3D 0 45 utimensat(4, NULL, {{1456130580, 76955623}, {1456130580, = 128955620}}, 0) =3D 0 46 fchown32(4, 1000, 1000) =3D 0 47 fchmod(4, 0664) =3D 0 48 close(4) =3D 0 49 rt_sigprocmask(SIG_BLOCK, [HUP INT PIPE TERM XCPU XFSZ], [], 8) =3D = 0 50 unlink("a") =3D 0 Thank you for your attention! Regards, Yanyan Jiang =E8=92=8B=E7=82=8E=E5=B2=A9 Institute of Computer Software, Dept. of Computer Science, Nanjing University --Apple-Mail=_BE06B48A-3F2F-46CA-B96D-703E6AEC024C Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8"
Hi,

Gzip version: 1.6

I am developing a tool = to validate crash safety of application software. I have just found that = the file deletion has a potential safety venerability: if only a prefix = of I/O operations are flushed to disk, after reboot, the file-system = would only contain a 0-byte file (old file is deleted while the data is = not reached to disk yet).

A paper FYI: http://0b4af6cdc2f0c5998459-c0245c5c937c5dedcca3f1764ecc9b2f.r4= 3.cf2.rackcdn.com/17780-osdi14-paper-pillai.pdf (Table 1 on = Page 440). Data append can be (virtually) reordered with any operation = at default ext3 and ext4 settings. I recommend to use fsync() to persist = the .gz file before deletion.

=E2=80=94 strace log =E2=80=94

 36 open("a", = O_RDONLY|O_NOCTTY|O_NONBLOCK|O_LARGEFILE|O_NOFOLLOW) =3D 3
 37 fstat64(3, {st_mode=3DS_IFREG|0664, st_size=3D19730, = ...}) =3D 0
 38 rt_sigprocmask(SIG_BLOCK, [HUP = INT PIPE TERM XCPU XFSZ], [], 8) =3D 0
 39 = open("a.gz", O_WRONLY|O_CREAT|O_EXCL|O_LARGEFILE, 0600) =3D 4
 40 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) =3D = 0
 41 read(3, = "10017649652034232324895361757801"..., 65536) =3D 19730
 42 read(3, "", 45806)         =              =3D 0
 43 write(4, = "\37\213\10\10\24\312\312V\0\3a\0-\334m\226\234\274\22\3\340\377Y\r =    \30l\354\375o,z\324"..., 9954) =3D 9954
 44 close(3)             =                    =3D = 0
 45 utimensat(4, NULL, {{1456130580, = 76955623}, {1456130580, 128955620}}, 0) =3D 0
 46 fchown32(4, 1000, 1000)         =         =3D 0
 47 = fchmod(4, 0664)                 =         =3D 0
 48 close(4) =                     =            =3D 0
 49 rt_sigprocmask(SIG_BLOCK, [HUP INT PIPE TERM XCPU = XFSZ], [], 8) =3D 0
 50 unlink("a")   =                     =       =3D 0

Thank you for your attention!


Regards,
Yanyan = Jiang =E8=92=8B=E7=82=8E=E5=B2=A9
Institute of = Computer Software,
Dept. of Computer Science, = Nanjing University

= --Apple-Mail=_BE06B48A-3F2F-46CA-B96D-703E6AEC024C-- From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 23 02:16:15 2016 Received: (at control) by debbugs.gnu.org; 23 Feb 2016 07:16:15 +0000 Received: from localhost ([127.0.0.1]:38901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aY7Cg-0002jH-UN for submit@debbugs.gnu.org; Tue, 23 Feb 2016 02:16:15 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:33336) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aY7Ce-0002iz-Jb for control@debbugs.gnu.org; Tue, 23 Feb 2016 02:16:13 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id A767916083D for ; Mon, 22 Feb 2016 23:16:06 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id qJkGIjXgVW4e for ; Mon, 22 Feb 2016 23:16:06 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 00331160FD3 for ; Mon, 22 Feb 2016 23:16:05 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id sBcwqPeqEETY for ; Mon, 22 Feb 2016 23:16:05 -0800 (PST) Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id C6B1016083D for ; Mon, 22 Feb 2016 23:16:05 -0800 (PST) To: control@debbugs.gnu.org From: Paul Eggert Subject: 22768 and 22770 are duplicates Organization: UCLA Computer Science Department Message-ID: <56CC0735.1030503@cs.ucla.edu> Date: Mon, 22 Feb 2016 23:16:05 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) merge 22768 22770 From unknown Wed Jun 25 09:08:39 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 01 Apr 2016 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Mon May 09 18:36:37 2016 Received: (at control) by debbugs.gnu.org; 9 May 2016 22:36:37 +0000 Received: from localhost ([127.0.0.1]:44848 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aztn2-0008SU-QP for submit@debbugs.gnu.org; Mon, 09 May 2016 18:36:37 -0400 Received: from nm14-vm1.bullet.mail.bf1.yahoo.com ([98.139.213.132]:44672) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aztHd-0007h0-0L for control@debbugs.gnu.org; Mon, 09 May 2016 18:04:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1462831442; bh=Dfbau/J/QEszFjnR1g04Um9KbFlUzrYw892dHtplDTY=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject; b=tHRGWf1P25lV+4ZTrsCuZmxsnxtUojei5ncXmu03DY7im//jFOc+8lCM/G3tZqBk3aKkXIuMXYfBBnQeqV44qehT1LMHH6QOaI+A+OX5DqJy4Gp7hsFYnmShkRB0rCr9xAiwqIQRZfJ3gDNgtLP8oxmuhkCzEkAIk7JP+nvrHE39OIE+KfJsHtZmf9pfCi7tfDt+esfV4xlO2k3wgMCkm5N5VBxRaefWhIm3r/61BTt7dgIYoaOJYy2L4Cq6M+oHhj0TI8FTHEQvnhdT2QaXCsBNSzm7AFB/Z6dtHzrKcdaVR0nAgfNCBrDWgNuAkY1qFY42aXtdp/+VXNBHKl2AUg== Received: from [98.139.215.141] by nm14.bullet.mail.bf1.yahoo.com with NNFMP; 09 May 2016 22:04:02 -0000 Received: from [98.139.212.233] by tm12.bullet.mail.bf1.yahoo.com with NNFMP; 09 May 2016 22:04:02 -0000 Received: from [127.0.0.1] by omp1042.mail.bf1.yahoo.com with NNFMP; 09 May 2016 22:04:02 -0000 X-Yahoo-Newman-Property: ymail-5 X-Yahoo-Newman-Id: 230691.44189.bm@omp1042.mail.bf1.yahoo.com X-YMail-OSG: OtfktxsVM1ma.cQWJWTGTFP6keOAdUtGpXTcZAZurtiainVeP5T5.hMkfRbD6CM agFDTfgLanaCXcb0IbJIgyQWhQUOvv5arDftcH36glGeu5MQzZ22TT.cGTr8X2BpoNk4NUufMAaR ZOphW6tleI7sPO9axCaOKcBMG3nRiXd_sV6yfQTNiPy3jZdl82jthG9zbNNcEC_RhpSreAcpPHsY 0EJPAhqbud7iQcwB52w4JuqbAR3q2cM3IbdwFbKirto6RGD35V4JWelohW2R1XinGBdO1UeFU0tU ZjNl5DY5833aTdWewQJ.PrFqKvAgb0DxvRw00hAi1.ZD72sGcfoTAQccyYYdFfQw_4zmD8Nu6eSf 7eW.RjOeIJ_DjfEu8b0WI0_OJjh1abwDoPaniPkcMUMk1G.DkZsZfuZeWJUBoDVj1_HMdyc4XS7x Bv24I_b4vxmkcAfyeyk8CLesUYZAfFc2rq1AVEAZtDuwUrxDpJbbnVPadlz9fDsndzfPVU0itXVI H7.TqGg-- Received: from jws10693.mail.bf1.yahoo.com by sendmailws161.mail.bf1.yahoo.com; Mon, 09 May 2016 22:04:01 +0000; 1462831441.748 Date: Mon, 9 May 2016 22:04:01 +0000 (UTC) From: John Wiersba To: GNU bug tracker automated control server Message-ID: <1538121635.1423254.1462831441443.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: References: Subject: unarchive 22768 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1423253_1957983009.1462831441441" Content-Length: 1291 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-Mailman-Approved-At: Mon, 09 May 2016 18:36:36 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: John Wiersba Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) ------=_Part_1423253_1957983009.1462831441441 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit unarchive 22768 ------=_Part_1423253_1957983009.1462831441441 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
unarchive 22768


------=_Part_1423253_1957983009.1462831441441-- From unknown Wed Jun 25 09:08:39 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 07 Jun 2016 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator