[Bug 1199150] New: python-scipy test failure with GCC 12 on i586
https://bugzilla.suse.com/show_bug.cgi?id=1199150 Bug ID: 1199150 Summary: python-scipy test failure with GCC 12 on i586 Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Other Assignee: screening-team-bugs@suse.de Reporter: rguenther@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- It materializes as [ 559s] ../../special/tests/test_kolmogorov.py::TestSmirnovp::test_oneminusoneovern <- ../../../../../usr/lib/python3.9/site-packages/scipy/special/tests/test_kolmogorov.py Fatal Python error: Floating point exception [ 559s] [ 559s] Current thread 0xf7970700 (most recent call first): [ 559s] File "/usr/lib/python3.9/site-packages/scipy/special/_testutils.py", line 213 in eval_func_at_params with gdb one sees Thread 1 "python3.9" received signal SIGFPE, Arithmetic exception. 0xd059330b in pow2Scaled_D (a=..., m=8, pExponent=0xffff81f0) at scipy/special/cephes/kolmogorov.c:607 607 y2r = pow2Scaled_D(y, r, &y2rE); 0xd05932f0 <+336>: mov 0xe0(%esp),%eax 0xd05932f7 <+343>: movaps %xmm0,0x60(%esp) 0xd05932fc <+348>: lea 0x9c(%esp),%ebp 0xd0593303 <+355>: sub $0x8,%esp 0xd0593306 <+358>: mov %ecx,0x10(%esp) 0xd059330a <+362>: cltd => 0xd059330b <+363>: idiv %ecx 0xd059330d <+365>: mov %eax,0x18(%esp) 0xd0593311 <+369>: lea 0x48(%esp),%ecx and we divide by zero. (gdb) l 602 } 603 604 q = m / maxExpt; 605 r = m % maxExpt; 606 /* y^m = (y^maxExpt)^q * y^r */ 607 y2r = pow2Scaled_D(y, r, &y2rE); 608 y2m = pow2Scaled_D(y, maxExpt, &y2mE); 609 y2mq = pow2Scaled_D(y2m, q, &y2mqE); 610 ans = frexpD(mul_DD(y2r, y2mq), &ansE); 611 y2mqE += y2mE * q; (gdb) p maxExpt $7 = 0 -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1199150 https://bugzilla.suse.com/show_bug.cgi?id=1199150#c1 --- Comment #1 from Richard Biener <rguenther@suse.com> --- 'a' is x = {0, 0}, m is 8 and we run into /* * y ^ maxExpt >= 2^{-960} * => maxExpt = 960 / log2(y.x[0]) = 708 / log(y.x[0]) * = 665/((1-y.x[0] + y.x[0]^2/2 - ...) * <= 665/(1-y.x[0]) * Quick check to see if we might need to break up the exponentiation */ if (m*(y.x[0]-1) / y.x[0] < -_MAX_EXPONENT * NPY_LOGE2) { /* Now do it carefully, calling log() */ double lg2y = log(y.x[0]) / NPY_LOGE2; double lgAns = m * lg2y; if (lgAns <= -_MAX_EXPONENT) { maxExpt = (int)(nextPowerOf2(-_MAX_EXPONENT / lg2y + 1)/2); } } but we compute y = frexpD(a, &yE); and that results in {0, <optimized out>}, we bogously run into the above and lg2y ends up as -Inf and it's all bullshit from here. Now the question is whether we are supposed to arrive at pow2Scaled_D with all zero 'a'. Since the code uses -msse2 it probably should also use -mfpmath=sse on i586 or alternatively -fexcess-precision=standard. The build isn't much verbose but it seems we use [ 201s] C compiler: gcc -Wno-unused-result -Wsign-compare -DNDEBUG -fomit-frame -pointer -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DO PENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -fomit-frame-pointer -O2 -W all -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous- unwind-tables -fstack-clash-protection -Werror=return-type -g -IVendor/ -fomit-f rame-pointer -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tab les -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -IVendor/ -fomit-frame-pointer -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector- strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -We rror=return-type -flto=auto -g -fno-strict-aliasing -fPIC ... [ 201s] extra options: '-msse -msse2' ... [ 202s] gcc: scipy/special/cephes/kolmogorov.c -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1199150 Chenzi Cao <chcao@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|screening-team-bugs@suse.de |code@bnavigator.de -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1199150 https://bugzilla.suse.com/show_bug.cgi?id=1199150#c2 Dominique Leuenberger <dimstar@opensuse.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dimstar@opensuse.org --- Comment #2 from Dominique Leuenberger <dimstar@opensuse.org> --- https://build.opensuse.org/request/show/969712 already addressed this in some way -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1199150 Richard Biener <rguenther@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://github.com/scipy/sc | |ipy/issues/16102 -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1199150 https://bugzilla.suse.com/show_bug.cgi?id=1199150#c4 --- Comment #4 from Richard Biener <rguenther@suse.com> --- -ffloat-store is probably the wrong way to fix this, instead numpy requires SSE[2] anyway (so strictly doesn't qualify for the baseline used for our i586 builds), which means the proper "fix" would likely be to use -mfpmath=sse instead. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com