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

ci: fix intermittent disk I/O error #254

Merged
merged 1 commit into from
Sep 5, 2022

Conversation

aloisklink
Copy link
Contributor

@aloisklink aloisklink commented Sep 5, 2022

GitHub Actions CI tests are failing intermittently due to an SQLite Failed to execute statement: disk I/O error.

I'm pretty sure this is due to some sort of race condition, either with:

  • a) our thread code
  • b) GitHub Actions file-system

This commit adds a sleep 5 between the CI tests and the coverage tests in an attempt to prevent this error.

Fixes #252 (hopefully at least!)

@aloisklink aloisklink added the bug Something isn't working label Sep 5, 2022
@codecov
Copy link

codecov bot commented Sep 5, 2022

Codecov Report

Merging #254 (c011394) into main (1c9a82a) will increase coverage by 0.36%.
The diff coverage is n/a.

❗ Current head c011394 differs from pull request most recent head 7b1d01b. Consider uploading reports for the commit 7b1d01b to get more accurate results

@@            Coverage Diff             @@
##             main     #254      +/-   ##
==========================================
+ Coverage   48.51%   48.88%   +0.36%     
==========================================
  Files         113      113              
  Lines       17887    18423     +536     
==========================================
+ Hits         8678     9006     +328     
- Misses       9209     9417     +208     
Impacted Files Coverage Δ
src/utils/nl.c 10.17% <0.00%> (-0.55%) ⬇️
tests/supervisor/test_cmd_processor.c 100.00% <0.00%> (ø)
...apture/middlewares/header_middleware/dns_decoder.c 0.00% <0.00%> (ø)
...pture/middlewares/header_middleware/mdns_decoder.c 0.00% <0.00%> (ø)
...ure/middlewares/header_middleware/packet_decoder.c 0.00% <0.00%> (ø)
src/utils/iface.c 22.22% <0.00%> (+1.68%) ⬆️
src/utils/net.c 81.87% <0.00%> (+3.80%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@mereacre
Copy link
Contributor

mereacre commented Sep 5, 2022

Yes, it might be the capture threads as all of them are trying to write to the same db.

GitHub Actions CI tests are failing intermittently due
to an SQLite `Failed to execute statement: disk I/O error`.

I'm pretty sure this is due to some sort of race condition,
either with:
  - a) our thread code
  - b) GitHub Actions file-system

This commit adds a `sleep 5` between the CI tests
and the coverage tests in an attempt to prevent this
error.

Fixes: #252
@aloisklink
Copy link
Contributor Author

I tried testing locally with the following, and I couldn't reproduce it locally. Maybe it might be because GitHub Actions is pretty slow.

for i in {1..50}; do
  echo "$i";
  ctest --preset linux-with-example-middlewares --output-on-failure;
done

@aloisklink aloisklink merged commit 03d6281 into main Sep 5, 2022
@aloisklink aloisklink deleted the ci/fix-intermittent-disk-io-error branch September 5, 2022 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intermittent failing CI due to Failed to execute statement: disk I/O error
2 participants