<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - -fprofile-generate profile merging from concurrent processes fails on Windows with "LLVM Profile Error: Failed to write file ... File exists""
   href="https://bugs.llvm.org/show_bug.cgi?id=43425">43425</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>-fprofile-generate profile merging from concurrent processes fails on Windows with "LLVM Profile Error: Failed to write file ... File exists"
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </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>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>hans@chromium.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>For example, consider a simple program:

int main() {
        unsigned x = 1;
        for (int i = 0; i < 100*1000*1000; i++) {
                x *= i;
        }
        return 0;
}


built with instrumentation:

clang-cl -fprofile-generate=\src\tmp\ \src\tmp\a.cc

and run in an bunch of concurrent invocations (using e.g. Cygwin):

$ for i in `seq 1 100` ; do ./a.exe & done



A bunch of the program invocations fail to write their profile:

LLVM Profile Error: Failed to write file
"\src\tmp\default_15822669652030248442_0.profraw": File exists
LLVM Profile Error: Failed to write file
"\src\tmp\default_15822669652030248442_0.profraw": File exists
LLVM Profile Error: Failed to write file
"\src\tmp\default_15822669652030248442_0.profraw": File exists



(This shows up when running instrumented tablegen binaries as part of building
IR-instrumented Clang on Windows, see e.g.
<a href="https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8901886476057032176/+/steps/package_clang/0/stdout">https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8901886476057032176/+/steps/package_clang/0/stdout</a>)</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>