SciLab 5.1 crashes when using kron()

Bug #347730 reported by Emmanuel Ch.
2
Affects Status Importance Assigned to Milestone
Scilab
Fix Released
Low
scilab (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

SciLab 5 (Mar 6 2009 - In Jaunty 9.04 Alpha6) crashes after
trying to get the kronecker product of two large vectors with kron().

Output:

#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0xb7ca3896, pid=3971, tid=3023873744
#
# Java VM: OpenJDK Server VM (14.0-b08 mixed mode linux-x86 )
# Distribution: Ubuntu jaunty (development branch), package 6b14-1.4.1-0ubuntu4
# Problematic frame:
# C [libc.so.6+0x79896] memcpy+0x46
#
# An error report file with more information is saved as:
# /home/mmxgn/hs_err_pid3971.log
#
# If you would like to submit a bug report, please include
# instructions how to reproduce the bug and visit:
# https://bugs.launchpad.net/ubuntu/+source/openjdk-6/
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted (core dumped)

way to reproduce the bug in a 2GB c2d linux laptop (sony vaio fe31h) with lots of free space:

1 - start scilab
2 - In the scilab console, type:

--> a = 1:1:10000;
--> b = a';
--> kron(a,b);

** CRASHED ** with the output pasted above.

cat /proc/meminfo output (don't know if it's useful tho):

mmxgn@mmxgn-laptop:~$ cat /proc/meminfo
MemTotal: 2060508 kB
MemFree: 1453304 kB
Buffers: 23432 kB
Cached: 317960 kB
SwapCached: 0 kB
Active: 381488 kB
Inactive: 167692 kB
Active(anon): 213812 kB
Inactive(anon): 0 kB
Active(file): 167676 kB
Inactive(file): 167692 kB
Unevictable: 16 kB
Mlocked: 16 kB
HighTotal: 1190472 kB
HighFree: 647776 kB
LowTotal: 870036 kB
LowFree: 805528 kB
SwapTotal: 6032368 kB
SwapFree: 6032368 kB
Dirty: 108 kB
Writeback: 0 kB
AnonPages: 207804 kB
Mapped: 72844 kB
Slab: 21624 kB
SReclaimable: 11528 kB
SUnreclaim: 10096 kB
PageTables: 2616 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 7062620 kB
Committed_AS: 709388 kB
VmallocTotal: 122880 kB
VmallocUsed: 52536 kB
VmallocChunk: 67052 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 4096 kB
DirectMap4k: 40952 kB
DirectMap4M: 864256 kB

Revision history for this message
Matthias Klose (doko) wrote :

confirmed with karmic/i386

Changed in openjdk-6 (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Matthias Klose (doko) wrote :

and lucid

affects: openjdk-6 (Ubuntu) → scilab (Ubuntu)
Revision history for this message
In , Sylvestre-ledru (sylvestre-ledru) wrote :

a = 1:1:10000;
b = a';
kron(a,b);

=> seg fault

#0 0x00007fffeece1407 in dcopy_ () from /usr/lib/libblas.so.3gf
#1 0x00007ffff53db070 in kronr (a=..., ia=1, ma=1, na=<optimized out>, b=...,
    ib=10000, mb=10000, nb=1, pk=..., ik=10000) at src/fortran/kronr.f:43
#2 0x00007ffff539140e in intkron (id=<optimized out>)
    at sci_gateway/fortran/sci_f_kron.f:163
#3 0x00007ffff5381810 in sci_kron (fname=<optimized out>,
    fname_len=<optimized out>) at sci_gateway/c/sci_kron.c:20
#4 0x00007ffff5381735 in gw_elementary_functions ()
    at sci_gateway/c/gw_elementary_functions.c:76
#5 0x00007ffff7a8cf94 in callinterf_ (k=0x7ffff7d1ffbc)
    at src/c/callinterf.c:142
#6 0x00007ffff7a9943c in scirun_ (startupCode=<optimized out>,
    startupCode_len=<optimized out>) at src/c/scirun.c:127
#7 0x00007ffff7a8783d in realmain (no_startup_flag_l=<optimized out>,
    initial_script=0x0, initial_script_type=SCILAB_SCRIPT, memory=8000000)
    at src/c/realmain.c:154
#8 0x00000000004020cd in main (argc=2, argv=0x7fffffffe1f8)
    at ./modules/console/src/c/others/mainscic.c:175

reported initially here:
https://bugs.launchpad.net/ubuntu/+source/scilab/+bug/347730

Revision history for this message
In , Allan CORNET (allan-cornet) wrote :

already in 4.1.2

Revision history for this message
In , Calixte-denizet (calixte-denizet) wrote :

In this case kron(a,b) is a matrix 10000x10000 !! a test should be added to see if there is enough free space before to make the computation.

Changed in scilab:
importance: Unknown → Low
status: Unknown → Confirmed
Revision history for this message
In , Charlotte-hecquet (charlotte-hecquet) wrote :
Revision history for this message
In , Vincent-couvert-q (vincent-couvert-q) wrote :
Changed in scilab:
status: Confirmed → Fix Released
Revision history for this message
In , François Granade (francois-granade) wrote :

(originally entered in version "5.3.3 final version")

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.