<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">Le 16/10/2023 à 17:14, Kurt Schwehr a
      écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CACmBxyt+qQQzuyc6CWrK0CczueLDrq_Fc_OU_3M7zecq4DibdQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="auto">Thanks for the heads up!
        <div dir="auto"><br>
        </div>
        <div dir="auto">Can you share that SHAs of the fix and cause?</div>
      </div>
    </blockquote>
    <p>master: d083af1ec9c38e79bfb0532885570de6e5b8a410</p>
    <p>3.7 branch (should apply to 3.6 as well):
      b5858ed5bc5004c97f7cd6000674015bdc70b33b</p>
    <p>cause: a worker thread of the multithreaded decoding could, in a
      situation where the block cache is full, cause a "dirty" (ie
      modified but not yet serialized to disk) block to be written,
      resulting in either a deadlock between the lock of the
      multithreaded decoder and the lock of the job queue mechanism, or
      other decoding threads could see their file handle being seek() by
      another thread.  In short: multithreading is hard.<br>
    </p>
    <blockquote type="cite"
cite="mid:CACmBxyt+qQQzuyc6CWrK0CczueLDrq_Fc_OU_3M7zecq4DibdQ@mail.gmail.com"><br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Mon, Oct 16, 2023, 7:44 AM
          Even Rouault via gdal-dev <<a
            href="mailto:gdal-dev@lists.osgeo.org"
            moz-do-not-send="true" class="moz-txt-link-freetext">gdal-dev@lists.osgeo.org</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
          <br>
          For GDAL 3.6.0 to 3.7.2, use of multi-threaded GTiff <br>
          compression+decompression, in particular within the same file,
          as for <br>
          example in a "gdalwarp -co COMPRESS=... -co NUM_THREADS=..."
          workflow <br>
          can lead to deadlocks (process stalled forever) and/or data
          corruption <br>
          (sometimes without errors at generation). Cf <br>
          <a href="https://github.com/OSGeo/gdal/issues/8470"
            rel="noreferrer noreferrer" target="_blank"
            moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/OSGeo/gdal/issues/8470</a>
          for a reproducer. The fix is <br>
          in <a href="https://github.com/OSGeo/gdal/pull/8561"
            rel="noreferrer noreferrer" target="_blank"
            moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/OSGeo/gdal/pull/8561</a><br>
          <br>
          The issue is particularly visible on Windows, or more
          generally any <br>
          operating system (or file system where the output file is
          located) which <br>
          has no VSIVirtualHandle::PRead() implementation, but it can
          also be <br>
          occasionally reproduced on Linux (at least as a deadlock).<br>
          <br>
          Even<br>
          <br>
          -- <br>
          <a href="http://www.spatialys.com" rel="noreferrer noreferrer"
            target="_blank" moz-do-not-send="true"
            class="moz-txt-link-freetext">http://www.spatialys.com</a><br>
          My software is free, but my time generally not.<br>
          <br>
          _______________________________________________<br>
          gdal-dev mailing list<br>
          <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank"
            rel="noreferrer" moz-do-not-send="true"
            class="moz-txt-link-freetext">gdal-dev@lists.osgeo.org</a><br>
          <a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev"
            rel="noreferrer noreferrer" target="_blank"
            moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
        </blockquote>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </body>
</html>