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

Calculating eigenvectors of symbolic matrices leads to a crash. #23332

Closed
sagetrac-stassev mannequin opened this issue Jun 28, 2017 · 14 comments
Closed

Calculating eigenvectors of symbolic matrices leads to a crash. #23332

sagetrac-stassev mannequin opened this issue Jun 28, 2017 · 14 comments

Comments

@sagetrac-stassev
Copy link
Mannequin

sagetrac-stassev mannequin commented Jun 28, 2017

Below is my whole sage session with a simple example leading to the crash.

$ sage

┌───────────────────────────────────────────────────┐
│ SageMath version 7.6, Release Date: 2017-03-25    │
│ Type "notebook()" for the browser-based notebook interface.        
│
│ Type "help()" for help.     
└───────────────────────────────────────────────────┘

sage: x=var('x')
sage: matrix([ [ x,x*x ],[ 1,0 ] ]).eigenvectors_right()

------------------------------------------------------------------------
/usr/lib/python2.7/site-packages/cysignals/signals.so(+0x5187)[0x7ffa55ec9187]
/usr/lib/python2.7/site-packages/cysignals/signals.so(+0x5d05)[0x7ffa55ec9d05]
/usr/lib/python2.7/site-packages/cysignals/signals.so(+0x8278)[0x7ffa55ecc278]
/usr/lib/libpthread.so.0(+0x11940)[0x7ffa5eb58940]
/usr/lib/python2.7/site-packages/numpy/core/umath.so(+0x10cfab)[0x7ff811d5afab]
/usr/lib/libpython2.7.so.1.0(+0x481c4)[0x7ffa5edad1c4]
/usr/lib/libpython2.7.so.1.0(PyNumber_Multiply+0x29)[0x7ffa5edaf859]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x1377)[0x7ffa5ee4b0a7]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x8dc)[0x7ffa5ee538dc]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalCode+0x28)[0x7ffa5ee539e8]
/usr/lib/libpython2.7.so.1.0(PyImport_ExecCodeModuleEx+0xa7)[0x7ffa5ee63fc7]
/usr/lib/libpython2.7.so.1.0(+0xff25e)[0x7ffa5ee6425e]
/usr/lib/libpython2.7.so.1.0(+0xfff81)[0x7ffa5ee64f81]
/usr/lib/libpython2.7.so.1.0(+0x1004ec)[0x7ffa5ee654ec]
/usr/lib/libpython2.7.so.1.0(PyImport_ImportModuleLevel+0x2ae)[0x7ffa5ee65d8e]
/usr/lib/libpython2.7.so.1.0(+0xe2907)[0x7ffa5ee47907]
/usr/lib/libpython2.7.so.1.0(PyObject_Call+0x52)[0x7ffa5edb1682]
/usr/lib/libpython2.7.so.1.0(PyEval_CallObjectWithKeywords+0x56)[0x7ffa5ee49716]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x2822)[0x7ffa5ee4c552]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x8dc)[0x7ffa5ee538dc]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalCode+0x28)[0x7ffa5ee539e8]
/usr/lib/libpython2.7.so.1.0(PyImport_ExecCodeModuleEx+0xa7)[0x7ffa5ee63fc7]
/usr/lib/libpython2.7.so.1.0(+0xff25e)[0x7ffa5ee6425e]
/usr/lib/libpython2.7.so.1.0(+0x100811)[0x7ffa5ee65811]
/usr/lib/libpython2.7.so.1.0(+0xfff81)[0x7ffa5ee64f81]
/usr/lib/libpython2.7.so.1.0(+0x100209)[0x7ffa5ee65209]
/usr/lib/libpython2.7.so.1.0(PyImport_ImportModuleLevel+0x1c8)[0x7ffa5ee65ca8]
/usr/lib/libpython2.7.so.1.0(+0xe2907)[0x7ffa5ee47907]
/usr/lib/libpython2.7.so.1.0(PyObject_Call+0x52)[0x7ffa5edb1682]
/usr/lib/libpython2.7.so.1.0(PyEval_CallObjectWithKeywords+0x56)[0x7ffa5ee49716]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x2822)[0x7ffa5ee4c552]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x8dc)[0x7ffa5ee538dc]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalCode+0x28)[0x7ffa5ee539e8]
/usr/lib/libpython2.7.so.1.0(PyImport_ExecCodeModuleEx+0xa7)[0x7ffa5ee63fc7]
/usr/lib/libpython2.7.so.1.0(+0xff25e)[0x7ffa5ee6425e]
/usr/lib/libpython2.7.so.1.0(+0xfff81)[0x7ffa5ee64f81]
/usr/lib/libpython2.7.so.1.0(+0x100209)[0x7ffa5ee65209]
/usr/lib/libpython2.7.so.1.0(PyImport_ImportModuleLevel+0x183)[0x7ffa5ee65c63]
/usr/lib/libpython2.7.so.1.0(+0xe2907)[0x7ffa5ee47907]
/usr/lib/libpython2.7.so.1.0(PyObject_Call+0x52)[0x7ffa5edb1682]
/usr/lib/libpython2.7.so.1.0(PyEval_CallObjectWithKeywords+0x56)[0x7ffa5ee49716]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x2822)[0x7ffa5ee4c552]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x8dc)[0x7ffa5ee538dc]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalCode+0x28)[0x7ffa5ee539e8]
/usr/lib/libpython2.7.so.1.0(PyImport_ExecCodeModuleEx+0xa7)[0x7ffa5ee63fc7]
/usr/lib/libpython2.7.so.1.0(+0xff25e)[0x7ffa5ee6425e]
/usr/lib/libpython2.7.so.1.0(+0x100811)[0x7ffa5ee65811]
/usr/lib/libpython2.7.so.1.0(+0xfff81)[0x7ffa5ee64f81]
/usr/lib/libpython2.7.so.1.0(+0x100209)[0x7ffa5ee65209]
/usr/lib/libpython2.7.so.1.0(PyImport_ImportModuleLevel+0x1c8)[0x7ffa5ee65ca8]
/usr/lib/libpython2.7.so.1.0(+0xe2907)[0x7ffa5ee47907]
/usr/lib/libpython2.7.so.1.0(PyObject_Call+0x52)[0x7ffa5edb1682]
/usr/lib/libpython2.7.so.1.0(PyEval_CallObjectWithKeywords+0x56)[0x7ffa5ee49716]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x2822)[0x7ffa5ee4c552]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x8dc)[0x7ffa5ee538dc]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalCode+0x28)[0x7ffa5ee539e8]
/usr/lib/libpython2.7.so.1.0(PyImport_ExecCodeModuleEx+0xa7)[0x7ffa5ee63fc7]
/usr/lib/libpython2.7.so.1.0(+0xff25e)[0x7ffa5ee6425e]
/usr/lib/libpython2.7.so.1.0(+0xfff81)[0x7ffa5ee64f81]
/usr/lib/libpython2.7.so.1.0(+0x1004ec)[0x7ffa5ee654ec]
/usr/lib/libpython2.7.so.1.0(PyImport_ImportModuleLevel+0x2ae)[0x7ffa5ee65d8e]
/usr/lib/libpython2.7.so.1.0(+0xe2907)[0x7ffa5ee47907]
/usr/lib/libpython2.7.so.1.0(PyObject_Call+0x52)[0x7ffa5edb1682]
/usr/lib/libpython2.7.so.1.0(PyEval_CallObjectWithKeywords+0x56)[0x7ffa5ee49716]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x2822)[0x7ffa5ee4c552]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x8dc)[0x7ffa5ee538dc]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalCode+0x28)[0x7ffa5ee539e8]
/usr/lib/libpython2.7.so.1.0(PyImport_ExecCodeModuleEx+0xa7)[0x7ffa5ee63fc7]
/usr/lib/libpython2.7.so.1.0(+0xff25e)[0x7ffa5ee6425e]
/usr/lib/libpython2.7.so.1.0(+0x100811)[0x7ffa5ee65811]
/usr/lib/libpython2.7.so.1.0(+0xfff81)[0x7ffa5ee64f81]
/usr/lib/libpython2.7.so.1.0(+0x10029f)[0x7ffa5ee6529f]
/usr/lib/libpython2.7.so.1.0(PyImport_ImportModuleLevel+0x183)[0x7ffa5ee65c63]
/usr/lib/libpython2.7.so.1.0(+0xe2907)[0x7ffa5ee47907]
/usr/lib/libpython2.7.so.1.0(PyObject_Call+0x52)[0x7ffa5edb1682]
/usr/lib/libpython2.7.so.1.0(PyObject_CallFunctionObjArgs+0xce)[0x7ffa5edb1fae]
/usr/lib/python2.7/site-packages/sage/modules/free_module_element.so(+0x10bd2)[0x7ff841981bd2]
/usr/lib/python2.7/site-packages/sage/modules/free_module_element.so(+0x17614)[0x7ff841988614]
/usr/lib/python2.7/site-packages/sage/matrix/matrix_symbolic_dense.so(+0x6f35)[0x7ff819001f35]
/usr/lib/python2.7/site-packages/sage/matrix/matrix_symbolic_dense.so(+0x70b0)[0x7ff8190020b0]
/usr/lib/python2.7/site-packages/sage/matrix/matrix_symbolic_dense.so(+0x16665)[0x7ff819011665]
/usr/lib/python2.7/site-packages/sage/matrix/matrix_symbolic_dense.so(+0x9c4d)[0x7ff819004c4d]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x8858)[0x7ffa5ee52588]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x8dc)[0x7ffa5ee538dc]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalCode+0x28)[0x7ffa5ee539e8]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x7fb1)[0x7ffa5ee51ce1]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x8dc)[0x7ffa5ee538dc]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5fd2)[0x7ffa5ee4fd02]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x8dc)[0x7ffa5ee538dc]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5fd2)[0x7ffa5ee4fd02]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x8dc)[0x7ffa5ee538dc]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5fd2)[0x7ffa5ee4fd02]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x8dc)[0x7ffa5ee538dc]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5fd2)[0x7ffa5ee4fd02]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x8dc)[0x7ffa5ee538dc]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5fd2)[0x7ffa5ee4fd02]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x8dc)[0x7ffa5ee538dc]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5fd2)[0x7ffa5ee4fd02]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x8dc)[0x7ffa5ee538dc]
/usr/lib/libpython2.7.so.1.0(PyEval_EvalCode+0x28)[0x7ffa5ee539e8]
/usr/lib/libpython2.7.so.1.0(+0x108efe)[0x7ffa5ee6defe]
/usr/lib/libpython2.7.so.1.0(PyRun_FileExFlags+0x81)[0x7ffa5ee6f1c1]
/usr/lib/libpython2.7.so.1.0(PyRun_SimpleFileExFlags+0xf4)[0x7ffa5ee704e4]
/usr/lib/libpython2.7.so.1.0(Py_Main+0xce0)[0x7ffa5ee82ca0]
/usr/lib/libc.so.6(__libc_start_main+0xea)[0x7ffa5e7c243a]
python2(_start+0x2a)[0x5584c1f307ea]
------------------------------------------------------------------------
Attaching gdb to process id 28119.

