<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 - Deadlock in wasm-ld when linking large archive with object"
   href="https://bugs.llvm.org/show_bug.cgi?id=37064">37064</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Deadlock in wasm-ld when linking large archive with object
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lld
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>All Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>tyler@fastly.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=20174" name="attach_20174" title="tar file of musl.a and stdio_test.o">attachment 20174</a> <a href="attachment.cgi?id=20174&action=edit" title="tar file of musl.a and stdio_test.o">[details]</a></span>
tar file of musl.a and stdio_test.o

wasm-ld occasionally hits what I assume is a deadlocking race condition when
linking a large wasm archive file with a small wasm object file. It sees to
occur more frequently on slower machines. The issue vanishes when wasm-ld is
run with "--no-threads".

I am using llvm 6.0.0 and invoking wasm-ld like so:
wasm-ld --no-entry --allow-undefined stdio_test.o musl.a -o stdio_test.wasm

Backtraces of all running threads can be found here, however I don't have a
debug build of LLVM handy so it's of limited use:
<a href="https://gist.github.com/tyler/94beafc2929b14196fa92c4d334432c2">https://gist.github.com/tyler/94beafc2929b14196fa92c4d334432c2</a>

stdio_test.o and musl.a are attached.</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>