Skip to content

Another seemingly infinite loop #7951

@mtzguido

Description

@mtzguido

This is similar to #7948, but I'm not sure if it is in fact tightly looping (with -v:9 the logs show spurious messages once in a while, at least for the first few minutes).

This file:

queries-Hacl.Spec.Bignum.ModInvLimb-14.smt2.txt

works for random seeds 1 through 9 (with some variance in time, it can take 0.16s up to 2.2s), but seems to take forever with seed=0. It ran for at least 45 minutes on my machine.

The stack trace after running for about 30 seconds is something like this:

^C
Program received signal SIGINT, Interrupt.
0x0000555556e4bfdd in mpn_manager::mul(unsigned int const*, unsigned int, unsigned int const*, unsigned int, unsigned int*) const ()
(gdb) where
#0  0x0000555556e4bfdd in mpn_manager::mul(unsigned int const*, unsigned int, unsigned int const*, unsigned int, unsigned int*) const ()
#1  0x0000555556df385d in mpz_manager<false>::big_mul(mpz const&, mpz const&, mpz&) ()
#2  0x0000555556df65d1 in mpz_manager<false>::addmul(mpz const&, mpz const&, mpz const&, mpz&) ()
#3  0x0000555556d8a8ff in void polynomial::manager::imp::som_buffer::addmul_core<polynomial::polynomial, false>(mpz const&, polynomial::monomial const*, polynomial::polynomial const*) ()
#4  0x0000555556d93261 in polynomial::manager::imp::exact_div(polynomial::polynomial const*, polynomial::polynomial const*) ()
#5  0x0000555556da5845 in polynomial::manager::imp::resultant(polynomial::polynomial const*, polynomial::polynomial const*, unsigned int, obj_ref<polynomial::polynomial, polynomial::manager>&) ()
#6  0x0000555556d839ca in polynomial::manager::discriminant(polynomial::polynomial const*, unsigned int, obj_ref<polynomial::polynomial, polynomial::manager>&) ()
#7  0x000055555671e9f2 in nlsat::explain::imp::add_lcs(ref_vector<polynomial::polynomial, polynomial::manager>&, unsigned int) ()
#8  0x0000555556723f0d in nlsat::explain::imp::project(ref_vector<polynomial::polynomial, polynomial::manager>&, unsigned int) ()
#9  0x000055555671a62e in nlsat::explain::main_operator(unsigned int, sat::literal const*, nlsat::scoped_literal_vector&) ()
#10 0x0000555556731890 in nlsat::solver::imp::search() [clone .constprop.0] ()
#11 0x00005555567330c1 in nlsat::solver::imp::search_check() [clone .constprop.0] ()
#12 0x000055555672f62f in nlsat::solver::imp::check() [clone .constprop.0] ()
#13 0x000055555662739b in nra::solver::imp::check() ()
#14 0x000055555664d272 in nla::core::check() ()
#15 0x0000555555f86c2c in smt::theory_lra::imp::final_check_eh() ()
#16 0x0000555555fd71cb in smt::context::final_check() ()
#17 0x0000555555fd99f5 in smt::context::bounded_search() ()
#18 0x0000555555fda088 in smt::context::search() ()
#19 0x0000555555fda4d8 in smt::context::check(unsigned int, expr* const*, bool) ()
#20 0x00005555563f3e5f in solver_na2as::check_sat_core(unsigned int, expr* const*) ()
#21 0x0000555556419c4e in solver::check_sat(unsigned int, expr* const*) ()
#22 0x00005555563c43e7 in cmd_context::check_sat(unsigned int, expr* const*) ()
#23 0x00005555563ab29d in smt2::parser::operator()() ()
#24 0x00005555563935f0 in parse_smt2_commands(cmd_context&, std::basic_istream<char, std::char_traits<char> >&, bool, params_ref const&, char const*) ()
#25 0x00005555557b69fc in read_smtlib2_commands(char const*) ()
#26 0x000055555579a2fe in main ()

And it seems to not exit resultant

(gdb) finish
Run till exit from #0  0x0000555556e4bfdd in mpn_manager::mul(unsigned int const*, unsigned int, unsigned int const*, unsigned int, unsigned int*) const ()
0x0000555556df385d in mpz_manager<false>::big_mul(mpz const&, mpz const&, mpz&) ()
(gdb)
Run till exit from #0  0x0000555556df385d in mpz_manager<false>::big_mul(mpz const&, mpz const&, mpz&) ()
0x0000555556df65d1 in mpz_manager<false>::addmul(mpz const&, mpz const&, mpz const&, mpz&) ()
(gdb)
Run till exit from #0  0x0000555556df65d1 in mpz_manager<false>::addmul(mpz const&, mpz const&, mpz const&, mpz&) ()
0x0000555556d8a8ff in void polynomial::manager::imp::som_buffer::addmul_core<polynomial::polynomial, false>(mpz const&, polynomial::monomial const*, polynomial::polynomial const*) ()
(gdb)
Run till exit from #0  0x0000555556d8a8ff in void polynomial::manager::imp::som_buffer::addmul_core<polynomial::polynomial, false>(mpz const&, polynomial::monomial const*, polynomial::polynomial const*) ()
0x0000555556d93261 in polynomial::manager::imp::exact_div(polynomial::polynomial const*, polynomial::polynomial const*) ()
(gdb)
Run till exit from #0  0x0000555556d93261 in polynomial::manager::imp::exact_div(polynomial::polynomial const*, polynomial::polynomial const*) ()
0x0000555556da5845 in polynomial::manager::imp::resultant(polynomial::polynomial const*, polynomial::polynomial const*, unsigned int, obj_ref<polynomial::polynomial, polynomial::manager>&) ()
(gdb)
Run till exit from #0  0x0000555556da5845 in polynomial::manager::imp::resultant(polynomial::polynomial const*, polynomial::polynomial const*, unsigned int, obj_ref<polynomial::polynomial, polynomial::manager>&) ()
# gets stuck here

This is all on master as of now (253a724), so after the fix to the previous issue.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions