Skip to content

Add stack-debugging features using Abseil#24151

Merged
veblush merged 2 commits intogrpc:masterfrom
veblush:stack-debug
Sep 21, 2020
Merged

Add stack-debugging features using Abseil#24151
veblush merged 2 commits intogrpc:masterfrom
veblush:stack-debug

Conversation

@veblush
Copy link
Copy Markdown
Contributor

@veblush veblush commented Sep 14, 2020

This adds following things to the test utility

  • Modifying grpc_test_init to
    • Install Abseil FailureSignalHandler instead of gRPC in-house one so that we can free from maintaining it
    • Call InitializeSymbolizer so that CurrentStackTrace can be used throughout the tests.
  • Adding CurrentStackTrace so that stacktrace can be examined throughout the tests.

This feature is disabled on Windows because of #24178.

@veblush veblush added lang/core release notes: no Indicates if PR should not be in release notes labels Sep 14, 2020
@veblush veblush force-pushed the stack-debug branch 4 times, most recently from 5178a02 to 7f64275 Compare September 17, 2020 01:50
@veblush
Copy link
Copy Markdown
Contributor Author

veblush commented Sep 17, 2020

Failing tests in Bazel RBE Windows

  • //test/core/client_channel/resolvers:dns_resolver_connectivity_using_native_resolver_test
  • //test/cpp/qps:qps_json_driver_test_cpp_generic_async_streaming_qps_unconstrained_insecure
  • //test/cpp/qps:qps_json_driver_test_cpp_protobuf_async_streaming_from_client_1channel_1MB
  • //test/cpp/qps:qps_json_driver_test_cpp_protobuf_sync_streaming_qps_unconstrained_insecure
[symbolize_win32.inc : 53] RAW: SymInitialize() failed: 2147483653

2147483653 = 0x80000005

@veblush
Copy link
Copy Markdown
Contributor Author

veblush commented Sep 17, 2020

Once the name of some tests were shortened, failing test has changed

  • //test/cpp/qps:qps_jd_cpp_generic_async_streaming_qps_unconstrained_2waysharedcq_insecure
  • //test/cpp/qps:qps_jd_cpp_protobuf_async_streaming_from_client_qps_unconstrained_insecure
  • //test/cpp/qps:qps_jd_cpp_protobuf_async_streaming_from_server_qps_unconstrained_insecure
  • //test/cpp/qps:qps_jd_cpp_protobuf_async_streaming_qps_unconstrained_2waysharedcq_insecure

@veblush veblush requested a review from yashykt September 18, 2020 02:51
@yashykt
Copy link
Copy Markdown
Member

yashykt commented Sep 18, 2020

Can you post a sample output?


// Return the current stack trace as a string (on multiple lines, beginning with
// "Stack trace:\n")
std::string CurrentStackTrace();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this available on all platforms?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not being used as of now. Can we modify some test to print out the stack trace?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I'm going to modify the test environment to make use of this in a following PR.

@veblush
Copy link
Copy Markdown
Contributor Author

veblush commented Sep 18, 2020

Sample output is

Stack trace:
    @     0x7f07d608aee4        192  grpc_test_init()
    @     0x7f07d608b0ff         48  grpc::testing::TestEnvironment::TestEnvironment()
    @           0x403856         64  main
    @     0x7f07d4a8ecca  (unknown)  __libc_start_main
    @ 0x5541d68949564100  (unknown)  (unknown)

@veblush veblush merged commit c516eb7 into grpc:master Sep 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement lang/core release notes: no Indicates if PR should not be in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants