<html>
    <head>
      <base href="http://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 --- - [TSan RTL] hang in symbolizer code"
   href="http://llvm.org/bugs/show_bug.cgi?id=18379">18379</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[TSan RTL] hang in symbolizer code
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>compiler-rt
          </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>compiler-rt
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>todd@lipcon.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>Running a program that reports a lot of TSAN errors, I ended up with one of my
threads stuck in the following stack:

(gdb) bt
#0  0x00007fab3cb07319 in syscall () from /lib64/libc.so.6
#1  0x00007fab3febaa61 in __sanitizer::internal_read(int, void*, unsigned long)
()
#2  0x00007fab3fef3fe8 in __tsan::SymbolizeCodeAddr2Line(unsigned long) ()
#3  0x00007fab3feefbbd in __tsan::SymbolizeStack(__tsan::StackTrace const&) ()
#4  0x00007fab3fef1aa2 in __tsan::PrintCurrentStack(__tsan::ThreadState*,
unsigned long) ()
#5  0x00007fab3feeee88 in __tsan::MutexUnlock(__tsan::ThreadState*, unsigned
long, unsigned long) ()

If I look for hung addr2line processes, I see:

(gdb) bt
#0  0x0000003c982db630 in __read_nocancel () from /lib64/libc.so.6
#1  0x0000003c98271fa8 in _IO_new_file_underflow () from /lib64/libc.so.6
#2  0x0000003c98273aae in _IO_default_uflow_internal () from /lib64/libc.so.6
#3  0x0000003c9826818a in _IO_getline_info_internal () from /lib64/libc.so.6
#4  0x0000003c98266fe9 in fgets () from /lib64/libc.so.6
#5  0x00000000004020e9 in ?? ()
#6  0x0000003c9821ecdd in __libc_start_main () from /lib64/libc.so.6

which implies that, for some reason, the Addr2Line code is sending some kind of
partial input into the addr2line binary, and then expecting a response.
Addr2line is still expecting the input, and we end up hanging forever.

This is with llvm/clang 3.3.</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>