Opened 3 years ago

Closed 6 weeks ago

#27419 closed defect (invalid)

Segmentation fault in MPIR mpz_divexact

Reported by: zimmerma Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: packages: standard Keywords:
Cc: dimpase Merged in:
Authors: Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #32549 Stopgaps:

Status badges

Description (last modified by jdemeyer)

This was reported to me by Jean-Luc Garambois. I occurs on some systems but not on all. It can be reproduced in particular on

Linux sage4 4.14.78-gentoo #3 SMP Tue Nov 20 16:05:28 CET 2018 x86_64 Intel(R) Xeon(R) CPU X5660 @ 2.80GHz GenuineIntel GNU/Linux

with GCC-4.9.3 on Sage 8.7.beta6:

sage: p=2^2203-1; q=(2^2204-1)*(2^9913-1)+(2^17624-2^7710); q/p
------------------------------------------------------------------------
/home/garambois/SageMath/local/lib/python2.7/site-packages/cysignals/signals.so\
(+0x7898)[0x7f4f1377a898]

/home/garambois/SageMath/local/lib/python2.7/site-packages/cysignals/signals.so\
(+0x793f)[0x7f4f1377a93f]

/home/garambois/SageMath/local/lib/python2.7/site-packages/cysignals/signals.so\
(+0xa37c)[0x7f4f1377d37c]
...------------------------------------------------------------------------
Unhandled SIGSEGV: A segmentation fault 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.
------------------------------------------------------------------------
Segmentation fault

The problem goes away when compiling mpir with -O1 (but it persists with -O2). So it's either an MPIR or GCC bug.

Attachments (2)

log (98.2 KB) - added by zimmerma 3 years ago.
log file
test.c (6.0 KB) - added by jdemeyer 3 years ago.

Download all attachments as: .zip

Change History (63)

comment:1 in reply to: ↑ description ; follow-up: Changed 3 years ago by jdemeyer

Replying to zimmerma:

I do not copy the whole error message because it is too long.

Then at least include it as attachment.

comment:2 Changed 3 years ago by jdemeyer

I cannot reproduce this with Sage 8.7.beta6. I get the answer

15260302207367206383069757609205726622576246796622352874530340764747803930674910462543534158391298009280468309455062051462034133472388679771326900418479900543441313005574680867783239849485498348032594898873808871849760260873671227327451536011464719731957103677405553998111544319202058609180411161800282178513416995210144585842079374158997803223560281743100929381835531771844471416114057891626607277008114810309616776453909652955151440052103203465932658797087157661710535502620808196655815155790858125309720046573598789605719011928260470375066538229555844421475930716239327486323245359128209308605465031709752973704896721393656809462422955581859486550788533603837906118857545464038319716621736437121288939699620122417520449648533249078582162988486337730143019996277846697360330117518025973451898442298351071843624062524085903114331959471809291637096166532162429698494838457420137366665646518880232258225983016092618828529789340108457845309914820774369003286108910465927531355652454503113723598055212083076258754649543248555806020498659192505535091938488017216000655531776120813041422579843517599292757523450240591564732664096902630935829794670229930282773024106225280986022084976459772761217929898608866580733082856627253997713866102102158387478110647188418064363420460930124692061199329484867790187666978164971819405143891052113509298650969228021749819417755844748174698721420658226535641059630841238231852133754154172896650273406245951305406058542207171693496257130826042394808791679770241721614460804970841779751330341035356492624945715368908261334979219476209166549340781090509154058120706938417070656806840423200055380212689342537288829627600814467839760251568815684197283990466997876698570050988042178114350277250783466316039272870313462368551198232629024860776460268178202033319623650962822621025253422755392142119985261217112910855574785816389083725336495020326093740931272846082475545278335498224468477103571666945788510960981287912284878872415495212913619125561780803414964754590595943778724171952752876007169917929441212137533720662011975588469081994018715053850355103797421316465067506094743047591231330918125629039327643925721356651000582416972163071089825302423505731693336058095640738661196716217611406508464284466150201640344711601348683867827017077380760502649515988720582822013367686557407149161402715109221411753706478686009905757699317350816736314272510194295886072820232644696559593938223226287993737344348172304663013914744055887677194057453733107880666506256603676995899587181656898228310596199280150935181556986925490340267597374182767788281125231086616177346769824319572207086743802904804211803015770885894329720203816614442857141593932084133284474303106217142633494448074470455094988594581337508871810780886127389708579520916381430335371923241979057907713427755851591994136556262440921918369978146075778851691070015069052078745571710369723456754502416477508964223111111581593785902370083613518228987126265393274592562218469810579848227620794797601251492986020567979105745410670889135830700178949913967854531969117848300684686839608196314370942208267244059107922114502739982819680536069225717257083328568144535545727825237364273507259318309624576600747789909295909216136965784197796051188832785718442574751006091006479627298188554864129011749783322318401424063885465822856163224171661697940826771482216632204037429500752569998449785879987042866670540135087773745115627180942472725968270108168984296386200670559867235648366988414233385162769349454681736873919594168894722961851326257059363544377275771520659569882265572546724157237403300233241582700944317137681690806438578998942484567455613110178517124748544439769923597151681063498272280386050944630925248235950966013016647525565645810275222481987344895672613161006896175124538127217538403437029701475201532661746031811980736770185442546324580706059997356077422396038844121921112839192336867726404314772319522082538127039916336216521120959322928406998784191819706007753696941351497531394528018333547416839220456022964360766248920839372561476062839362896444775788497190543390404601404867610218240670327622807340093378796963452532037427942928682871836219313089272488422927187004988023972587334653083239375938276362426642359904421255334941602903634932946476411078803457538968492676783857469843094775552264849765851891910347215478442856487752926942272979416516866420211148219875048890755457337401527450397281858300479099706796754128190984070220436727865870820124580737787111523131795732055602637889022586039820199420458452738284681447179137832108415867517981051474750771039981849435204226752913910040172707791146511371007360314497114662761889296105156699585849949161521151

