title: Linux C program: where did this SIGABRT come from?
body: <p>On a Fedora 22 virtual machine, my C program is crashing with SIGABRT.  GDB points at an instruction in the glibc stub for the poll system call.  The disassembly looks like this:</p>
  
  <pre><code> 0x7f5359c46662 &lt;poll+34&gt;                mov    %rax,(%rsp)
   0x7f5359c46666 &lt;poll+38&gt;                mov    $0x7,%eax
   0x7f5359c4666b &lt;poll+43&gt;                syscall
  &gt;0x7f5359c4666d &lt;poll+45&gt;                mov    (%rsp),%rdi
   0x7f5359c46671 &lt;poll+49&gt;                mov    %rax,%rdx
   0x7f5359c46674 &lt;poll+52&gt;                callq  0x7f5359c5fa30 &lt;__libc_disable_asynccancel&gt;
  </code></pre>
  
  <p>(The stub's source code is in assembly code subject to complex macro processing so it isn't worth quoting here.)</p>
  
  <p>I don't know where the SIGABRT is coming from.</p>
  
  <p>The poll system call manpage doesn't say it can raise a SIGABRT.</p>
  
  <p>There is another thread but it is waiting on a read system call so I don't see how it could send a signal to the crashing thread.</p>
  
  <p>I'm unaware of any agent in the system that might "kill -s SIGABRT" this process.</p>
  
  <p>The code is compiled with -D_FORTIFY_SOURCE=2, and this could cause SIGABRT but I would expect it to be synchronous so that gdb would point at the code that raised it.</p>