gnuplot locks up plotting log(x**0.5)/log(x)

Bug #311236 reported by njh
4
Affects Status Importance Assigned to Milestone
gnuplot (Ubuntu)
Incomplete
Low
Unassigned

Bug Description

Binary package hint: gnuplot-nox

steps to recreate:
run gnuplot
plot [2:4] log(x**0.5)/log(x)
gnuplot goes into an infinite loop (can be control-C'd out).

There is nothing special about this function, it's clear that it can be reduced to simply:
plot [2:4] 0.5
as far as I know, there are no infinities, nans or other mysteries lurking in the function. The domain is well away from the poles around 0. Any simpler combination plots instantly (sqrt, log(x), log(x)/log(x), log(x*x)/log(x) etc all work fine)

$ apt-cache policy gnuplot-nox
gnuplot-nox:
  Installed: 4.2.3-1
  Candidate: 4.2.3-1
  Version table:
 *** 4.2.3-1 0
        500 http://us.archive.ubuntu.com intrepid/universe Packages
        100 /var/lib/dpkg/status

Description: Ubuntu 8.10
Release: 8.10

Changed in gnuplot:
status: New → Confirmed
Changed in gnuplot:
importance: Undecided → Low
status: Confirmed → Triaged
Revision history for this message
njh (njh-njhurst) wrote :

It's hard to imagine what a high importance bug for a plotting application might be if being unable to plot a simple, smooth function results in a lock up is considered low.

Revision history for this message
Nick Ellery (nick.ellery) wrote :

According to https://wiki.ubuntu.com/Bugs/Importance, Low bugs are those which affect functionality, but to a lesser extent than most bugs. While you may consider this a simple, smooth function, it requires specifically using 'log(x**0.5)/log(x)'. Changing this to log(x**0.6)/log(x) works perfectly fine. A 'high' bug would have to have a severe impact on the application, and this appears very moderate to me.

I've also reported this upstream.

Revision history for this message
njh (njh-njhurst) wrote :

yes, it is the sqrt operation which causes the problem. To me it suggests a more serious bug in the parser/compiler.

If it appears very moderate to you, why was it marked low? Surely that would be 'Medium'?

Thank you for upstreaming the bug.

Revision history for this message
Nick Ellery (nick.ellery) wrote :

Please see https://wiki.ubuntu.com/Bugs/Importance. I categorized this bug as 'A bug that has a moderate impact on a non-core application'. You could not say that this is 'A bug that has a severe impact on a non-core application. ', because that would mean it is largely unusable, which is definitely is not.

Revision history for this message
Tim Cole (tcole) wrote :

Would it be possible to link this bug with the upstream one?

Revision history for this message
Nick Ellery (nick.ellery) wrote :

gnuplot hasn't been registered as a project on Launchpad yet, which makes that not possible.

Revision history for this message
Ilya Barygin (randomaction) wrote :

gnuplot has a bug tracker at http://sourceforge.net/projects/gnuplot/ (bugs can be linked from there to Launchpad).

Revision history for this message
Nick Ellery (nick.ellery) wrote :

That's correct, but there is no project on Launchpad for gnuplot, which makes it not possible to create a bug watch. It is also specified to report bugs to the <email address hidden> mailing list in the gnuplot documentation, though I'm sure using the sourceforge bug tracker is fine.

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

I can't reproduce this in gnuplot_4.4.0-1. The function plots just fine, albeit with a small amount of noise from machine precision limits.

@njh - Does this still affect you with the new gnuplot package?

Changed in gnuplot (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
njh (njh-njhurst) wrote :

Yes, I concur, this bug is fixed! Thanks everyone for your efforts.

Revision history for this message
njh (njh-njhurst) wrote :

I spoke too soon. I can in fact reproduce the same hang with log(x**k)/log(x) for k in [2, 10, 100], perhaps minor changes have made the trigger case move around a little.

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Now this is weird... I just tried this again, using an i386 machine (I tested on amd64 yesterday) and I can confirm the original bug.

@njh - which platform are you using, please?

Revision history for this message
Alex Valavanis (valavanisalex) wrote :
Revision history for this message
njh (njh-njhurst) wrote :

I'm using an AMD Athlon(tm) 64 Processor 3800+ ubuntu 10.04

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

OK, which kernel architecture do you have? If you're not sure, please type "uname -a" in a terminal.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.