From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 46EA17EF5E for ; Tue, 26 Jul 2016 21:33:55 +0200 (CEST) IronPort-PHdr: 9a23:87TMjhE3ls1RRkmd1VxrrJ1GYnF86YWxBRYc798ds5kLTJ75pMmwAkXT6L1XgUPTWs2DsrQf2rKQ7furADVQqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i760zceF13FOBZvIaytQ8iJ3pzxibv5osSDKyxzxxOFKYtoKxu3qQiD/uI3uqBFbpgL9x3Sv3FTcP5Xz247bXianhL7+9vitMU7q3cY6Lod8JtLWKD+OqA5VqBwDTI8Mmlz6te4mwPESF6j43oASGQH2j9VGAHZ7xD8FsP9ty/3v/JwwgGVOMT3SfY/XjH0vPQjcwPhlCpSb21xy2rQkMEl1K8= Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=dmleaper@gmail.com; spf=Pass smtp.mailfrom=dmleaper@gmail.com; spf=None smtp.helo=postmaster@mail-qt0-f173.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of dmleaper@gmail.com) identity=pra; client-ip=209.85.216.173; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dmleaper@gmail.com"; x-sender="dmleaper@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of dmleaper@gmail.com designates 209.85.216.173 as permitted sender) identity=mailfrom; client-ip=209.85.216.173; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dmleaper@gmail.com"; x-sender="dmleaper@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-qt0-f173.google.com) identity=helo; client-ip=209.85.216.173; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dmleaper@gmail.com"; x-sender="postmaster@mail-qt0-f173.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0B1AQARupdXh63YVdFehREGo30BAQaJMotCgX2HUgc4FAEBAQEBAQEBEQEBAQgNCQkZL4IyFYIuER0BGx4DEgkBBjcCJAERAQUBDgEuGod0AQMXnCCCB4EyPjGLO4FqgloFhC4KGScNVINjAgYQhVKKIYI1gj0dBZkxjnuPP45mEh6BDx6CV4FzIDKHBSqBGgEBAQ X-IPAS-Result: A0B1AQARupdXh63YVdFehREGo30BAQaJMotCgX2HUgc4FAEBAQEBAQEBEQEBAQgNCQkZL4IyFYIuER0BGx4DEgkBBjcCJAERAQUBDgEuGod0AQMXnCCCB4EyPjGLO4FqgloFhC4KGScNVINjAgYQhVKKIYI1gj0dBZkxjnuPP45mEh6BDx6CV4FzIDKHBSqBGgEBAQ X-IronPort-AV: E=Sophos;i="5.28,426,1464645600"; d="scan'208,217";a="228045375" Received: from mail-qt0-f173.google.com ([209.85.216.173]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 26 Jul 2016 21:33:54 +0200 Received: by mail-qt0-f173.google.com with SMTP id w38so17002915qtb.0 for ; Tue, 26 Jul 2016 12:33:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=E/czf4kVYtT83nv61ktfRev5coA4TzQr7r0Mw7S72DI=; b=tnGstyb0lDs9Zy8EWG+SnTYQNPcz5VzVfnVlk7QL6hldFVRDYECkKZ998nKec2NTCd M9nNfyXvaKGa0YTikkaQab8TCloMbKu1+W8ojr8ftUGrAbXZ1JRD+A81lecdBuOjWyXY NbxVt62sGg809pHXgDatu4tdSLIAgCyjec9QmkcAH6NEaF1/B6ZpRIhlimTfGY0sgxEJ 0ORqtS2ckvBsuwlKWuW18QYeSk8FYoS6j1/OL+JM9CYqdHhTBlZKQCHGB2ODhH0qovzy M7xFdNpnzi6teEwe9r3lbG5CpEkXUQ+Ygkyc2p97LAcywazK4RNKUVbxs3djQkcpquct /9dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=E/czf4kVYtT83nv61ktfRev5coA4TzQr7r0Mw7S72DI=; b=mbN0NyW6jHIqXHZ/7TdIrhSntePL7HkoKQwOsRRu+NLwq8q6OO3JQ54NSrw4QV6Wlp xIfbJQrqLEjJIkcnn830DeQJJa9Hb66vMoVqaTSlh1VI2GoQ106/RE+hMpiPLg6Xem2y xtidrn4Gyx44/Tgev6Xzxd2qL35CqSBf3u82ZIvjp61pWmyCFORdWfzD3Xd4PQcZTe4m upAhuB28/qpIS7sVLqd62et36M6lYX6CBUMM4S0DxzEoD5x5VueoxwLvScKWCoWn+COj TiXhZjwmadbf+j1x2NckcHljv0gn2LSo/Rg3GoyKwj6nB2kBHqEH3L++Z3kapAY0sUWz RZmQ== X-Gm-Message-State: AEkoous35EkziXKjeWrfuMAFV8l2tyRAu9kKXTZnMH5xFQJRKA5zEYamHP/U9p1PYfm/cghmSz5+NiHFeMA8HQ== X-Received: by 10.200.36.174 with SMTP id s43mr40497875qts.52.1469561633188; Tue, 26 Jul 2016 12:33:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.30.198 with HTTP; Tue, 26 Jul 2016 12:33:52 -0700 (PDT) From: Dmitriy Musatkin Date: Tue, 26 Jul 2016 15:33:52 -0400 Message-ID: To: caml-list@inria.fr Content-Type: multipart/alternative; boundary=001a114109b81f527a05388efb77 Subject: [Caml-list] Strange File IO bug --001a114109b81f527a05388efb77 Content-Type: text/plain; charset=UTF-8 Hi all, I maintain a small OCaml program that generates some data, writes it to a temporary file and creates another process, which then reads that temporary file. Recently, I've received a few reports from users that the program generates an empty file when it should not. All of the affected users run either 64bit Win7 or Win10. I have access to one of those users' machines, and I can reproduce the issue consistently, however I'm not able to reproduce the issue on any other machine. The file io part looks something like following: let oc = open_out_bin file in output_string oc s; close_out oc The string "s" has non-zero size. The out channel has non-zero length and doing Unix.stat on the file after its closed shows non-zero size. However, both the newly created process and Windows see the file as empty after the program exits. Any ideas on what might be happening? Thanks, Dmitriy --001a114109b81f527a05388efb77 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all,

I maintain a small OCaml progra= m that generates some data, writes it to a temporary file and creates anoth= er process, which then reads that temporary file. Recently, I've receiv= ed a few reports from users that the program generates an empty file when i= t should not. All of the affected users run either 64bit Win7 or Win10. I h= ave access to one of those users' machines, and I can reproduce the iss= ue consistently, however I'm not able to reproduce the issue on any oth= er machine.=C2=A0

The file io part looks something= like following:
let oc =3D open_out_bin file in
ou= tput_string oc s;
close_out oc

T= he string "s" has non-zero size. The out channel has non-zero len= gth and doing Unix.stat on the file after its closed shows non-zero size. H= owever, both the newly created process and Windows see the file as empty af= ter the program exits.=C2=A0

Any ideas on what mig= ht be happening?

Thanks,
Dmitriy


--001a114109b81f527a05388efb77--