Changed 3 years ago by zimmerma

log file

comment:3 in reply to: ↑ 1 Changed 3 years ago by zimmerma

Then at least include it as attachment.

done.

comment:4 Changed 3 years ago by zimmerma

I cannot reproduce this with Sage 8.7.beta6.

can you reproduce it with 8.5 or 8.6?

comment:5 Changed 3 years ago by jdemeyer

On a different system, I can reproduce it on 8.6

comment:6 Changed 3 years ago by tscrim

I do not get the error on my Ubuntu 18.04 machine with Sage 8.6 (running Python3).

comment:7 Changed 3 years ago by jdemeyer

On the same system I mentioned in 5 I can reproduce the error also on 8.7.beta6.

comment:8 Changed 3 years ago by jdemeyer

  • Description modified (diff)

comment:9 Changed 3 years ago by jdemeyer

  • Description modified (diff)

comment:10 Changed 3 years ago by jdemeyer

  • Description modified (diff)

comment:11 Changed 3 years ago by zimmerma

maybe add this as a non-regression test in integer.pyx?

comment:12 Changed 3 years ago by jdemeyer

  • Description modified (diff)

comment:13 Changed 3 years ago by jdemeyer

  • Cc dimpase added
  • Description modified (diff)
  • Summary changed from Segmentation fault in integer division to Segmentation fault in MPIR mpz_divexact

comment:14 Changed 3 years ago by jdemeyer

  • Description modified (diff)

comment:15 Changed 3 years ago by zimmerma

does the bug occur when GMP is used in place of MPIR?

comment:16 follow-up: Changed 3 years ago by dimpase

To me this smells like a gcc bug. As gcc 4.9 is no longer maintained, I don't see how this can be a blocker...

By the way, #27212 allows for choosing between system's GMP (or perhaps system MPIR in GMP-compatible mode), and Sage's supplied MPIR or GMP.

(One issue that is left unresolved there is how to handle dynamic package changes, i.e. ./sage -i mpir would break things...)

comment:17 in reply to: ↑ 16 Changed 3 years ago by jdemeyer

Replying to dimpase:

To me this smells like a gcc bug.

I agree but we should exclude that it's an MPIR bug.

comment:18 Changed 3 years ago by zimmerma

on my machine where the bug occurs with Sage 8.5, it was compiled with GCC 7.2.0 according to config.status.

comment:19 Changed 3 years ago by dimpase

OK, is it a Xeon-only bug then (so far)?

comment:20 Changed 3 years ago by dimpase

