[squeak-dev] new VM appears not to be flushing

Eliot Miranda eliot.miranda at gmail.com
Mon Jan 13 20:55:13 UTC 2020

Hi Chris,

On Mon, Jan 13, 2020 at 12:44 PM Chris Muller <ma.chris.m at gmail.com> wrote:

> The test case proves that it does.
> The comment of the method is,
>     "When writing, flush the current buffer out to disk."
> I know what filesystem I deploy to, but Squeak appears to be silently
> ignoring this (rather important) expectation about #flush, that its own
> comment presents.

We're talking linux right?  So the only change I see since Alistair's
commit in 2018 is Nicolas' change that has to be harmless:

Aeolus.oscogvm$ git log
commit e0d70a91864eca8f72947fe36d1865785482ed2e
Author: Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
Date:   Thu Dec 27 12:10:34 2018 +0100

    Workaround S_ISFIFO to let MSVC compile FilePlugin

    Note: there is a possibility to create named pipe in windows

    But named pipes cannot be intermixed with regular files.
    They are mounted on special named pipe file system (NPFS)

    So I think that answering false to the query is a good solution.

commit 827ebe0ffbbf56abdee94fbdd519f00f7ddc0a27
Author: AlistairGrant <akgrant0710 at gmail.com>
Date:   Thu Nov 22 20:58:04 2018 +0100

    sqFilePluginBasicPrims.c: remove unused variable position

and Nicolas' change is only this:

diff --git a/platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c
index 0f2d6fe..df604fb 100755
--- a/platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c
+++ b/platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c
@@ -40,6 +40,12 @@
 #include <limits.h>
 #include <stdio.h>

+#ifdef _MSC_VER
+#ifndef S_ISFIFO
+#define S_ISFIFO(x) 0
 #include "sqMemoryAccess.h"
 #include "FilePlugin.h" /* must be included after sq.h */

So I don't see where to look for a change in flush behavior.  AFAICT there
hasn't been one.

>   - Chris
> On Sun, Jan 12, 2020 at 6:15 PM Levente Uzonyi <leves at caesar.elte.hu>
> wrote:
>> Hi Chris,
>> Do you expect #flush to write the changes to disk?
>> Levente
>> On Sun, 12 Jan 2020, Chris Muller wrote:
>> > Magma has been stable in 5.2 for a long time under an older VM, all
>> tests pass.  But by changing ONLY the VM (not the image) to the new
>> release-candidate, it fails the forward-recovery test.  This test tests the
>> scenario of a
>> > server failure during mid-write.  Unless I change
>> StandardFileStream>>#flush as in Files-cmm.182, the recovery data which
>> Magma relies on #flush to ensure is preserved is, in fact, not preserved.
>> It appears to be a breakage
>> > of the contract which causes the test to fail.  This functionality is
>> important to avoid corrupting databases.
>> > I saw a discussion on the Cuis list in which someone was asserting that
>> flush is no longer necessary(!!), and made a vague reference to a "thread
>> on squeak-dev" which I never found.
>> >
>> > I hope this is just an oversight, otherwise I'll have to rely something
>> like Files-cmm.182, which is half the speed of the old #flush.
>> >
>> > Best,
>> >   Chris
>> >
>> >

best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200113/739a47fa/attachment.html>

More information about the Squeak-dev mailing list