Skip to content

Conversation

@arukuka
Copy link
Member

@arukuka arukuka commented Aug 18, 2022

Summary

Fixed an issue where stack traces could not be obtained properly in CC.

Purpose

stack trace is important information

Contents

  • Use backtrace instead of addr2line
  • Add --strip=never option at bazel build
  • Remove unnecessary code

Testing Methods Performed

I used qmpc::Log::Debug in several places and confirmed that a stack trace could be obtained as follows.

  • example of insertion:
    diff --git a/src/ComputationContainer/ConfigParse/ConfigParse.hpp b/src/ComputationContainer/ConfigParse/ConfigParse.hpp
    index 5e4647c4..3361ff3a 100644
    --- a/src/ComputationContainer/ConfigParse/ConfigParse.hpp
    +++ b/src/ComputationContainer/ConfigParse/ConfigParse.hpp
    @@ -83,6 +83,7 @@ class Config
     
         Config()
         {
    +        qmpc::Log::Debug(__FILE__, __LINE__);
             party_id = getEnvInt("PARTY_ID");
             n_parties = getEnvInt("N_PARTIES");
             sp_id = getEnvInt("SP_ID");
  • log:
    root@dae2cfbfc368:/QuickMPC# ./bazel-bin/computation_container
    2022-08-18 01:22:46+0000|DEBUG|Config::Config() at ./ConfigParse/ConfigParse.hpp:86|./ConfigParse/ConfigParse.hpp|86
    [2022-08-18 01:22:46.757] [info] 3 maps to http://computation_container3:50120 and http://computation_container3:50120
    [2022-08-18 01:22:46.757] [info] 1 maps to http://computation_container1:50120 and http://computation_container1:50120
    ...

- Use backtrace instead of addr2line
- Add `--strip=never` option at bazel build
- Remove unnecessary code
@watason
Copy link
Contributor

watason commented Aug 18, 2022

it looks good.
By the way, what were the cause of these, if u could find out?
Also, i have a request.
please create a new issue ( with completed state ), and link to this PR.
thank you.

Copy link

@mdonaka mdonaka left a comment

Choose a reason for hiding this comment

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

Thanks for fixing it. Approve if CI passes.

@arukuka arukuka self-assigned this Aug 18, 2022
@arukuka arukuka linked an issue Aug 18, 2022 that may be closed by this pull request
@arukuka
Copy link
Member Author

arukuka commented Aug 18, 2022

@watason
Noted with thanks.
I created an issue, and linked it.
I think that it is appropriate to close the issue above by merging this pull request, so I am leaving it not completed state but open.

By the way, what were the cause of these, if u could find out?

I have not correctly understood the cause in detail, but I left a work log in the issue, so please check it.

@arukuka arukuka merged commit c5f54ea into develop Aug 19, 2022
@arukuka arukuka deleted the feature/otsuka/fix_cc_stacktrace branch August 19, 2022 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to get stacktrace with debug infomation in ComputationContainer

4 participants