Ask Your Question

sagemath crash!

asked 2013-08-28 10:11:30 -0500

mresimulator gravatar image

updated 2015-01-14 03:01:14 -0500

FrédéricC gravatar image

Hi experts.

I use sagemath 4 months ago. Now, when i louch any .sage file this appears:

/usr ...
edit retag flag offensive close merge delete


Which version of sage are you running? Not the best advice, but have you tried reinstalling sage? Also, could you provide more details, such as a small `.sage` file which produces this? It seems like there is some gdb output, are you running sage under gdb?

fidbc gravatar imagefidbc ( 2013-08-28 11:38:02 -0500 )edit

Im using sage 5.11. I tryed reinstall this but doesnt work. Im using sage like always do: Open terminal in ubuntu --> sage. Before, with version 5.10 there wasnt problem. Please help! Tks

mresimulator gravatar imagemresimulator ( 2013-08-28 15:01:19 -0500 )edit

Any small `.sage` file which causes sage to crash?

fidbc gravatar imagefidbc ( 2013-08-28 15:39:50 -0500 )edit

Hi! Comparing two similar .sage codes i note that the porblem maybe is in the 'grah' module like this: import numpy as np number_sticks=np.array([200]) b=50. h=b N=5 u=1 number_experiments=1 stick_density =number_sticks/(b**2) array_x1=np.array([1,2,3,4,5]) array_y1=np.array([1,2,3,4,5]) array_x2= np.array([2,3,4,7,29]) array_y2= np.array([2,3,4,7,29]) lineas=[] for j in xrange(N): lineas.append(line([(array_x1[j],array_y1[j]),(array_x2[j],array_y2[j])],rgbcolor=(0,0,1), thickness=3)) grafico=sum(lineas) grafico.axes_range=[-0.5*1.3*b,0.5*1.3*b,-0.5*1.3*h,0.5*1.3*h] #xmin, xmax, ymin, ymax save(grafico,'/home/joseluismietta/Escritorio/grafico_numero {0}{1}.png'.format(int(N),int(u)), figsize=[b,h], axes=False, dpi=600)

mresimulator gravatar imagemresimulator ( 2013-08-29 12:04:49 -0500 )edit

can't find the problem, the code works for me (modulo some syntax errors removed) :s

fidbc gravatar imagefidbc ( 2013-08-29 15:32:41 -0500 )edit

2 answers

Sort by » oldest newest most voted

answered 2013-09-05 11:50:26 -0500

mresimulator gravatar image

Hi experts!

I remove .sage/ folder, then remove /usr/lib/sagemath and reinstall SAGE. The porblem is not fixed!!

The crash file shows:

NU gdb (GDB)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Para las instrucciones de informe de errores, vea:

Stack backtrace

Cython backtrace
Exception:  <class 'gdb.error'> No hay registros.

Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operación no permitida.
No stack.
Traceback (most recent call last):
  File "<string>", line 118, in <module>
  File "<string>", line 90, in invoke
  File "<string>", line 94, in newest_first_order
error: No hay registros.
aviso: Inferior ID 1 has no threads.
close failed in file object destructor:
IOError: [Errno 9] Descriptor de archivo erróneo

What can I do?

Please help

edit flag offensive delete link more


Is it possible you have downloaded a binary not for your *exact* setup? For instance, for a slightly different version of Linux?

kcrisman gravatar imagekcrisman ( 2013-09-05 15:00:28 -0500 )edit

HI! I installed it from repositories doing: apt-add-repository -y ppa:aims/sagemath apt-get update apt-get install sagemath-upstream-binary. So I think i've the right version. Anyway, the problem start when automatically the version upgrade to 5.11 (no porblem with v 5.10). I have Ubuntu 13.04 64 bits. I can try re-install SAGE from binary. What file of the list must I download and Install? Please help! Thanks!!

mresimulator gravatar imagemresimulator ( 2013-09-05 23:57:22 -0500 )edit

Unfortunately, I don't know anything about linux PPAs etc.

kcrisman gravatar imagekcrisman ( 2013-09-06 04:47:43 -0500 )edit

answered 2013-09-05 03:39:02 -0500

kcrisman gravatar image

updated 2013-09-05 06:43:56 -0500

Did you try removing your .sage/ directory? Especially your ./sage/init.sage file might be causing trouble if nonempty. (Of course, removing this would remove your notebook! But you could at least try renaming .sage/ to .sage-old/ temporarily; Sage would then create a new one and perhaps the problem would go away, and then you could do further debugging.)

edit flag offensive delete link more


Hi! I only use SAGE in my laptop. I dont use sage-notebook. In this case, please correct me if I'm wrong, I must do this: Remove ./sage/ directory. (where is it?) Remove /usr/lib/sagemath/ Remove .hgrc file (Where are these?) Reinstall sagemath. Is this ok? Thanks a lot

mresimulator gravatar imagemresimulator ( 2013-09-05 05:14:21 -0500 )edit

Do you know what a "home directory" is? It looks like yours might be `/home/joseluismietta`. Then you would remove the directory `.sage/` in that directory. I wouldn't worry about the `.hgrc` stuff but I was just trying to be complete (in that other post). You may not even have to reinstall Sage itself!

kcrisman gravatar imagekcrisman ( 2013-09-05 06:46:43 -0500 )edit

What obout remove /usr/lib/sagemath/ ? Thanks a lot

mresimulator gravatar imagemresimulator ( 2013-09-05 07:26:49 -0500 )edit

Well, I assume this is your actual Sage installation, so, yes. Sorry, I kind of figured that was obvious if you wanted to remove it. But I would try just moving the `.sage/` directory *first*; if that's all that's wrong, then you don't have to delete your Sage installation.

kcrisman gravatar imagekcrisman ( 2013-09-05 10:23:24 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-08-28 10:11:30 -0500

Seen: 354 times

Last updated: Sep 05 '13