Open tornaria opened 2 years ago
This is a duplicate of #33050, but with more information.
Replying to @orlitzky:
This is a duplicate of #33050, but with more information.
It certainly looks the same, I'm sorry I missed that.
However, what really confuses me is why running via doctests should be different than running interactively. Do you have any clue about that?
I did the small file with only one test because I thought maybe some giac setting was changed by a previous test, but that doesn't change anything. Is there perhaps a weird interaction between the way doctests are run and the way giac is run? Maybe some diagnostic information printed by giac only in particular cases.
It's very weird and I can reproduce it now. We hit a similar issue in #33092; see the discussion starting around comment 45. Does using sage -t --serial
fix the problem?
Using --serial
worked fine exactly once. Every subsequent run hangs even with --serial
Replying to @antonio-rojas:
Using
--serial
worked fine exactly once. Every subsequent run hangs even with--serial
lol so I'm not the only one that happened to? I thought I was losing my mind. I wasn't even going to comment about it.
I can't reproduce the problem with 9.5.rc0
with:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal
$ giac -v
// Using locale /usr/share/locale/
// fr_CA.UTF-8
// /usr/share/locale/
// giac
// UTF-8
// Maximum number of parallel threads 8
// (c) 2001, 2018 B. Parisse & others
1.5.0
Not sure if useful, but here is a backtrace
#0 0x00007f784b78986f in mpn_mod_1_unnorm (d=18444403110374801408, un=946, up=0x5583997d2fc0) at mpn/../mpn/generic/mod_1.c:173
#1 __gmpn_mod_1_fat (b=<optimized out>, n=<optimized out>, ap=0x5583997d2fc0) at mpn/../mpn/generic/mod_1.c:259
#2 __gmpn_mod_1_fat (ap=0x5583997d2fc0, n=<optimized out>, b=<optimized out>) at mpn/../mpn/generic/mod_1.c:232
#3 0x00007f784b78dcd8 in __gmpz_fdiv_ui (dividend=<optimized out>, divisor=536802781) at mpz/fdiv_ui.c:89
#4 0x00007f77e8235c30 in giac::modulo (a=..., b=<optimized out>) at /build/giac/src/giac-1.7.0/src/ifactor.cc:410
#5 0x00007f77e89dda2f in giac::chinrem<giac::tdeg_t14> (tmp=..., qmodval=536802781, Q=..., pmod=..., P=...)
at /build/giac/src/giac-1.7.0/src/cocoa.cc:9199
#6 giac::chinrem<giac::tdeg_t14> (start=<optimized out>, tmp=..., qmod=536802781, Q=..., pmod=..., P=...)
at /build/giac/src/giac-1.7.0/src/cocoa.cc:9305
#7 giac::in_mod_gbasis<giac::tdeg_t14>(giac::vectpoly8<giac::tdeg_t14>&, bool, bool, int&, giac::context const*, giac::gbasis_param_t, int) [clone .isra.0] (res=..., modularcheck=modularcheck@entry=false, zdata=zdata@entry=true, rur=@0x7fff29922308: 0, contextptr=contextptr@entry=0x558398296290,
gbasis_logz_age=<optimized out>, gbasis_par=..., gbasis_par=...) at /build/giac/src/giac-1.7.0/src/cocoa.cc:15847
#8 0x00007f77e842f269 in giac::mod_gbasis<giac::tdeg_t14> (gbasis_param=..., gbasis_param=..., zdata=true, contextptr=0x558398296290,
rur=@0x7fff29922308: 0, modularcheck=<optimized out>, res=...) at /build/giac/src/giac-1.7.0/src/cocoa.cc:16130
#9 giac::gbasis8 (v=..., order=..., newres=..., env=0x7fff29922360, modularalgo=<optimized out>, modularcheck=<optimized out>, rur=@0x7fff29922308: 0,
contextptr=0x558398296290, gbasis_param=...) at /build/giac/src/giac-1.7.0/src/cocoa.cc:17838
#10 0x00007f77e8000abd in giac::giac_gbasis (res=..., order_=..., env=0x7fff29922360, modularcheck=1, rur=@0x7fff29922308: 0, contextptr=0x558398296290,
gbasis_param=...) at /build/giac/src/giac-1.7.0/src/solve.cc:6165
#11 0x00007f77e8001154 in giac::gbasis (v=..., order=..., with_cocoa=<optimized out>, modular=1, env=0x7fff29922360, rur=@0x7fff29922308: 0,
contextptr=0x558398296290, gbasis_param=...) at /build/giac/src/giac-1.7.0/src/solve.cc:6303
#12 0x00007f77e800e595 in giac::_gbasis (args=..., contextptr=<optimized out>) at /build/giac/src/giac-1.7.0/src/solve.cc:7388
#13 0x00007f77e7edbc1a in giac::unary_function_eval::operator() (this=<optimized out>, arg=..., context_ptr=<optimized out>, this=<optimized out>,
arg=..., context_ptr=<optimized out>) at /build/giac/src/giac-1.7.0/src/unary.h:203
#14 0x00007f77e84caad9 in giac::unary_function_ptr::operator() (this=<optimized out>, arg=..., context_ptr=<optimized out>)
at /build/giac/src/giac-1.7.0/src/unary.cc:39
--Type <RET> for more, q to quit, c to continue without paging--
#15 0x00007f77e859e7f7 in giac::gen::operator() (this=0x55839801fe30, i=..., progname=..., contextptr=0x558398296290)
at /build/giac/src/giac-1.7.0/src/gen.cc:9748
#16 0x00007f77e85a04bd in giac::gen::operator() (this=<optimized out>, i=..., contextptr=<optimized out>) at /build/giac/src/giac-1.7.0/src/gen.cc:9607
#17 0x00007f77e92237aa in ?? () from /usr/lib/python3.10/site-packages/sage/libs/giac/giac.cpython-310-x86_64-linux-gnu.so
#18 0x00007f77e9211423 in ?? () from /usr/lib/python3.10/site-packages/sage/libs/giac/giac.cpython-310-x86_64-linux-gnu.so
#19 0x00007f784c7a47cb in _PyObject_MakeTpCall () from /usr/lib/libpython3.10.so.1.0
#20 0x00007f784c7b6389 in ?? () from /usr/lib/libpython3.10.so.1.0
#21 0x00007f784c703565 in ?? () from /usr/lib/libpython3.10.so.1.0
#22 0x00007f77e921d5e3 in ?? () from /usr/lib/python3.10/site-packages/sage/libs/giac/giac.cpython-310-x86_64-linux-gnu.so
#23 0x00007f77e91302a5 in ?? () from /usr/lib/python3.10/site-packages/sage/libs/giac/giac.cpython-310-x86_64-linux-gnu.so
#24 0x00007f784c7ab475 in ?? () from /usr/lib/libpython3.10.so.1.0
#25 0x00007f784c79aa9b in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.10.so.1.0
#26 0x00007f784c7aa73c in _PyFunction_Vectorcall () from /usr/lib/libpython3.10.so.1.0
#27 0x00007f784c79d225 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.10.so.1.0
#28 0x00007f784c7aa73c in _PyFunction_Vectorcall () from /usr/lib/libpython3.10.so.1.0
#29 0x00007f784c79a769 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.10.so.1.0
#30 0x00007f784c799392 in ?? () from /usr/lib/libpython3.10.so.1.0
#31 0x00007f784c851c14 in PyEval_EvalCode () from /usr/lib/libpython3.10.so.1.0
#32 0x00007f784c859671 in ?? () from /usr/lib/libpython3.10.so.1.0
#33 0x00007f784c7aa940 in ?? () from /usr/lib/libpython3.10.so.1.0
#34 0x00007f784c79a769 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.10.so.1.0
#35 0x00007f784c7aa73c in _PyFunction_Vectorcall () from /usr/lib/libpython3.10.so.1.0
#36 0x00007f784c79aa9b in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.10.so.1.0
#37 0x00007f784c7aa73c in _PyFunction_Vectorcall () from /usr/lib/libpython3.10.so.1.0
#38 0x00007f784c79aa9b in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.10.so.1.0
[...]
bump to 9.6
Another instance with another random seed, timing out with sage 9.7.rc1:
sage -t --long --warn-long 59.5 --random-seed=14952671518664531990234514377169608802 src/sage/libs/giac/__init__.py
Using 9.5.rc0 and system giac 1.7.0-45:
gets stuck forever here, only for this random seed.
I reduced the doctest down to this file
test.py
:Now:
gets stuck forever and doesn't depend on the random seed.
However, running the same example interactively works:
Similar results in a different box with 9.5.beta9 and giac 1.7.0-39.
CC: @antonio-rojas @collares
Component: doctest framework
Issue created by migration from https://trac.sagemath.org/ticket/33161