Feature dtcenter/METplus-Internal#21 signal handling #2336
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Expected Differences
Do these changes introduce new tools, command line arguments, or configuration file options? [No]
Do these changes modify the structure of existing or add new output data types (e.g. statistic line types or NetCDF variables)? [No]
Pull Request Testing
I made some changes to the code and ran some tests to verify that the csignal types were handled properly. I was not able to cause a SIGILL exception, which according to the GNU docs is:
Here are the tests I performed:
int[foo]={23};delete foo;
to the main function, which caused SIGABRT:int foo = 3/0;
to the main function, which caused SIGFPE:abort();
to the main function, which caused SIGABRT:snuff mtd
in another window to kill the process, which caused SIGTERM:void (*foo)();foo();
to the main function, which caused a seg fault:The core file is a file named 'core' that is generated in the current pwd where the app is running. This was the directory I was in when I called METplus to run a use case. The core file will likely not be generated by default because the ulimit needs to be set for the core file. You can run
ulimit -a
to see the settings. The default core file size is 0, but runningulimit -c unlimited
will set the size to unlimited. Then the seg fault will generate the core file that can be used with the debugger to get to the state of the app when the seg fault occurred so you can see where it occurred.Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes]
Do these changes include sufficient testing updates? [Yes]
Will this PR result in changes to the test suite? [No]
Please complete this pull request review by 11/8/2022.
Pull Request Checklist
See the METplus Workflow for details.
Select: Reviewer(s)
Select: Organization level software support Project or Repository level development cycle Project
Select: Milestone as the version that will include these changes