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

P/35230/refactor function field #9

Closed
wants to merge 19 commits into from

Conversation

kwankyu
Copy link
Owner

@kwankyu kwankyu commented Mar 18, 2023

📚 Description

📝 Checklist

  • I have made sure that the title is self-explanatory and the description concisely explains the PR.
  • I have linked an issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@codecov
Copy link

codecov bot commented Mar 18, 2023

Codecov Report

Merging #9 (add19b2) into develop (293dd72) will decrease coverage by 0.15%.
The diff coverage is 91.65%.

@@             Coverage Diff             @@
##           develop       #9      +/-   ##
===========================================
- Coverage    88.58%   88.44%   -0.15%     
===========================================
  Files         2140     2160      +20     
  Lines       396961   398723    +1762     
===========================================
+ Hits        351663   352649     +986     
- Misses       45298    46074     +776     
Impacted Files Coverage Δ
src/sage/algebras/free_algebra_element.py 82.50% <ø> (ø)
src/sage/algebras/free_algebra_quotient.py 98.63% <ø> (ø)
src/sage/algebras/fusion_rings/fusion_ring.py 93.93% <ø> (ø)
src/sage/algebras/iwahori_hecke_algebra.py 82.69% <ø> (ø)
src/sage/algebras/lie_algebras/free_lie_algebra.py 95.43% <ø> (ø)
src/sage/algebras/lie_algebras/lie_algebra.py 91.10% <ø> (ø)
src/sage/algebras/lie_algebras/morphism.py 90.07% <ø> (ø)
src/sage/algebras/quatalg/quaternion_algebra.py 92.68% <ø> (ø)
src/sage/categories/cartesian_product.py 97.77% <ø> (ø)
src/sage/categories/category.py 98.01% <ø> (ø)
... and 113 more

... and 120 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@kwankyu kwankyu closed this Mar 19, 2023
kwankyu pushed a commit that referenced this pull request Mar 27, 2023
    
### 📚 Description

Trac branch `u/gh-collares/gap-gc` from sagemath#34701, now migrated to GitHub.
Currently based atop sagemath#35093; will rebase once that is merged.

The rest of the description below is copied from sagemath#34701:

A refactor in sagemath#27946 introduced "unprotected" (not surrounded by
`GAP_Enter`/`GAP_Leave`) `GAP_ValueGlobalVariable` calls. I believe this
might be a GC hazard, because after updating to GAP 4.12.1 I started
seeing aarch64 crashes on NixOS infrastructure such as:

```
#0  0x0000fffff79740e8 in wait4 ()
#1  0x0000fffff5dc6b78 in print_enhanced_backtrace ()
#2  0x0000fffff5dc8190 in sigdie ()
#3  0x0000fffff5dcb1c0 in cysigs_signal_handler ()
#4  0x0000fffff7ffb7cc in __kernel_rt_sigreturn ()
#5  0x0000ffff99a0bf28 in ConvString ()
#6  0x0000000000000000 in ?? ()
#7  0x0000000000000000 in ?? ()
#8  0x0000000000000000 in ?? ()
#9  0x0000ffff99989930 in Pr ()
#10 0x0000ffff9998aa18 in CloseOutput ()
#11 0x0000ffff99884828 in capture_stdout () at /build/sage-
src-9.7/pkgs/sagemath-standard/sage/libs/gap/element.pyx:154
...
```
I also see cases where `capture_stdout` throws errors such as
`sage.libs.gap.util.GAPError: Error, Length: <list> must be a list (not
the integer 255)` and then crashes. Both types of errors are fixed by
this ticket.

Note that I am nesting `GAP_Enter`/`GAP_Leave` calls because I didn't
remove the preexisting calls inside `capture_stdout`. That's because I
feared removing the innermost calls might create a new footgun (and I
believe nested `GAP_Enter`/`GAP_Leave` calls are explicitly supported),
but removing them should cause no problem. Removing them might even be
preferable for performance reasons, I don't know.

Fixes sagemath#34701

### 📝 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! -->

- [x] I have made sure that the title is self-explanatory and the
description concisely explains the PR.
- [x] I have linked an issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies
<!-- List all open pull requests that this PR logically depends on -->
<!--
- #xyz: short description why this is a dependency
- #abc: ...
-->
- sagemath#35093: GAP 4.12.2 upgrade, which touches the same function and should
land first.
    
URL: sagemath#35114
Reported by: Mauricio Collares
Reviewer(s): Dima Pasechnik
kwankyu pushed a commit that referenced this pull request Jun 2, 2023
@kwankyu kwankyu deleted the p/35230/refactor_function_field branch September 11, 2023 03:13
kwankyu pushed a commit that referenced this pull request Oct 9, 2023
@kwankyu kwankyu added bug Something isn't working and removed bug Something isn't working labels Feb 26, 2024
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.

2 participants