-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add ability to serialize input vector and sql if expression evaluation crashes #6402
Conversation
✅ Deploy Preview for meta-velox canceled.
|
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
7e6735e
to
48015a5
Compare
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
48015a5
to
3a13db8
Compare
This pull request was exported from Phabricator. Differential Revision: D48891649 |
There was a problem hiding this 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.
velox/expression/Expr.cpp
Outdated
@@ -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, |
There was a problem hiding this comment.
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.
velox/expression/Expr.cpp
Outdated
DEFINE_bool( | ||
experimental_velox_save_input_on_fatal_signal, | ||
false, | ||
"This is an experimental flag that, when set to true, " |
There was a problem hiding this comment.
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...
velox/expression/Expr.cpp
Outdated
"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."); |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
…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
3a13db8
to
b0b3d82
Compare
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
b0b3d82
to
b31883c
Compare
This pull request was exported from Phabricator. Differential Revision: D48891649 |
This pull request has been merged in 8e4b1cb. |
Conbench analyzed the 1 benchmark run on commit There were no benchmark performance regressions. 🎉 The full Conbench report has more details. |
…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
…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
…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
…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
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