Failed to run gdb.
Failed to run gdb.
Install gdb for enhanced tracebacks.
------------------------------------------------------------------------
Unhandled SIGFPE: An unhandled floating point exception occurred.
This probably occurred because a *compiled* module has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Python will now terminate.
------------------------------------------------------------------------

Upstream: Fixed upstream, in a later stable release.

Component: symbolics

Keywords: eigenvalues

Author: Dave Morris

Branch/Commit: f6500fb

Reviewer: Kwankyu Lee

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

@sagetrac-stassev sagetrac-stassev mannequin added this to the sage-8.0 milestone Jun 28, 2017
@mforets
Copy link
Mannequin

mforets mannequin commented Jun 28, 2017

comment:1

Hi,
this is running on my system:

sage: matrix([ [ x,x*x ],[ 1,0 ] ]).eigenvectors_right() 

[(-1/2*x*(sqrt(5) - 1), [(1, -1/2*(sqrt(5) + 1)/x)], 1),
 (1/2*x*(sqrt(5) + 1), [(1, 1/2*(sqrt(5) - 1)/x)], 1)]

tested both in v.7.6. and in the latest v.8.0.beta12.

(that said, i have no idea what could be the issue in your session, probably someone can answer in the usual forums).

@rwst

This comment has been minimized.

