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

Implement # sage.doctest: flaky marker #39539

Draft
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

user202729
Copy link
Contributor

@user202729 user202729 commented Feb 17, 2025

The intention is to avoid the annoying failing doctests.

Background on timed out tests

Basically one of the problems with occasional timeout is the following: Sometimes malloc need to hold a lock while doing something. If a signal comes while it is holding the lock, the next time malloc is called it will try to acquire the lock again and deadlock there.

A workaround is to unlock the malloc lock inside the signal handler — but how do you know which lock it is?

I can't reproduce this on my machine (in fact on my machine setting a gdb breakpoint in __lll_lock_wait_private doesn't even hit it during the computation), so I can't figure out a way to fix it.

Workaround

Files starting with # sage.doctest: flaky will be ran once more time if they timeout. Same for segmentation fault. E.g. plural.pyx#39098

📝 Checklist

  • The title is concise and informative.
  • 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 and checked the documentation preview.

⌛ Dependencies

Copy link

github-actions bot commented Feb 17, 2025

Documentation preview for this PR (built with commit f8580bb; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@@ -1,3 +1,4 @@
# sage.doctest: flaky
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the log it looks like this was correctly retried once. But it still timeout…? (what's the probability this fails twice?)

@user202729 user202729 mentioned this pull request Feb 23, 2025
5 tasks
@user202729 user202729 marked this pull request as draft March 18, 2025 05:58
@user202729 user202729 assigned user202729 and unassigned user202729 Mar 18, 2025
vbraun pushed a commit to vbraun/sage that referenced this pull request Mar 19, 2025
sagemathgh-39664: Add some 'not tested' marks to avoid CI failure
    
As in the title. I don't think there's any advantage in running the test
again.

There's only a very small risk of the fixer forget to delete the marker,
but it seems like a nonexistent issue (whichever pull request that fix
it should also remove the `# not tested`)

At least for those that doesn't segmentation fault or hang. (For those
who do the only solution I can think of is
sagemath#39539 )

Side note: not sure what's a good solution to this. Maybe we can do
sagemath#39470 instead? (but then it
doesn't apply to meson…)

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

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

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39664
Reported by: user202729
Reviewer(s):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant