Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pybench prep_times calculation error #56104

Closed
termim mannequin opened this issue Apr 21, 2011 · 3 comments
Closed

pybench prep_times calculation error #56104

termim mannequin opened this issue Apr 21, 2011 · 3 comments
Labels
topic-installation type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@termim
Copy link
Mannequin

termim mannequin commented Apr 21, 2011

BPO 11895
Nosy @malemburg, @jcea, @termim, @sandrotosi
Files
  • pybench.patch: divide prep_times by CALIBRATION_LOOPS
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2011-06-26.13:30:27.298>
    created_at = <Date 2011-04-21.03:20:12.482>
    labels = ['expert-installation', 'type-crash']
    title = 'pybench prep_times calculation error'
    updated_at = <Date 2011-06-26.13:30:27.297>
    user = 'https://github.com/termim'

    bugs.python.org fields:

    activity = <Date 2011-06-26.13:30:27.297>
    actor = 'sandro.tosi'
    assignee = 'none'
    closed = True
    closed_date = <Date 2011-06-26.13:30:27.298>
    closer = 'sandro.tosi'
    components = ['Demos and Tools', 'Installation']
    creation = <Date 2011-04-21.03:20:12.482>
    creator = 'termim'
    dependencies = []
    files = ['21745']
    hgrepos = []
    issue_num = 11895
    keywords = ['patch']
    message_count = 3.0
    messages = ['134192', '134204', '134366']
    nosy_count = 5.0
    nosy_names = ['lemburg', 'jcea', 'termim', 'sandro.tosi', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue11895'
    versions = ['Python 3.2']

    @termim
    Copy link
    Mannequin Author

    termim mannequin commented Apr 21, 2011

    For some time now my builds of python 3.2 on x86_64 platform in SuSE OBS are failing depending on the phase of the moon. The spec file for the python3-base package uses 'make profile-opt' command to build and Makefile.pre.in uses pybench.py for profile guided optimization. The pybench.py fails sometimes with the '* Internal Error (use --debug to display the traceback)' error. Adding --debug gives 'calibration setup did not work' i.e. some of the self.overhead_times values in the Test.calibrate_test method became negative. It happens for the NestedForLoops test. The source inspection shows that most probably it was forgotten to divide by CALIBRATION_LOOPS when calculating prep_times. The patch against current head is attached, it solves the problem.

    @termim termim mannequin added topic-installation type-crash A hard crash of the interpreter, possibly with a core dump labels Apr 21, 2011
    @malemburg
    Copy link
    Member

    Mikhail Terekhov wrote:

    New submission from Mikhail Terekhov <termim@gmail.com>:

    For some time now my builds of python 3.2 on x86_64 platform in SuSE OBS are failing depending on the phase of the moon. The spec file for the python3-base package uses 'make profile-opt' command to build and Makefile.pre.in uses pybench.py for profile guided optimization. The pybench.py fails sometimes with the '* Internal Error (use --debug to display the traceback)' error. Adding --debug gives 'calibration setup did not work' i.e. some of the self.overhead_times values in the Test.calibrate_test method became negative. It happens for the NestedForLoops test. The source inspection shows that most probably it was forgotten to divide by CALIBRATION_LOOPS when calculating prep_times. The patch against current head is attached, it solves the problem.

    Good catch. Your analysis is correct.

    Interesting that it took more than
    6 years to discover this bug... looks like CPUs got more than
    20 times faster since back then.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Apr 25, 2011

    New changeset e4fcfb8066ff by Jesus Cea in branch '2.7':
    pybench prep_times calculation error (closes bpo-11895)
    http://hg.python.org/cpython/rev/e4fcfb8066ff

    New changeset 7569870a8236 by Jesus Cea in branch '3.1':
    pybench prep_times calculation error (closes bpo-11895)
    http://hg.python.org/cpython/rev/7569870a8236

    New changeset 66ef5e844e6c by Jesus Cea in branch '3.2':
    pybench prep_times calculation error (closes bpo-11895)
    http://hg.python.org/cpython/rev/66ef5e844e6c

    New changeset 8a277949d904 by Jesus Cea in branch 'default':
    pybench prep_times calculation error (closes bpo-11895)
    http://hg.python.org/cpython/rev/8a277949d904

    @python-dev python-dev mannequin closed this as completed Apr 25, 2011
    @jcea jcea reopened this Apr 25, 2011
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    topic-installation type-crash A hard crash of the interpreter, possibly with a core dump
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants