[llvm-bugs] [Bug 37930] New: XRay FDR number of function enter and exits are not consistent

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jun 25 13:56:24 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37930

            Bug ID: 37930
           Summary: XRay FDR number of function enter and exits are not
                    consistent
           Product: XRay
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Tools
          Assignee: dberris at google.com
          Reporter: henryzhu at seas.upenn.edu
                CC: llvm-bugs at lists.llvm.org

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180625/f6cc9b9c/attachment.html>


More information about the llvm-bugs mailing list