Skip Menu |

This queue is for tickets about the Math-Prime-Util CPAN distribution.

Maintainer(s)' notes

The latest version is in https://github.com/danaj/Math-Prime-Util

    git clone --origin upstream git://github.com/danaj/Math-Prime-Util.git Math-Prime-Util

Comments, issues, and patches are welcome at either RT or github, or send me email.

Report information
The Basics
Id: 121184
Status: resolved
Priority: 0/
Queue: Math-Prime-Util

People
Owner: DANAJ [...] cpan.org
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.64



Subject: t/81-bignum.t may hang (0.62)
On some of my smokers 81-bignum.t hangs in a busy loop, eventually killed by exhausting the CPU limit configured here (3600s). Log looks like this: ... # BigInt 0.46/1.999811, lib: GMP. MPU::GMP 0.44 t/81-bignum.t ................ Failed 8/133 subtests ... I checked if there are some patterns regardning BigInt or GMP versions, but did find any.
On Sun Apr 16 08:59:11 2017, SREZIC wrote: Show quoted text
> On some of my smokers 81-bignum.t hangs in a busy loop, eventually > killed by exhausting the CPU limit configured here (3600s). > > Log looks like this: > > ... > # BigInt 0.46/1.999811, lib: GMP. MPU::GMP 0.44 > t/81-bignum.t ................ > Failed 8/133 subtests > ... > > I checked if there are some patterns regardning BigInt or GMP > versions, but did find any.
Thank you very much for the report. I was dismayed to see all the failures this morning as I'd tested on over 10 machines and 20 versions of Perl before releasing. More detail at https://github.com/danaj/Math-Prime-Util/issues/22 I cannot reproduce on any machine, and don't understand why we're not trapping on the negative input like it does on every platform and version of Perl I have. Sadly this then triggers a signed/unsigned mismatch with the GMP code and it tries to do 2^64 Miller-Rabin tests (it also could use the same shortcut that exists in the XS and PP code). I'll try to fix asap.
A new version of the GMP backend just got pushed which ought to fix this. I will be working on a workaround for this module as well.
New versions of both this module and the GMP back end have been released, but I'm still seeing a raft of test failures. Unfortunately I have no idea *what* is failing, and I cannot get any version of Perl or platform I have access to to fail. I got a AWS FreeBSD machine and it runs just fine. As does NetBSD, AIX, Windows, Cygwin, and more. Is the error behaviour still a hang in this test, or has it moved to something else? Any chance you could see which test is the last successful run? This is driving me completely crazy. Thanks.
On 2017-04-16 21:20:36, DANAJ wrote: Show quoted text
> New versions of both this module and the GMP back end have been > released, but I'm still seeing a raft of test failures. Unfortunately > I have no idea *what* is failing, and I cannot get any version of Perl > or platform I have access to to fail. I got a AWS FreeBSD machine and > it runs just fine. As does NetBSD, AIX, Windows, Cygwin, and more.
On my systems it looks like this: * passes on all Debian systems (wheezy, jessie, stretch) * passes on the Ubuntu 16.04 smoker * passes on Mac OS X * fails with some perl versions on FreeBSD 9 + 10 * fails with all installed perl versions (5.24.0 .. 5.25.11) on CentOS7 Show quoted text
> Is the error behaviour still a hang in this test, or has it moved to > something else? Any chance you could see which test is the last > successful run? This is driving me completely crazy.
Currently it does not hang anymore, but fails like this: ... ok 127 - MRR(n,0) = 1 ok 128 - MRR(61,17) = 1 ok 129 - MRR(62,17) = 0 Usage: Math::Prime::Util::GMP::miller_rabin_random(strn, nbases, seedstr= 0) at t/81-bignum.t line 381. # Looks like your test exited with 2 just after 129.
On Mon Apr 17 04:34:28 2017, SREZIC wrote: Show quoted text
> > On my systems it looks like this: > * passes on all Debian systems (wheezy, jessie, stretch) > * passes on the Ubuntu 16.04 smoker > * passes on Mac OS X > * fails with some perl versions on FreeBSD 9 + 10 > * fails with all installed perl versions (5.24.0 .. 5.25.11) on > CentOS7
Thanks. I've run it on FreeBSD 9 and CentOS 7, so it's not just the O/S. I'm going to try again on CentOS with 5.25.11. Show quoted text
> ok 129 - MRR(62,17) = 0 > Usage: Math::Prime::Util::GMP::miller_rabin_random(strn, nbases, > seedstr= 0) at t/81-bignum.t line 381. > # Looks like your test exited with 2 just after 129.
I'm guessing that on those systems 'use bigint' is making objects of a different type, making the XS code punt to GMP. At which point it finds another API mismatch. Good and bad... New versions coming soon.
On 2017-04-17 04:58:08, DANAJ wrote: Show quoted text
> On Mon Apr 17 04:34:28 2017, SREZIC wrote:
> > > > On my systems it looks like this: > > * passes on all Debian systems (wheezy, jessie, stretch) > > * passes on the Ubuntu 16.04 smoker > > * passes on Mac OS X > > * fails with some perl versions on FreeBSD 9 + 10 > > * fails with all installed perl versions (5.24.0 .. 5.25.11) on > > CentOS7
> > Thanks. I've run it on FreeBSD 9 and CentOS 7, so it's not just the > O/S. I'm going to try again on CentOS with 5.25.11. >
> > ok 129 - MRR(62,17) = 0 > > Usage: Math::Prime::Util::GMP::miller_rabin_random(strn, nbases, > > seedstr= 0) at t/81-bignum.t line 381. > > # Looks like your test exited with 2 just after 129.
> > I'm guessing that on those systems 'use bigint' is making objects of a > different type, making the XS code punt to GMP. At which point it > finds another API mismatch. Good and bad... > > New versions coming soon.
0.64 looks good. The 81-bignum.t test does not fail anymore. (There's another issue with t/26-pillai.t and debugging perls @ freebsd 9, but this one seems unrelated)
On Mon Apr 17 12:25:18 2017, SREZIC wrote: Show quoted text
> > 0.64 looks good. The 81-bignum.t test does not fail anymore. > > (There's another issue with t/26-pillai.t and debugging perls @ > freebsd 9, but this one seems unrelated)
Thanks. It looks like the previous issue was caused by installing Math-BigInt-Lite, which changes the way the core 'bigint' module behaves ever after. I'm not sure if that's a good thing for test boxes to have or not. I'll try building a debugging Perl on a FreeBSD 9 system later to see if I can find anything. I noticed in testing with forced XS failure that the pillai tests were taking a very long time, mainly because using Perl for those computations is just gawdawful slow. But both the test and the Perl code think we have XS running so they try, thinking it will be fast. I also see Nigel's 5.8 boxes are failing as well.