FS#21592 - [sage-mathematics] segfault during plot

Attached to Project: Community Packages
Opened by Andrzej Giniewicz (Giniu) - Thursday, 04 November 2010, 12:03 GMT
Last edited by Alexander F. Rødseth (xyproto) - Wednesday, 09 November 2011, 10:18 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Thomas Dziedzic (tomd123)
Architecture i686
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

With sage-mathematics 4.6 (sage with 4.5.3) and fully updated system, Sage is segfaulting during even simple plot:

sage: plot(x,(x,0,1))

Program received signal SIGILL, Illegal instruction.
0xb6b78d11 in cblas_dgemm () from /opt/sage/local/lib/libcblas.so
(gdb)

bt doesn't show anything useful (just two ?? lines). Version built from source (at least 4.5.3) works. The machine is old 2xPentium III - maybe it is compiled for only newer machines with sse2?
This task depends upon

Closed by  Alexander F. Rødseth (xyproto)
Wednesday, 09 November 2011, 10:18 GMT
Reason for closing:  Fixed
Comment by Thomas Dziedzic (tomd123) - Saturday, 06 November 2010, 17:02 GMT
I have a feeling like this might be an upstream bug, since it did work for you previously, and now it isn't. I haven't changed the way it compiles.
Comment by Andrzej Giniewicz (Giniu) - Saturday, 06 November 2010, 17:09 GMT
well, in description there should be "same with 4.5.3" - actually 4.5.3 was first community version I tried, before I was using AUR version for a very long time. I was trying to track it a bit, and in dgemm there is only matrix multiplication. There really isn't anything that can go wrong with it other than optimization I think.
Comment by Thomas Dziedzic (tomd123) - Saturday, 06 November 2010, 19:43 GMT
Oh so, 4.5.3 also didn't work? Weird, I'll have to see why it's optimizing it.
Comment by Andrzej Giniewicz (Giniu) - Saturday, 06 November 2010, 19:55 GMT
Yes, it was same with 4.5.3. I'm attaching output of cpuinfo on machine where it fails.
Comment by Thomas Dziedzic (tomd123) - Saturday, 06 November 2010, 22:26 GMT
Looks like atlas specifically (among possibly others) doesn't respect CFLAGS and SAGE_FAT_BINARY="yes". I will probably file a bug upstream, for now, it looks like the only way you will be able to use sage is by compiling it yourself in the mean time.
Comment by Thomas Dziedzic (tomd123) - Tuesday, 09 November 2010, 03:07 GMT
This is probably the issue you have encountered:
upstream bug report: http://trac.sagemath.org/sage_trac/ticket/9382
Comment by Thomas Dziedzic (tomd123) - Wednesday, 26 January 2011, 05:50 GMT
Looks like this bug will finally get fixed with sage 4.7. That said, I don't think 4.6.2 will include the fix described upstream, so you will have to compile one more release yourself :)
Comment by Andrzej Giniewicz (Giniu) - Wednesday, 26 January 2011, 08:29 GMT
thanks for info, will do.
Comment by Thomas Dziedzic (tomd123) - Tuesday, 01 February 2011, 06:17 GMT
I just realized that the way I build the sage package isn't the right way to make it cross platform,
I was doing "export SAGE_FAT_BINARY=1" instead of "export SAGE_FAT_BINARY='yes'"
If you have some bandwidth to kill could you try 4.6.1-2 ? (don't bother with 4.6.1-1)
It might not fix your issue, but it's always worth a try if you're willing to spare some bandwidth :)

Cheers!
Comment by Andrzej Giniewicz (Giniu) - Tuesday, 01 February 2011, 22:23 GMT
Tested the 4.6.1-2, but nope - it's still like it was (segfaults on plot). There is no rush though, I use a version built from source for now, so lets wait for 4.7 as you said. Thanks for trying though :)
Comment by Thomas Dziedzic (tomd123) - Thursday, 24 March 2011, 21:06 GMT
Just a note,
the upstream bug report "Rewrite ATLAS spkg-install" [1] supersedes the original bug report [2] I posted here.

[1] - http://trac.sagemath.org/sage_trac/ticket/10226
[2] - http://trac.sagemath.org/sage_trac/ticket/9382
Comment by François (Spip) - Sunday, 19 June 2011, 10:55 GMT
It works fine for me with the last version. I think this report could be close.
Comment by Thomas Dziedzic (tomd123) - Sunday, 19 June 2011, 11:07 GMT
@spip, have you experienced this before? upstream hasn't closed their bug report
@giniu, is it working for you now?
Comment by François (Spip) - Sunday, 19 June 2011, 11:33 GMT
No, this is the first time I use sage-math.
Comment by Andrzej Giniewicz (Giniu) - Monday, 20 June 2011, 10:33 GMT
@tomd123, I believe I checked with 4.7 but it wasn't fixed yet.

@spip, This issue is visible only on old CPU's without SSE2, so it is very very probable you will not encounter it if you have more recent machine. I for example see this on only one of machines I run Sage on.
Comment by Thomas Dziedzic (tomd123) - Wednesday, 03 August 2011, 15:02 GMT
http://trac.sagemath.org/sage_trac/ticket/10226

has been merged in 4.7.2 alpha 0
Comment by Alexander F. Rødseth (xyproto) - Thursday, 03 November 2011, 08:09 GMT
Works here. Sage 4.7.1. x86_64.
Comment by Thomas Dziedzic (tomd123) - Thursday, 03 November 2011, 13:09 GMT
"This issue is visible only on old CPU's without SSE2, so it is very very probable you will not encounter it if you have more recent machine. I for example see this on only one of machines I run Sage on."

That said, this is supposedly getting fixed in 4.7.2 :)
Comment by Andrzej Giniewicz (Giniu) - Thursday, 03 November 2011, 13:27 GMT
Which is hopefully coming out soon ;) http://boxen.math.washington.edu/home/release/sage-4.7.2/ - some say like 4 days ago, some say that it isn't here yet :)
Comment by Thomas Dziedzic (tomd123) - Wednesday, 09 November 2011, 04:02 GMT
I just pushed 4.7.2, can you confirm that this is fixed?
Comment by Andrzej Giniewicz (Giniu) - Wednesday, 09 November 2011, 06:53 GMT
I will test it soon on machine where the issue occured and let you know. I hope it will be ok now, but lets see.
Comment by Andrzej Giniewicz (Giniu) - Wednesday, 09 November 2011, 07:31 GMT
Yes, looks like it IS finally working, plot(x, (x,0,1)) no longer segfaults it! I just noticed, that it was exactly 1 year (to single day) since we started on this issue, quite long time, but it can finally be closed and rest in peace :)

Loading...