Surely, not every Xeon+gcc, e.g. with gcc 8.2.0 and some Intel(R) Xeon(R) CPU @ 2.60GHz (not sure how to get more relevant details from /proc/cpuinfo) and MPIR it seem to work just fine...

comment:21 Changed 3 years ago by jdemeyer

It would be good if everybody would post the top lines of logs/pkgs/mpir-3.0.0-644faf502c56f97d9accd301965fc57d6ec70868.p0.log. For example, on my failing system, I have

****************************************************
Host system:
Linux sage4 4.14.78-gentoo #3 SMP Tue Nov 20 16:05:28 CET 2018 x86_64 Intel(R) Xeon(R) CPU X5660 @ 2.80GHz GenuineIntel GNU/Linux
****************************************************
C compiler: gcc
C compiler version:
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.3/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.3/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.9.3/work/gcc-4.9.3/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.3 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.3 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.3/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.3/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.9.3/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.9.3 p1.5, pie-0.6.4' --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --enable-vtable-verify --enable-libvtv --enable-lto --without-cloog --enable-libsanitizer
Thread model: posix
gcc version 4.9.3 (Gentoo 4.9.3 p1.5, pie-0.6.4)
****************************************************
Machine type (default): x86_64-unknown-linux-gnu
Machine type (mpir): westmere-unknown-linux-gnu
Building a 64-bit version of MPIR.

comment:22 Changed 3 years ago by dimpase

Here is is what I have on my seemingly OK Xeon:

Linux gent-linux 4.18.0-1006-gcp #7-Ubuntu SMP Tue Jan 15 13:28:52 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
****************************************************
C compiler: gcc
C compiler version:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 8.2.0-7ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 8.2.0 (Ubuntu 8.2.0-7ubuntu1) 
****************************************************
Machine type (default): x86_64-unknown-linux-gnu
Machine type (mpir): sandybridge-unknown-linux-gnu

(Jeroen, you know this machine I suppose :-))

So sandybridge seems OK. I also cannot reproduce this on i7-6600U CPU @ 2.60GHz skylakeavx.

comment:23 Changed 3 years ago by tscrim

With my Intel(R) Core(TM) i7-8700:

****************************************************
Host system:
Linux SMP-36PQ8T2 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
****************************************************
C compiler: gcc
C compiler version:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 8.2.0-1ubuntu2~18.04' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 8.2.0 (Ubuntu 8.2.0-1ubuntu2~18.04) 
****************************************************
Machine type (default): x86_64-unknown-linux-gnu
Machine type (mpir): x86_64-unknown-linux-gnu
Version 0, edited 3 years ago by tscrim (next)

comment:24 Changed 3 years ago by jdemeyer

My laptop (not getting the error):

****************************************************
Host system:
Linux tamiyo 3.17.7-gentoo #2 SMP PREEMPT Fri Dec 23 18:13:49 CET 2016 x86_64 Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz GenuineIntel GNU/Linux
****************************************************
C compiler: gcc
C compiler version:
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/6.4.0/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/6.4.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-6.4.0-r1/work/gcc-6.4.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/6.4.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/6.4.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/6.4.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/6.4.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/6.4.0/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 6.4.0-r1 p1.3' --disable-esp --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --disable-libmpx --enable-vtable-verify --enable-libvtv --enable-lto --without-isl --enable-libsanitizer --enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 6.4.0 (Gentoo 6.4.0-r1 p1.3) 
****************************************************
Machine type (default): x86_64-unknown-linux-gnu
Machine type (mpir): sandybridge-unknown-linux-gnu
Building a 64-bit version of MPIR.

comment:25 Changed 3 years ago by tscrim

With my laptop's Intel(R) Core(TM) i7-4720HQ with Ubunutu 16.04 LTS (no error on 8.7.beta5):

Host system:
Linux apricot 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_6
4 x86_64 x86_64 GNU/Linux
****************************************************
C compiler: gcc
C compiler version:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.3.0-21ubuntu1~16.04' --wi
th-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,f
ortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --prog
ram-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/li
b --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-
sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with
-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-lib
mpx --enable-plugin --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --e
nable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m
32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --wi
thout-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.3.0 (Ubuntu 7.3.0-21ubuntu1~16.04) 
****************************************************
Old-style or corrupt stamp file '/home/travis/sage-build/local/var/lib/sage/installed/mpir
-3.0.0-644faf502c56f97d9accd301965fc57d6ec70868'
No legacy uninstaller found for 'mpir'; nothing to do
Machine type (default): x86_64-unknown-linux-gnu
Machine type (mpir): haswellavx-unknown-linux-gnu
Building a 64-bit version of MPIR.
Building MPIR with the C++ interface and (also) static libraries.

