<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 - XRay FDR number of function enter and exits are not consistent"
href="https://bugs.llvm.org/show_bug.cgi?id=37930">37930</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>XRay FDR number of function enter and exits are not consistent
</td>
</tr>
<tr>
<th>Product</th>
<td>XRay
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Tools
</td>
</tr>
<tr>
<th>Assignee</th>
<td>dberris@google.com
</td>
</tr>
<tr>
<th>Reporter</th>
<td>henryzhu@seas.upenn.edu
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Hello,
I encountered a problem where xray generates logs where the number of function
enters increases more than the function exits the longer the program is
running. I am testing xray on nginx version 1.12 to see what XRay reports on
the function calls and returns. I am running on 16.04.1-Ubuntu x86_64 machine.
I modified the nginx source to produce xray logs and compiled nginx with
–fxray-instrument –fxray-instruction-threshold=1. I ran nginx with
XRAY_OPTIONS=”patch_premain=true xray_mode=xray-fdr verbosity=1”. I ran nginx
with xray enabled multiple times, each time with a different amount of requests
before exiting nginx and I noticed that the total difference between the
function-enter/function-exits increases when I send more total requests. Then,
the stack would overflow if nginx ran for too long, which should not occur with
nginx.
I have three test cases where I send 10, 50 and 100 requests to nginx using
wget localhost:port. When I count the number of function enters and exits from
the log (llvm-xray convert –f yaml –symbolize –instr_map=./nginx (xray log)
10 requests:
I get 385 of function-enters and 338 function-exits
50_request:
I get 1691 function-enters and 1484 function-exits.
100_request file:
I get 4403 function-enters and 2991 function-exits.
This is unusual as one would expect the stack to go back to its original state
(nginx should return to its original state) when there are no more requests to
handle. Thus, the difference between the function-enters and function-exits
should stay consistent. Is it possible that xray is reporting extra functions
or not catching certain returns?
I can send the generated xray log files if that helps. Let me know if you want
more details on how xray, nginx were built.
Thanks,
Henry</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>