<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW " title="NEW --- - cmake: race condition between different sphinx targets" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23781&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=PWcwntDmDhgVATMiKhG0OMoguBTOyHbO0b_0DzFFxYw&s=nAE0xhmJGegAgBC8komwkbzqq4sNW4K-wVYXBVdI1Ok&e=">23781</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>cmake: race condition between different sphinx targets
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Build scripts
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>cmake
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mgorny@gentoo.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>If multiple Sphinx targets are declared in the same directory, they all share a
common doctree directory. Now, if multiple targets are enabled and parallel
make is used, multiple instances of Sphinx can be started simultaneously with
the same doctree directory, resulting in race conditions.

This is hard to reproduce but I've been able to see one regarding os.makedirs()
hitting EEXIST. Not that I believe this isn't a bug in Python but I doubt this
is something we can rely upon being fixed for us.

Potential solutions are:

1. add an ordering dep between the two targets. Let only one Sphinx instance
run in parallel, and then run the other reusing already-generated doctrees.

2. Use separate doctree directories. This means that Sphinx would generate the
same doctrees twice. Not sure how much slower that would be, actually.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>