#14625: lrcalc calls exit()
-------------------------------------------------+-------------------------
       Reporter:  thansen                        |        Owner:  jdemeyer
           Type:  defect                         |       Status:  new
       Priority:  major                          |    Milestone:  sage-5.13
      Component:  packages: standard             |   Resolution:
       Keywords:  spkg, library, lrcalc          |    Merged in:
        Authors:                                 |    Reviewers:
Report Upstream:  Reported upstream. Developers  |  Work issues:
  acknowledge bug.                               |       Commit:
         Branch:                                 |     Stopgaps:
   Dependencies:                                 |
-------------------------------------------------+-------------------------

Comment (by aschilling):

 Replying to [comment:10 jdemeyer]:
 > Let me elaborate: I would not set a hard limit on the memory used by
 lrcalc, simply because no other part of Sage does so. Moreover, if you do
 want a hard limit, there needs to be a discussion on what the default
 limit should be...

 Further reply from Anders Buch:

 "Hello,

 The situation is that sage can call lrcalc, which can in turn consume a
 lot of memory if the input partitions are too large.  If this happens
 under any os, then the whole sage process (and possibly the system too)
 will be brought to its knees, and in some cases killed by the os.

 If lrcalc is free to call malloc as much as it wants, then this is the
 scenario that results when the input is too large.  Personally I am fine
 with using programs that work like this, but it may not meet the needs
 of all users.  However, since version 1.1.6 of the lrcalc library only
 calls exit() in an out-of-memory situation, I think it is silly to worry
 about that use of exit() if nothing else is done to avoid situations
 where sage crashes because lrcalc eats all the memory.  It doesn't
 matter who kills the process, and if it is to be killed, then the
 user/system will suffer the least if it happens quickly!

 I should also add that the partial fix to the lrcalc library that I have
 made includes keeping all memory allocated by lrcalc in a doubly linked
 list, so that everything can be freed up gracefully in case lrcalc has
 to stop a computation and return an error code.  This means that the
 error-handling code will make lrcalc use more memory and run slightly
 slower.

 Anders"

--
Ticket URL: <http://trac.sagemath.org/ticket/14625#comment:11>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to