comment:27 Changed 3 years ago by vbraun

Seems to be Westmere microarchitecture specific, for consumer CPUs one should try with a first-generation Intel Core. E.g. i7-970, i5-6xx. I don't have anything that old lying around...

comment:28 Changed 3 years ago by dimpase

This computation works well with our MPIR on my old OSX Core 2 Duo machine. (Well, built with clang, not with gcc). That's as old as it goes among CPUs that I have working.

****************************************************
Host system:
Darwin dimas-air.lan 17.7.0 Darwin Kernel Version 17.7.0: Thu Dec 20 21:47:19 PST 2018; root:xnu-4570.71.22~1/RELEASE_X86_64 x86_64
****************************************************
C compiler: clang
C compiler version:
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
****************************************************
Machine type (default): x86_64-apple-darwin17.7.0
Machine type (mpir): penryn-apple-darwin17.7.0
Building a 64-bit version of MPIR, which is the default.
Building MPIR with the C++ interface and (also) static libraries.

comment:29 Changed 3 years ago by jdemeyer

It's still not clear to me whether the problem is due to CPU architecture or due to the compiler.

comment:30 Changed 3 years ago by vbraun

Presumably both, i.e. the optimizer does something wrong on Westmere (or mpir has some hand-written optimization that is used only on Westmere and fails).

Would be useful to check if it works on Nehalem (the previous microarch). Westmere is mainly a die shrink so there are very few new isa extensions (i.e. only AES-NI and PCLMULQDQ according to WP)

comment:31 Changed 3 years ago by jdemeyer

I don't think that this should be a blocker (but I'll let the release manager decide): this bug probably dates back to the last MPIR upgrade (#24085). If a bug is that old and nobody noticed before, then it can't be that serious.

comment:32 follow-up: Changed 3 years ago by zimmerma

if the bug is related to MPIR, it should be reported upstream.

comment:33 in reply to: ↑ 32 Changed 3 years ago by dimpase

Replying to zimmerma:

if the bug is related to MPIR, it should be reported upstream.

given that noone here is able to reproduce this bug, it would be great to gather more info from your source:

  • what is the info requested in comment:21 in this case ?
  • does the error go away if MPIR is replaced by GMP?

comment:34 Changed 3 years ago by jdemeyer

Well, some people can reproduce it on some systems. But we don't have sufficient information for now to decide if it's an MPIR or GCC bug.

comment:35 follow-up: Changed 3 years ago by embray

Is the best way to reproduce the problem just the example in the ticket description, or has anyone narrowed it down to something simpler?

I could try to build a GCC 4.9.3 and see if I can reproduce the problem. If so that'd be great, because then I could try a newer (or older) GCC and see if it goes away, and then git-bisect until I narrow down on the issue (assuming it's related to GCC). But if the bug is CPU-specific that might be harder.

comment:36 in reply to: ↑ 35 Changed 3 years ago by jdemeyer

Replying to embray:

Is the best way to reproduce the problem just the example in the ticket description, or has anyone narrowed it down to something simpler?

It's a division of 2 large integers, that's simple enough to understand.

comment:37 Changed 3 years ago by embray

Okay, duh. I didn't actually read the example closely.

comment:38 follow-up: Changed 3 years ago by embray

I guess, a more useful question is, can it be reproduced just by calling mpz_divexact from a simpler C program without the overhead of Sage? And can it be reproduced with different values?

comment:39 in reply to: ↑ 38 Changed 3 years ago by jdemeyer

Replying to embray:

And can it be reproduced with different values?

Yes, I checked this some time ago. You can play with the exponents and get the same error for different values. But all crashing examples that I found are pretty large (over 2600 or so).

comment:40 follow-up: Changed 3 years ago by jdemeyer

Yes, it can be reproduced easily from C, see attachment.

Changed 3 years ago by jdemeyer

comment:41 Changed 3 years ago by vbraun