@rwst
Copy link

rwst commented Jul 1, 2017

comment:2

I'm also failing the confirmation. You seem to be using a special installation of Sage because the system Python is used. What's your setup/system?

@rwst rwst modified the milestones: sage-8.0, sage-8.1 Jul 1, 2017
@sagetrac-stassev
Copy link
Mannequin Author

sagetrac-stassev mannequin commented Jul 1, 2017

comment:4

I'm using the archlinux sagemath package, so I reported it as an archlinux bug (https://bugs.archlinux.org/task/54620). There, I was told the following:

This is caused by ecl 16.1.3. We are applying the patch from #22191 but apparently it doesn't fix all issues

@DaveWitteMorris
Copy link
Member

Branch: public/23332

@DaveWitteMorris
Copy link
Member

Changed keywords from none to eigenvalues

@DaveWitteMorris
Copy link
Member

Upstream: Fixed upstream, in a later stable release.

@DaveWitteMorris
Copy link
Member

Commit: f6500fb

@DaveWitteMorris
Copy link
Member

comment:6

The archlinux ticket was closed long ago, so I think we can close this old ticket. The PR just adds the ticket's example as a regression doctest for eigenvectors_left and eigenvectors_right.


New commits:

f6500fbtrac 23332 doctests

@DaveWitteMorris
Copy link
Member

Author: Dave Morris

@kwankyu
Copy link
Collaborator

kwankyu commented Mar 12, 2021

Reviewer: Kwankyu Lee

@kwankyu
Copy link
Collaborator

kwankyu commented Mar 12, 2021

comment:7

Looks good.

@DaveWitteMorris
Copy link
Member

comment:8

Thanks for the quick review!

@vbraun
Copy link
Member

vbraun commented Mar 18, 2021

Changed branch from public/23332 to f6500fb

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

4 participants