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

HPCC-20603 Add options to trace postmortem debug info on job abort #11729

Merged
merged 1 commit into from Sep 26, 2018

Conversation

jakesmith
Copy link
Member

@jakesmith jakesmith commented Sep 19, 2018

Type of change:

  • This change is a bug fix (non-breaking change which fixes an issue).
  • This change is a new feature (non-breaking change which adds functionality).
  • This change improves the code (refactor or other change that does not change the functionality)
  • This change fixes warnings (the fix does not alter the functionality or the generated code)
  • This change is a breaking change (fix or feature that will cause existing behavior to change).
  • This change alters the query API (existing queries will have to be recompiled)

Checklist:

  • My code follows the code style of this project.
    • My code does not create any new warnings from compiler, build system, or lint.
  • The commit message is properly formatted and free of typos.
    • The commit message title makes sense in a changelog, by itself.
    • The commit is signed.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly, or...
    • I have created a JIRA ticket to update the documentation.
    • Any new interfaces or exported functions are appropriately commented.
  • I have read the CONTRIBUTORS document.
  • The change has been fully tested:
    • I have added tests to cover my changes.
    • All new and existing tests passed.
    • I have checked that this change does not introduce memory leaks.
    • I have used Valgrind or similar tools to check for potential issues.
  • I have given due consideration to all of the following potential concerns:
    • Scalability
    • Performance
    • Security
    • Thread-safety
    • Premature optimization
    • Existing deployed queries will not be broken
    • This change fixes the problem, not just the symptom
    • The target branch of this pull request is appropriate for such a change.
  • There are no similar instances of the same problem that should be addressed
    • I have addressed them here
    • I have raised JIRA issues to address them separately
  • This is a user interface / front-end modification
    • I have tested my changes in multiple modern browsers
    • The component(s) render as expected

Testing:

@hpcc-jirabot
Copy link

@jakesmith
Copy link
Member Author

jakesmith commented Sep 19, 2018

@mckellyln - please review
NB: kept as 2 commits for now to make it easier to review.

@mckellyln
Copy link
Contributor

@jakesmith I think there is an extra file added ?
thorlcr/activities/keypatch/thkeypatch.cpp~

@jakesmith
Copy link
Member Author

@mckellyln - removed spurious extra file.

@@ -1939,7 +1939,9 @@ class CJobListener : public CSimpleInterface
CJobSlave *job = jobs.find(jobKey.get());
if (job)
{
if (job->getOptBool("dumpInfoOnAbort"))
bool dumpInfo;
msg.read(dumpInfo);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could there be a compatibility issue ? Should we check for dumpInfoOnAbort option before always reading it ?

Copy link
Member Author

Choose a reason for hiding this comment

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

No because this is a Thor master->slave message in same cluster only, and they must always be on same build.

dumpInfoCmd.appendf(" %s %u %s %u", myInstanceName, myBasePort, exePath.str(), pid);
}
else
getDebuggerGetStacksCmd(dumpInfoCmd);
Copy link
Contributor

Choose a reason for hiding this comment

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

So if there is a dumpInfoCmd configured then it is used instead of the gdb get all stacks ?
Does it always make sense to append thor-instance-name, base-port, exe-path, pid to dumpInfoCmd if we don't know what that is ?

Copy link
Member Author

Choose a reason for hiding this comment

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

So if there is a dumpInfoCmd configured then it is used instead of the gdb get all stacks ?

yes.

Does it always make sense to append thor-instance-name, base-port, exe-path, pid to dumpInfoCmd if we don't know what that is ?

it should be documented that the command is always executed like this, but I think it's okay, unless you have another suggestion?
An alternative approach I suppose would be to set interesting info. into environment variables for the executed program to use if it wanted to.

@mckellyln
Copy link
Contributor

@jakesmith looks good but have a few questions

@jakesmith
Copy link
Member Author

@mckellyln - added some answers.

@mckellyln
Copy link
Contributor

@jakesmith looks good for merge.

Copy link
Contributor

@mckellyln mckellyln left a comment

Choose a reason for hiding this comment

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

Approved

@jakesmith
Copy link
Member Author

@richardkchapman - please merge.

@richardkchapman
Copy link
Member

@jakesmith Can you squash

Signed-off-by: Jake Smith <jake.smith@lexisnexisrisk.com>
@jakesmith
Copy link
Member Author

jakesmith commented Sep 26, 2018

@mckellyln NB: I've added an option which can default a user abort to dumpInfo too, in case useful.
can be set globally or via #option , e.g.:
#option('"dumpInfoOnUserAbort', true);

@jakesmith
Copy link
Member Author

@richardkchapman - please merge.

@HPCCSmoketest
Copy link
Contributor

Automated Smoketest: ✅
OS: centos 7.4.1708 (Linux 3.10.0-327.28.3.el7.x86_64)
Sha: 77f49a5
Build: success
Install hpccsystems-platform-community_7.0.0-rc2.el7.x86_64.rpm
HPCC Start: OK

Unit tests result:

Test total passed failed errors timeout
unittest 94 94 0 0 0
wutoolTest(Dali) 19 19 0 0 0
wutoolTest(Cassandra) 19 19 0 0 0

Regression test result:

phase total pass fail
setup (hthor) 11 11 0
setup (thor) 11 11 0
setup (roxie) 11 11 0
test (hthor) 806 806 0
test (thor) 730 730 0
test (roxie) 879 879 0

HPCC Stop: OK
HPCC Uninstall: OK
Time stats:

Prep time Build time Package time Install time Start time Test time Stop time Summary
18 sec (00:00:18) 190 sec (00:03:10) 95 sec (00:01:35) 22 sec (00:00:22) 44 sec (00:00:44) 1446 sec (00:24:06) 18 sec (00:00:18) 1833 sec (00:30:33)

@richardkchapman richardkchapman merged commit ff56d8a into hpcc-systems:master Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants