Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Reverse Diagnostics Server #33307

Merged
merged 52 commits into from
Apr 20, 2020

Commits on Apr 2, 2020

  1. Add Advertise IPC Command

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    bc21866 View commit details
    Browse the repository at this point in the history
  2. Add untested select connect and nonblocking accept

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    0255b37 View commit details
    Browse the repository at this point in the history
  3. Add select API on windows

    * no select on unix
    * untested on unix
    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    7f8bb61 View commit details
    Browse the repository at this point in the history
  4. Implement select for unix

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    4b97ca8 View commit details
    Browse the repository at this point in the history
  5. Update diagnostics server to use both modes

    * Change DOTNET_DiagnosticsServerAddress to DOTNET_DiagnosticsClientModeAddress
    * works for original connection mode
    * untested for client mode
    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    0cb1e88 View commit details
    Browse the repository at this point in the history
  6. Add DiagnosticsIpcFactory abstraction

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    dbc9624 View commit details
    Browse the repository at this point in the history
  7. Fix precondition

    * fix array alloc
    * properly cast array size
    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    52cd9b0 View commit details
    Browse the repository at this point in the history
  8. fix x86 build

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    3918060 View commit details
    Browse the repository at this point in the history
  9. Fixed errors

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    33da551 View commit details
    Browse the repository at this point in the history
  10. fix pipe connection on window

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    f7a28c4 View commit details
    Browse the repository at this point in the history
  11. fix gcc build

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    22e4476 View commit details
    Browse the repository at this point in the history
  12. fix gcc build

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    8204e70 View commit details
    Browse the repository at this point in the history
  13. Change environment variable name

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    a74f8a3 View commit details
    Browse the repository at this point in the history
  14. Remove unnecessary protocol code

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    6b1fe2a View commit details
    Browse the repository at this point in the history
  15. Add retry semantics to reversed pipe

    * GetNextConnectedStream -> GetNextAvailableStream
    * Add caching mechanism for client connections that have been opened
    * Select->Poll
    * Untested on Windows
    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    c3d1bfd View commit details
    Browse the repository at this point in the history
  16. Use random 16 bit number for cookie

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    0045b1c View commit details
    Browse the repository at this point in the history
  17. Adding const-ness to Poll APIs

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    2c3baa4 View commit details
    Browse the repository at this point in the history
  18. reset timeout on connection failure/change

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    398d0d8 View commit details
    Browse the repository at this point in the history
  19. Clean up caching logic and add logging

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    17eb025 View commit details
    Browse the repository at this point in the history
  20. Code cleaning

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    dcd0329 View commit details
    Browse the repository at this point in the history
  21. DiagnosticsIpcFactory -> IpcStreamFactory

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    ebf9fb7 View commit details
    Browse the repository at this point in the history
  22. Change ownership of connections

    * IpcStreamFactory now owns all streams and IPCs
    * single ownership means it will properly clean up connections
    * still has separate caching array for now
    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    5eae64c View commit details
    Browse the repository at this point in the history
  23. Modify abstraction

    * IpcStreamFactory::Poll now is more similar to the poll API from Linux
    * IpcPollHandle struct is used to abstract listening for client and server connections
    * Remove Accept call and change to Listen
    * Listen puts DiagnosticIpc into active mode for server connections
    * Listen is re-entrant safe and won't allocate on each call or leak
    * clean up overlap objects on windows
    * use overlapped io for all io on windows
    * untested on windows, tested on unix
    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    834d71d View commit details
    Browse the repository at this point in the history
  24. Little bit of code cleaning

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    0a193b0 View commit details
    Browse the repository at this point in the history
  25. Change Advertise Cookie to 128 bit GUID

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    ddc2880 View commit details
    Browse the repository at this point in the history
  26. Add comment about connect

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    74244be View commit details
    Browse the repository at this point in the history
  27. Simplify advertise meta-protocol

    * make it 4 64-bit numbers
    * simplify writing logic
    * remove TryWriteNumberLittleEndian
    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    911ca0a View commit details
    Browse the repository at this point in the history
  28. Clean up resources in ~IpcStream::DiagnosticsIpc

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    8c0630a View commit details
    Browse the repository at this point in the history
  29. Fix Windows implementation

    * use Overlapped IO correctly
    * use 0 byte read for checking incoming data
    * clean up overlap handles in destructors
    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    ead4041 View commit details
    Browse the repository at this point in the history
  30. fix const-ness on unix

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    e905958 View commit details
    Browse the repository at this point in the history
  31. Add some asserts and comments

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    89ce842 View commit details
    Browse the repository at this point in the history
  32. Fix AV in shutdown path

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    8adb3f9 View commit details
    Browse the repository at this point in the history
  33. Add initial test harness and sample tests

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    23f1d00 View commit details
    Browse the repository at this point in the history
  34. fix test issue on mac

    * catch exceptions for socket shutdown
    * fix path to dll
    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    76b8c04 View commit details
    Browse the repository at this point in the history
  35. Fix bad access in unix diag ipc

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    d651b7d View commit details
    Browse the repository at this point in the history
  36. More tests

    John Salem committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    5a3fe23 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2020

  1. Fix race in Windows Poll code

    * if overlapped read finished before WFMO we'd get stuck in an inf loop
    * prevented multiple overlapped io from happening on the same overlap
    * Race only seemed to happen in Windows checked builds for some reason
    John Salem committed Apr 4, 2020
    Configuration menu
    Copy the full SHA
    f44fd01 View commit details
    Browse the repository at this point in the history
  2. Test updates

    * Make sure remote proc is always killed
    * set timeout to 10 minutes
    John Salem committed Apr 4, 2020
    Configuration menu
    Copy the full SHA
    3a4e77e View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2020

  1. fix nits from review

    John Salem committed Apr 8, 2020
    Configuration menu
    Copy the full SHA
    469d425 View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2020

  1. Add ConnectionState abstraction

    * Adds ConnectionState class for hiding server/client diff
    * simplifies code for easier reading
    John Salem committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    d93d846 View commit details
    Browse the repository at this point in the history
  2. Add test case

    John Salem committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    0fce7bc View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2020

  1. Fix windows build

    John Salem committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    6e2f642 View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2020

  1. Fix test

    * test was creating a pipe with a 0 buffer
    * runtime needs to handle a 0 buffer namedpipe
    John Salem committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    18c9959 View commit details
    Browse the repository at this point in the history
  2. Introduce a timeout to read/write

    * makes advertisement not block for more than 100 ms
    * TODO: implement on non-windows
    John Salem committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    91d6d0e View commit details
    Browse the repository at this point in the history
  3. Implement timeout read/write for unix

    John Salem committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    d4bf4c1 View commit details
    Browse the repository at this point in the history
  4. adjust poll timeout to be more aggressive

    John Salem committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    9311238 View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2020

  1. Fix nits from review

    John Salem committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    b0e1218 View commit details
    Browse the repository at this point in the history
  2. simplify branching in GetIpcPollHandle

    John Salem committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    1cd8f29 View commit details
    Browse the repository at this point in the history
  3. Add 2 byte field to advertise

    John Salem committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    3530a25 View commit details
    Browse the repository at this point in the history
  4. Fix cast for advertize

    John Salem committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    67acd21 View commit details
    Browse the repository at this point in the history
  5. additional logging in tests

    John Salem committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    8c83f22 View commit details
    Browse the repository at this point in the history
  6. Loops unix send/recv to handle partial io

    John Salem committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    1cbb720 View commit details
    Browse the repository at this point in the history