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

booktest: add hangcheck timer to print current file+line, and later backtrace #4504

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

benlorenz
Copy link
Member

@benlorenz benlorenz commented Jan 27, 2025

To help with debugging #4493, cc @fingolfin:

When the same example file is running for 10 minutes it will try to print the current file+line, and then again every 5 min.
Once at > 20 min (i.e. 25 min) it will try to send a USR1 / INFO signal to the process (with a short delay) to get a backtrace of the currently running computation.
Edit: added a commit to reduce the timeouts for testing, will be removed later

All this will only work if the code has some yield points to allow the task to run, if this doesn't work we need to move this to a separate thread / process.

With the current timings, the hangcheck will probably trigger once on a successful run:

Test Summary:                                                 | Pass  Broken  Total      Time
OscarBookExamples                                             |  163      10    173  32m16.7s
  specialized/boehm-breuer-git-fans                           |   10             10     46.5s
  specialized/markwig-ristau-schleis-faithful-tropicalization |    4       1      5     11.1s
  specialized/holt-ren-tropical-geometry                      |   18             18     39.9s
  specialized/bies-turner-string-theory-applications          |    2              2     44.0s
  specialized/aga-boehm-hoffmann-markwig-traore               |    2              2      3.8s
  specialized/joswig-kastner-lorenz-confirmable-workflows     |    2       1      3      4.8s
  cornerstones/number-theory                                  |   12       1     13   3m36.6s
  cornerstones/groups                                         |    8              8   2m52.8s
  introduction/introduction                                   |    1       3      4      4.2s
  specialized/eder-mohr-ideal-theoretic                       |    8              8     50.7s
  specialized/kuehne-schroeter-matroids                       |    3              3     28.8s
  cornerstones/polyhedral-geometry                            |   21       1     22   1m00.8s
  specialized/fang-fourier-monomial-bases                     |    7       2      9     13.1s
  specialized/rose-sturmfels-telen-tropical-implicitization   |    8              8   3m05.5s
  specialized/brandhorst-zach-fibration-hopping               |    2              2  13m45.9s
  specialized/breuer-nebe-parker-orthogonal-discriminants     |    9       1     10      8.4s
  cornerstones/algebraic-geometry                             |   28             28   1m21.9s
  specialized/decker-schmitt-invariant-theory                 |    8              8   1m29.4s
  specialized/bies-kastner-toric-geometry                     |   10             10      8.2s

Edit2:
In the testrun (with shorter limits) a backtrace is printed here:
https://github.com/oscar-system/Oscar.jl/actions/runs/12986964827/job/36214891463?pr=4504#step:11:6489
And a hangcheck warning here:
https://github.com/oscar-system/Oscar.jl/actions/runs/12986964827/job/36214891463?pr=4504#step:11:752
I am slightly confused about the timing of the backtrace, I think it should have been printed directly after the +3min hangcheck and not shortly before the +4min, but I don't think that this is important.

Copy link

codecov bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.55%. Comparing base (a5038e9) to head (bf311d3).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4504      +/-   ##
==========================================
- Coverage   84.55%   84.55%   -0.01%     
==========================================
  Files         672      672              
  Lines       88831    88833       +2     
==========================================
  Hits        75109    75109              
- Misses      13722    13724       +2     

see 2 files with indirect coverage changes

@benlorenz benlorenz marked this pull request as ready for review January 27, 2025 11:53
@benlorenz benlorenz marked this pull request as draft January 27, 2025 12:36
@lgoettgens lgoettgens added the CI label Jan 27, 2025
@benlorenz
Copy link
Member Author

Needs further work since the hangcheck doesn't trigger in the code where it was supposed to help.

to be continued...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants