After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 625544 - munit() with large n parameter leads to sigkill/oom
munit() with large n parameter leads to sigkill/oom
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Analytics
git master
Other Linux
: Normal critical
: ---
Assigned To: Morten Welinder
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2010-07-29 04:36 UTC by sum1
Modified: 2013-01-15 20:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description sum1 2010-07-29 04:36:25 UTC
Steps to reproduce:
- Enter '=munit(10000)' into a cell (without quotes)

After consuming a lot of memory, Gnumeric will be killed by the system.  OpenOffice.org apparently caps the n parameter based on the number of columns in a sheet (http://www.openoffice.org/issues/show_bug.cgi?id=72898), but I'm not sure if that approach would work for Gnumeric.
Comment 1 Andreas J. Guelzow 2010-07-29 04:57:31 UTC
I think you should file this against your computer. If you are asking for a ridiculously large matrix you should make sure that you have a good enough computer.

Note that capping on the number of columns in a sheet does not make sense for expressions such as =sum(munit(10000)) since that needs only one cell.
Comment 2 Andreas J. Guelzow 2010-07-29 05:01:17 UTC

*** This bug has been marked as a duplicate of bug 67569 ***
Comment 3 Morten Welinder 2010-07-29 11:58:56 UTC
I'm fairly certain we don't want to go beyond sqrt(G_MAXINT).
Comment 4 Morten Welinder 2010-07-29 16:36:36 UTC
I have implemented a limit of sqrt(G_MAXINT).  That's about 46340 on 32-bit.
My machine stille gets upset between ~7k and that limit.
Comment 5 Morten Welinder 2013-01-15 01:15:25 UTC
I have limited MUNIT to what would fit on a sheet.  As comment 1 points
out, one could think of uses beyond that, but I really don't see why we
should risk thrashing the system over this.
Comment 6 Andreas J. Guelzow 2013-01-15 01:47:13 UTC
I really, really don't like this! 

Why should I be prohibited to calculate =sum(munit(200))? Since I use Gnumeric for calculations, my sheets are frequently only 128 by 128.
Comment 7 Morten Welinder 2013-01-15 20:21:11 UTC
Ok, the limit is now 1000.  I don't really care what the limit is, just that
a typo won't bring down Gnumeric.