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 ability to serialize input vector and sql if expression evaluation crashes #6402

Closed

Conversation

bikramSingh91
Copy link
Contributor

Summary:
This adds an experimental flag
'experimental_velox_save_input_on_fatal_signal' that when set to
true, serializes the input vector data and all the SQL expressions
in the ExprSet that is currently executing whenever a fatal signal
is encountered. Enabling this flag makes the signal handler async
signal unsafe, so it should only be used for debugging purposes.

Differential Revision: D48891649

@netlify
Copy link

netlify bot commented Sep 1, 2023

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit b31883c
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/6504f6767471530008d28317

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 1, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D48891649

bikramSingh91 pushed a commit to bikramSingh91/velox that referenced this pull request Sep 7, 2023
…n crashes (facebookincubator#6402)

Summary:

This adds an experimental flag
'experimental_velox_save_input_on_fatal_signal' that when set to
true, serializes the input vector data and all the SQL expressions
in the ExprSet that is currently executing whenever a fatal signal
is encountered. Enabling this flag makes the signal handler async
signal unsafe, so it should only be used for debugging purposes.

Differential Revision: D48891649
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D48891649

bikramSingh91 pushed a commit to bikramSingh91/velox that referenced this pull request Sep 7, 2023
…n crashes (facebookincubator#6402)

Summary:

This adds an experimental flag
'experimental_velox_save_input_on_fatal_signal' that when set to
true, serializes the input vector data and all the SQL expressions
in the ExprSet that is currently executing whenever a fatal signal
is encountered. Enabling this flag makes the signal handler async
signal unsafe, so it should only be used for debugging purposes.

Differential Revision: D48891649
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D48891649

Copy link
Contributor

@kgpai kgpai left a comment

Choose a reason for hiding this comment

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

Looks good , some nits.

@@ -40,6 +41,20 @@ DEFINE_bool(
"Whether to overwrite queryCtx and force the "
"use of simplified expression evaluation path.");

DEFINE_bool(
experimental_velox_save_input_on_fatal_signal,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we call it velox_experimental_... ? This seems closer to convention.

DEFINE_bool(
experimental_velox_save_input_on_fatal_signal,
false,
"This is an experimental flag that, when set to true, "
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Maybe write as follows: This is an experimental flag only to be used for debugging purposes . If set , it serializes...

"in directories specified by either "
"'velox_save_input_on_expression_any_failure_path' or "
"'velox_save_input_on_expression_system_failure_path', "
"so either of these should be specified to enable this.");
Copy link
Contributor

Choose a reason for hiding this comment

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

This final 'so either of these..' is redundant since you already mentioned in directories specified by either above.

return;
}

try {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we try and persist the sql expressions first , since its far less likely that they might have corruptions etc ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As discussed offline, I'll change it catch and proceed if either of these paths throw an exception

};
process::ScopedThreadDebugInfo scopedDebugInfo(debugInfo);

for (int32_t i = begin; i < end; ++i) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Only reason we need to duplicate the for loop is because of the scopedcDebugInfo - is there a way to make that a no-op and not have the loop twice ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes thats exactly the reason. I could not find any other way. I thought of moving the loop in a utility method, but its small enough that its not worth moving it to one.

bikramSingh91 pushed a commit to bikramSingh91/velox that referenced this pull request Sep 16, 2023
…n crashes (facebookincubator#6402)

Summary:

This adds an experimental flag
'experimental_velox_save_input_on_fatal_signal' that when set to
true, serializes the input vector data and all the SQL expressions
in the ExprSet that is currently executing whenever a fatal signal
is encountered. Enabling this flag makes the signal handler async
signal unsafe, so it should only be used for debugging purposes.

Differential Revision: D48891649
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D48891649

…n crashes (facebookincubator#6402)

Summary:

This adds an experimental flag
'experimental_velox_save_input_on_fatal_signal' that when set to
true, serializes the input vector data and all the SQL expressions
in the ExprSet that is currently executing whenever a fatal signal
is encountered. Enabling this flag makes the signal handler async
signal unsafe, so it should only be used for debugging purposes.

Differential Revision: D48891649
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D48891649

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 8e4b1cb.

@conbench-facebook
Copy link

Conbench analyzed the 1 benchmark run on commit 8e4b1cb9.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

codyschierbeck pushed a commit to codyschierbeck/velox that referenced this pull request Sep 27, 2023
…n crashes (facebookincubator#6402)

Summary:
Pull Request resolved: facebookincubator#6402

This adds an experimental flag
'experimental_velox_save_input_on_fatal_signal' that when set to
true, serializes the input vector data and all the SQL expressions
in the ExprSet that is currently executing whenever a fatal signal
is encountered. Enabling this flag makes the signal handler async
signal unsafe, so it should only be used for debugging purposes.

Reviewed By: kgpai

Differential Revision: D48891649

fbshipit-source-id: 47722d726c76a8602cf436c1840d2a0d720e2c35
codyschierbeck pushed a commit to codyschierbeck/velox that referenced this pull request Sep 27, 2023
…n crashes (facebookincubator#6402)

Summary:
Pull Request resolved: facebookincubator#6402

This adds an experimental flag
'experimental_velox_save_input_on_fatal_signal' that when set to
true, serializes the input vector data and all the SQL expressions
in the ExprSet that is currently executing whenever a fatal signal
is encountered. Enabling this flag makes the signal handler async
signal unsafe, so it should only be used for debugging purposes.

Reviewed By: kgpai

Differential Revision: D48891649

fbshipit-source-id: 47722d726c76a8602cf436c1840d2a0d720e2c35
codyschierbeck pushed a commit to codyschierbeck/velox that referenced this pull request Sep 27, 2023
…n crashes (facebookincubator#6402)

Summary:
Pull Request resolved: facebookincubator#6402

This adds an experimental flag
'experimental_velox_save_input_on_fatal_signal' that when set to
true, serializes the input vector data and all the SQL expressions
in the ExprSet that is currently executing whenever a fatal signal
is encountered. Enabling this flag makes the signal handler async
signal unsafe, so it should only be used for debugging purposes.

Reviewed By: kgpai

Differential Revision: D48891649

fbshipit-source-id: 47722d726c76a8602cf436c1840d2a0d720e2c35
ericyuliu pushed a commit to ericyuliu/velox that referenced this pull request Oct 12, 2023
…n crashes (facebookincubator#6402)

Summary:
Pull Request resolved: facebookincubator#6402

This adds an experimental flag
'experimental_velox_save_input_on_fatal_signal' that when set to
true, serializes the input vector data and all the SQL expressions
in the ExprSet that is currently executing whenever a fatal signal
is encountered. Enabling this flag makes the signal handler async
signal unsafe, so it should only be used for debugging purposes.

Reviewed By: kgpai

Differential Revision: D48891649

fbshipit-source-id: 47722d726c76a8602cf436c1840d2a0d720e2c35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants