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

Doctest failures with alarm on OS X #36944

Closed
2 tasks done
jhpalmieri opened this issue Dec 21, 2023 · 7 comments · Fixed by #36948
Closed
2 tasks done

Doctest failures with alarm on OS X #36944

jhpalmieri opened this issue Dec 21, 2023 · 7 comments · Fixed by #36948

Comments

@jhpalmieri
Copy link
Member

jhpalmieri commented Dec 21, 2023

Steps To Reproduce

With OS X 13.6.3 (Intel) and OS X 14.2 (Apple M2), Sage 10.3.beta2 and later, make ptest and make ptestlong produce failures that were not present with 10.3.beta1.

Expected Behavior

Tests which used to pass should pass.

Actual Behavior

As noted, tests do not pass. The end of make ptestlong reports:

sage -t --random-seed=226393960629615338750434927109379046589 src/sage/libs/flint/nmod_poly_linkage.pxi  # Killed due to alarm
sage -t --random-seed=226393960629615338750434927109379046589 src/sage/libs/gap/element.pyx  # Killed due to alarm
sage -t --random-seed=226393960629615338750434927109379046589 src/sage/interfaces/gap.py  # Killed due to alarm
sage -t --random-seed=226393960629615338750434927109379046589 src/sage/geometry/integral_points.pxi  # Killed due to alarm
sage -t --random-seed=226393960629615338750434927109379046589 src/sage/libs/libecm.pyx  # Killed due to alarm
sage -t --random-seed=226393960629615338750434927109379046589 src/sage/coding/linear_code.py  # Killed due to alarm
sage -t --random-seed=226393960629615338750434927109379046589 src/sage/rings/factorint_pari.pyx  # Killed due to alarm
sage -t --random-seed=226393960629615338750434927109379046589 src/sage/rings/complex_arb.pyx  # Killed due to alarm
sage -t --random-seed=226393960629615338750434927109379046589 src/sage/rings/integer.pyx  # Killed due to alarm
sage -t --random-seed=226393960629615338750434927109379046589 src/sage/rings/polynomial/polynomial_zmod_flint.pyx  # Killed due to alarm
sage -t --random-seed=226393960629615338750434927109379046589 src/sage/rings/polynomial/polynomial_element.pyx  # Killed due to alarm
sage -t --random-seed=226393960629615338750434927109379046589 src/sage/parallel/decorate.py  # Killed due to alarm
sage -t --random-seed=226393960629615338750434927109379046589 src/sage/sets/recursively_enumerated_set.pyx  # Killed due to alarm
sage -t --random-seed=226393960629615338750434927109379046589 src/sage/structure/coerce_actions.pyx  # Killed due to alarm
sage -t --random-seed=226393960629615338750434927109379046589 src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx  # Killed due to alarm
sage -t --random-seed=226393960629615338750434927109379046589 src/sage/libs/giac/__init__.py  # Timed out
sage -t --random-seed=226393960629615338750434927109379046589 src/sage/doctest/forker.py  # 5 doctests failed
sage -t --random-seed=226393960629615338750434927109379046589 src/sage/tests/books/computational-mathematics-with-sagemath/mpoly_doctest.py  # 1 doctest failed
sage -t --random-seed=226393960629615338750434927109379046589 src/sage/doctest/control.py  # 8 doctests failed

The first failure, for example:

sage -t --long --random-seed=16301058625430036409274889310772014116 src/sage/libs/flint/nmod_poly_linkage.pxi
    Killed due to alarm
**********************************************************************
Tests run before process (pid=50812) failed:
sage: P.<x> = GF(32003)[] ## line 40 ##
sage: Q.<x> = GF(7)[] ## line 42 ##
sage: sig_on_count() # check sig_on/off pairings (virtual doctest) ## line 43 ##
0
sage: P.<x> = GF(32003)[] ## line 50 ##
sage: del x ## line 51 ##
sage: Q.<x> = GF(7)[] ## line 53 ##
sage: del x ## line 54 ##


  [snip]


sage: f^2 % g ## line 521 ##
15328*x + 6968
sage: pow(f, -2, g) ## line 524 ##
16346/(x + 251)
sage: (f^2 % g)^-1 ## line 526 ##
16346/(x + 251)
sage: pow(f, 5, g) ## line 529 ##
7231*x + 17274
sage: f^5 % g ## line 531 ##
7231*x + 17274
sage: n = 2^23 ## line 536 ##
sage: alarm(0.2); x^n; cancel_alarm() ## line 537 ##

Additional Information

Environment

- **OS**: OS X 13.6.3 and OS X 14.2, latest Xcode command-line tools
- **Sage Version**: 10.3.beta2
- as many homebrew packages installed as Sage requests

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide
@mkoeppe
Copy link
Member

mkoeppe commented Dec 21, 2023

Thanks for opening this.
I can confirm that this was introduced in 10.3.beta2:

@mkoeppe
Copy link
Member

mkoeppe commented Dec 22, 2023

The tokenpool code does play with SIGALRM. https://github.com/milahu/gnumake-tokenpool/blob/main/py/src/gnumake_tokenpool/tokenpool.py#L178
I'll try to prepare a fix

@mkoeppe
Copy link
Member

mkoeppe commented Dec 22, 2023

#36948 has a tentative solution. I haven't been able to reproduce the failure yet locally, so if you have a chance, please try

@mkoeppe
Copy link
Member

mkoeppe commented Dec 22, 2023

No, it doesn't fix it.

@jhpalmieri
Copy link
Member Author

No, it doesn't fix it.

Confirmed, doesn't fix it for me either.

@mkoeppe
Copy link
Member

mkoeppe commented Dec 22, 2023

Looks like I may have a solution that uses cysignals in combination with tokenpool.

@mkoeppe
Copy link
Member

mkoeppe commented Dec 22, 2023

OK, the new version of #36948 does the trick according to my local tests

vbraun pushed a commit to vbraun/sage that referenced this issue Dec 23, 2023
…mInterrupt` problems

<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->
The new release 0.0.4 provides cysignals integration:
- milahu/gnumake-tokenpool#4

Fixes sagemath#36944

To verify that the tokenpool mechanism is being used:
```
$ DEBUG_JOBCLIENT=1 make ptest
```

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

URL: sagemath#36948
Reported by: Matthias Köppe
Reviewer(s): John H. Palmieri
vbraun pushed a commit to vbraun/sage that referenced this issue Dec 24, 2023
…mInterrupt` problems

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->
The new release 0.0.4 provides cysignals integration:
- milahu/gnumake-tokenpool#4

Fixes sagemath#36944

To verify that the tokenpool mechanism is being used:
```
$ DEBUG_JOBCLIENT=1 make ptest
```

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36948
Reported by: Matthias Köppe
Reviewer(s): John H. Palmieri
vbraun pushed a commit to vbraun/sage that referenced this issue Dec 26, 2023
…mInterrupt` problems

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->
The new release 0.0.4 provides cysignals integration:
- milahu/gnumake-tokenpool#4

Fixes sagemath#36944

To verify that the tokenpool mechanism is being used:
```
$ DEBUG_JOBCLIENT=1 make ptest
```

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36948
Reported by: Matthias Köppe
Reviewer(s): John H. Palmieri
@mkoeppe mkoeppe added this to the sage-10.3 milestone Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants