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

flux-start: exit gracefully with error when getcwd() fails #2280

merged 3 commits into from Jul 31, 2019


Copy link

commented Jul 31, 2019

This PR fixes the segv in the cron module found by @dongahn in issue #2274.

A test for flux-start run from a removed directory was also added.

Finally, while flux-start fails gracefully with the cron module fix, there is a huge number of errors. So a check was added early to flux-start main() to exit with an error if getcwd() fails to evoke an early exit.

grondo added 3 commits Jul 31, 2019
Problem: The cron module fails to check the return value from
cron_ctx_create(), thus causing a segv later in module startup
when ctx == NULL.

Check that `ctx` was successfully created and exit if not.

Fixes #2274
Ensure flux-start with default list of modules fails gracefully
when run from a directory that has been removed.
Problem: If flux-start is run with a current working directory that
has been removed, then a very long stream of errors is emitted
resulting in eventual failure.

Early in flux-start main(), exit with error if getcwd() fails.
@grondo grondo force-pushed the grondo:issue#2274 branch from 57d9d58 to 794739a Jul 31, 2019

This comment has been minimized.

Copy link

commented Jul 31, 2019

Codecov Report

Merging #2280 into master will decrease coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2280      +/-   ##
- Coverage   80.85%   80.84%   -0.01%     
  Files         213      213              
  Lines       33458    33463       +5     
+ Hits        27053    27054       +1     
- Misses       6405     6409       +4
Impacted Files Coverage Δ
src/modules/cron/cron.c 81.94% <100%> (+0.04%) ⬆️
src/cmd/flux-start.c 78.47% <100%> (+0.28%) ⬆️
src/common/libflux/mrpc.c 87.79% <0%> (-1.19%) ⬇️
src/common/libflux/message.c 80.62% <0%> (-0.13%) ⬇️

This comment has been minimized.

Copy link

commented Jul 31, 2019

Thanks for running this down!

@garlick garlick merged commit b04bcca into flux-framework:master Jul 31, 2019
4 checks passed
4 checks passed
Summary 1 potential rule
codecov/patch 100% of diff hit (target 80.85%)
codecov/project Absolute coverage decreased by -<.01% but relative coverage increased by +19.14% compared to 505e7c1
continuous-integration/travis-ci/pr The Travis CI build passed

This comment has been minimized.

Copy link

commented Jul 31, 2019

Thanks @grondo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.