Skip to content

XRay FDR number of function enter and exits are not consistent #37278

Open
@llvmbot

Description

@llvmbot
Bugzilla Link 37930
Version unspecified
OS Linux
Reporter LLVM Bugzilla Contributor

Extended Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaxray

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions