Opened 10 years ago
Closed 9 years ago
#9564 closed defect (duplicate)
libsingular exponentiation can not be interrupted
Reported by: | SimonKing | Owned by: | tba |
---|---|---|---|
Priority: | critical | Milestone: | sage-duplicate/invalid/wontfix |
Component: | c_lib | Keywords: | KeyboardInterrupt interrupt singular exception cython |
Cc: | Merged in: | ||
Authors: | Reviewers: | Nathann Cohen | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
When trying to get some timings for #7795, I did
sage: R.<x,y,z> = QQ[] sage: p = R.random_element() sage: p -x^2 + 1/3*x*y + 7/2*y + 2*z sage: timeit('q=p^(2^10)')
which might be stupid.
Anyway, it was impossible to interrupt the computation with ctrl-C, which I think is a bug.
Change History (7)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
- Component changed from commutative algebra to c_lib
- Owner changed from malb to tba
- Priority changed from major to critical
comment:3 Changed 10 years ago by
- Keywords interrupt singular exception cython added; libsingular exponentiation removed
The problem is the following:
When an interrupt is caught, the program acts as if _sig_on
returns the value 0. So, when using _sig_on
, functions should be declared except 0
and not except -1
, which is what the Singular functions do.
The attached patch is purely proof-of-concept showing some improvement (but it doesn't fully fix the problem).
comment:4 Changed 10 years ago by
Note also that what I just said is completely undocumented :-)
comment:5 Changed 9 years ago by
- Milestone changed from sage-4.6.2 to sage-duplicate/invalid/wontfix
- Status changed from new to needs_review
Fixed by #9678.
comment:6 Changed 9 years ago by
Isn't "closed" more fitting that "need_review" in that case ? :-)
Nathann
comment:7 Changed 9 years ago by
- Resolution set to duplicate
- Reviewers set to Nathann Cohen
- Status changed from needs_review to closed
After applying #10018, the interrupt gives a segmentation fault instead of not doing anything at all.