Skip to content

Handle exit while scheduled#1704

Merged
sporksmith merged 3 commits intoshadow:mainfrom
sporksmith:handle-exit-while-scheduled
Oct 6, 2021
Merged

Handle exit while scheduled#1704
sporksmith merged 3 commits intoshadow:mainfrom
sporksmith:handle-exit-while-scheduled

Conversation

@sporksmith
Copy link
Copy Markdown
Contributor

Add regression test and bug fix for a bug encountered while running arti:

  • A syscallcondition is triggered, scheduling a thread to run
  • The process exits, cleaning up the thread, canceling the condition's listeners, etc.
  • The scheduled task runs, but since the syscallcondition has been cancelled, it no longer has references to the process, thread, etc.

@github-actions github-actions bot added Component: Build Build/install tools and dependencies Component: Main Composing the core Shadow executable Component: Testing Unit and integration tests and frameworks labels Oct 6, 2021
@sporksmith sporksmith enabled auto-merge October 6, 2021 20:00
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 6, 2021

Codecov Report

Merging #1704 (f6a7946) into main (858a7ea) will decrease coverage by 0.02%.
The diff coverage is 37.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1704      +/-   ##
==========================================
- Coverage   54.63%   54.60%   -0.03%     
==========================================
  Files         145      145              
  Lines       18903    18910       +7     
  Branches     4537     4543       +6     
==========================================
- Hits        10327    10326       -1     
- Misses       5823     5829       +6     
- Partials     2753     2755       +2     
Flag Coverage Δ
tests 54.60% <37.50%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/main/host/syscall_condition.c 76.14% <37.50%> (-1.58%) ⬇️
src/lib/logger/log_level.c 13.63% <0.00%> (-4.55%) ⬇️
src/lib/tsc/tsc.c 32.39% <0.00%> (-1.41%) ⬇️
src/main/host/descriptor/descriptor.c 73.33% <0.00%> (-0.61%) ⬇️
src/lib/libc_preload/syscall_wrappers.c 17.77% <0.00%> (-0.31%) ⬇️
src/main/host/syscall/socket.c 78.63% <0.00%> (-0.15%) ⬇️
src/lib/tsc/tsc_test.c 30.37% <0.00%> (ø)
src/main/host/network_interface.c 71.91% <0.00%> (ø)
...main/core/scheduler/scheduler_policy_host_single.c 73.64% <0.00%> (+0.67%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 858a7ea...f6a7946. Read the comment docs.

@sporksmith sporksmith force-pushed the handle-exit-while-scheduled branch from a3c0a5a to ba05c6a Compare October 6, 2021 20:29
@sporksmith sporksmith merged commit f0d11bd into shadow:main Oct 6, 2021
@sporksmith sporksmith deleted the handle-exit-while-scheduled branch October 6, 2021 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Build Build/install tools and dependencies Component: Main Composing the core Shadow executable Component: Testing Unit and integration tests and frameworks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants