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

remove quit_sage() command from all.py top level #8784

Closed
williamstein opened this issue Apr 27, 2010 · 18 comments
Closed

remove quit_sage() command from all.py top level #8784

williamstein opened this issue Apr 27, 2010 · 18 comments
Assignees
Milestone

Comments

@williamstein
Copy link
Contributor

It is stupid that it is this easy to accidentally destabilize and segfault Sage. Also, having a function "quit_sage()" available at the sage: prompt by default that does not quit sage, is dumb.

wstein@boxen:~/build/sage-4.4$ ./sage
----------------------------------------------------------------------
| Sage Version 4.4, Release Date: 2010-04-24                         |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: quit_sage()
Exiting Sage (CPU time 0m0.04s, Wall time 0m3.16s).
sage: quit
Exiting Sage (CPU time 0m0.07s, Wall time 0m4.80s).
/virtual/scratch/wstein/build/sage-4.4/local/bin/sage-sage: line 206: 11559 Segmentation fault      sage-ipython "$@" -i
wstein@boxen:~/build/sage-4.4$            

The fix is to rename quit_sage() somehow and change all code that calls it.

Component: misc

Author: Michael Orlitzky

Branch: ef89f43

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/8784

@jasongrout
Copy link
Member

comment:1

Maybe rename it to "sage_library_cleanup"?

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@orlitzky
Copy link
Contributor

Branch: u/mjo/ticket/8784

@orlitzky
Copy link
Contributor

comment:6

Now all of the cleanup happens automatically and quit_sage() is a no-op:

sage: quit_sage()
<ipython-input-1-ce1781e96a1f>:1: DeprecationWarning: quit_sage is deprecated and now does nothing; please simply delete it
See http://trac.sagemath.org/8784 for details.
  quit_sage()
sage:

New commits:

94dcf5cTrac #8784: clean up after symmetrica when sage exits.
7890d1bTrac #8784: clean up after m4ri when sage exits.
0cd365dTrac #8784: free the flint stack when sage terminates.
ebeb316Trac #8784: free the integer pool when sage exits.
b7ae30fTrac #8784: clear quaternion algebra globals when sage exits.
15182f2Trac #8784: cdef two internal quaternion functions.
eaf3978Trac #8784: quit pexpect processes when sage terminates.
b2d1032Trac #8784: deprecate quit_sage().

@orlitzky
Copy link
Contributor

Commit: b2d1032

@orlitzky
Copy link
Contributor

Author: Michael Orlitzky

@mkoeppe mkoeppe modified the milestones: sage-6.4, sage-9.6 Jan 25, 2022
@dimpase
Copy link
Member

dimpase commented Jan 31, 2022

comment:8

Does this mean that sage-cleaner may go, too?

@orlitzky
Copy link
Contributor

comment:9

Replying to @dimpase:

Does this mean that sage-cleaner may go, too?

Not yet, although that's another long-term goal of mine. sage-cleaner also cleans up "temporary" files, which it wouldn't have to do if we used the OS's built-in tempfile functions instead of our home-grown SAGE_TMP. The first and easiest part of that cleanup is #33213.

@orlitzky
Copy link
Contributor

comment:10

Replying to @dimpase:

Does this mean that sage-cleaner may go, too?

Ok, I actually did this in #33213, which now depends on this ticket.

@dimpase
Copy link
Member

dimpase commented Mar 11, 2022

comment:11

OK, looks and tests good.

@dimpase
Copy link
Member

dimpase commented Mar 11, 2022

Reviewer: Dima Pasechnik

@dimpase
Copy link
Member

dimpase commented Mar 11, 2022

comment:12

perhaps you want to rebase on the latest beta

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 11, 2022

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. This was a forced push. New commits:

7abf04dTrac #8784: clean up after symmetrica when sage exits.
3424071Trac #8784: clean up after m4ri when sage exits.
a053757Trac #8784: free the flint stack when sage terminates.
4f5a56dTrac #8784: free the integer pool when sage exits.
1bf07ffTrac #8784: clear quaternion algebra globals when sage exits.
1f86192Trac #8784: cdef two internal quaternion functions.
75e7ccbTrac #8784: quit pexpect processes when sage terminates.
ef89f43Trac #8784: deprecate quit_sage().

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 11, 2022

Changed commit from b2d1032 to ef89f43

@dimpase
Copy link
Member

dimpase commented Mar 29, 2022

comment:14

oops, overlooked this, sorry. Looks good.

@vbraun
Copy link
Member

vbraun commented Apr 2, 2022

Changed branch from u/mjo/ticket/8784 to ef89f43

@mkoeppe
Copy link
Contributor

mkoeppe commented Apr 17, 2022

Changed commit from ef89f43 to none

@mkoeppe
Copy link
Contributor

mkoeppe commented Apr 17, 2022

comment:16

Follow up in #33706.

@dimpase
Copy link
Member

dimpase commented Jul 17, 2022

comment:17

We have a complaint about ipython processes staying alive in a patchbot.
https://groups.google.com/d/msgid/sage-devel/20220717160807.GA13671%40metelu.net

Could it be due to this ticket, perhaps the change for src/sage/repl/ipython_extension.py
was an overkill?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants