Opened 9 years ago
Closed 9 years ago
#5929 closed enhancement (fixed)
[with patch, positive review] Fix CTRL-C assumption problem with clisp
Reported by: | was | Owned by: | tornaria |
---|---|---|---|
Priority: | blocker | Milestone: | sage-4.0 |
Component: | porting | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | Work issues: | ||
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
Currently when encountering assumptions in Maxima we send two CTRL-C and then rerun the computation with assumptions set. This is slow, not particularly robust, i.e. it regularly fails on 64 bit OSX, Solaris and so on. The two patches by Gonzalo do fix the problem.
Note that this came up during the debugging of the ecl->clisp switch, but all that has been moved to #6024.
Cheers,
Michael
Attachments (2)
Change History (8)
Changed 9 years ago by
comment:1 Changed 9 years ago by
Comment for attachment:trac_5929-fix_assumption_hang.patch:
For #5929: fix hang in maxima/ecl due to assumption questions
When maxima asks a question, current code sends CTRL-C twice to break, then raises an exception. This used to work with clisp, but for ecl it actually hangs. A test case is given by
var("Ax,Bx,By") t = -Ax*sin(sqrt(Ax^2)/2)/(sqrt(Ax^2)*sqrt(By^2 + Bx^2)) limit(t, Ax=0)
It turns out that it is possible to "break" from the question by just sending ";" by itself to maxima. The current patch changes to this method of escaping. It works with clisp or ecl.
comment:2 Changed 9 years ago by
Comment for attachment:trac_5929-fix_outofsync_hang.patch:
For #5929: fix timeout in maxima/ecl due to out-of-synch condition
This is triggered by the following doctest
sage: maxima._sendstr('1/1'*500) sage: maxima('2+2')
In fact, the first line is missing a semicolon, so maxima is stuck out of synch; the synchronization code is run for the second line, and after a timeout, it tries to break by sending a ctrl-c (this happens in Expect._interrupt()), but ctrl-c is broken with ecl, so this hangs.
The current fix adds an explicit semicolon to the synchronization code. This fixes the timeout in the above doctest. The hang is still latent, because there seems to be no way to interrupt maxima/ecl.
comment:3 Changed 9 years ago by
- Status changed from new to assigned
- Summary changed from switch from clisp to ecl to [with patch, needs review] Fix clisp->ecl related doctest issues
I am splitting this off the ecl and maxima spkgs.
Cheers,
Michael
comment:4 Changed 9 years ago by
- Owner changed from mabshoff to tornaria
- Status changed from assigned to new
- Summary changed from [with patch, needs review] Fix clisp->ecl related doctest issues to [with patch, positive review] Fix CTRL-C assumption problem with clisp
Ok, I am removing the ecl doctest fix since the two patches posted by Gonzalo fix this problem, too. So to keep credit and review simple I am giving this a positive review.
Cheers,
Michael
comment:5 Changed 9 years ago by
- Description modified (diff)
comment:6 Changed 9 years ago by
- Resolution set to fixed
- Status changed from new to closed
Merged both patches in Sage 4.0.alpha0.
Cheers,
Michael
fix for assumption hang with ecl