Another interesting data point would be whether the binary compiled on the affected machine works on another machine, or vice versa.

Unless a patch materializes real soon this is not going to be fixed in Sage-8.7 though.

comment:42 Changed 3 years ago by jdemeyer

  • Component changed from basic arithmetic to packages: standard
  • Priority changed from blocker to critical

comment:43 Changed 3 years ago by embray

  • Milestone changed from sage-8.7 to sage-8.8

Moving all blocker/critical issues from 8.7 to 8.8.

comment:44 in reply to: ↑ 40 Changed 3 years ago by zimmerma

Replying to jdemeyer:

Yes, it can be reproduced easily from C, see attachment.

Jeroen, please can you give the exact environment where you can reproduce it (processor, operating system, compiler, mpir or gmp, ...)? I tried on a Intel(R) Xeon(R) CPU E7540 with Debian GNU/Linux buster/sid, gcc 8.3.0 (Debian 8.3.0-2) and mpir-3.0.0-644faf502c56f97d9accd301965fc57d6ec70868 (the mpir tarball shipped with Sage 8.6) and was unable to reproduce the error.

comment:45 Changed 3 years ago by embray

Perhaps, per Volker's suggestion, you could also attach a binary of test.c exhibiting the issue.

comment:46 Changed 2 years ago by embray

  • Milestone changed from sage-8.8 to sage-8.9

Moving open critical and blocker issues to the next release milestone (optimistically).

comment:47 Changed 2 years ago by embray

  • Milestone changed from sage-8.9 to sage-9.1

Ticket retargeted after milestone closed

comment:48 Changed 19 months ago by mkoeppe

  • Milestone changed from sage-9.1 to sage-9.2

comment:49 Changed 14 months ago by mkoeppe

  • Milestone changed from sage-9.2 to sage-9.3

comment:50 Changed 9 months ago by mkoeppe

  • Milestone changed from sage-9.3 to sage-duplicate/invalid/wontfix
  • Priority changed from critical to major
  • Status changed from new to needs_review

I think this can be closed as outdated. We have switched default MP to gmp, and there has not been new information in a while.

comment:51 Changed 9 months ago by tscrim

  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

I think so as well. If something else comes up, we can always get a new ticket.

comment:52 Changed 9 months ago by zimmerma

I still can reproduce the bug with Sage 9.1 on an Intel(R) Core(TM) i5-4590 under Ubuntu.

comment:53 Changed 9 months ago by zimmerma

  • Milestone changed from sage-duplicate/invalid/wontfix to sage-9.3
  • Status changed from positive_review to needs_work

and the latest version of Sage (9.2) still enables --with-mp=mpir, thus unless the bug has been fixed upstream in mpir-3.0.0-644faf502c56f97d9accd301965fc57d6ec70868.tar.bz2, it is still there.

comment:54 Changed 9 months ago by mkoeppe

Well, can you reproduce the bug with 9.3.beta9?

comment:55 Changed 9 months ago by zimmerma

Jean-Luc Garambois tells me that the bug still appears with the pre-compiled 9.2 binary on his machine (but if he compiles the 9.2 sources on his machine, it works fine). Thus the bug is still present. I don't have time to try 9.3.beta9, but I can ask Jean-Luc Garambois more details if needed.

comment:56 Changed 9 months ago by zimmerma

the precompiled version that Jean-Luc Garambois used is the 9.2 one for Ubuntu 18.04 on http://www-ftp.lip6.fr/pub/math/sagemath/linux/64bit/index.html

comment:57 Changed 8 months ago by mkoeppe

  • Milestone changed from sage-9.3 to sage-9.4

Moving this ticket to 9.4, as it seems unlikely that it will be merged in 9.3, which is in the release candidate stage

comment:58 Changed 4 months ago by mkoeppe

  • Milestone changed from sage-9.4 to sage-9.5

comment:59 Changed 2 months ago by mkoeppe

  • Dependencies set to #32549
  • Milestone changed from sage-9.5 to sage-duplicate/invalid/wontfix
  • Status changed from needs_work to needs_review

outdated after mpir removal in #32549

comment:60 Changed 8 weeks ago by tscrim

  • Status changed from needs_review to positive_review

comment:61 Changed 6 weeks ago by mkoeppe

  • Resolution set to invalid
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.