major / MySQLTuner-perl

MySQLTuner is a script written in Perl that will assist you with your MySQL configuration and make recommendations for increased performance and stability.
GNU General Public License v3.0
8.94k stars 1.29k forks source link

Illegal division by zero at /usr/bin/mysqltuner line 6099 #715

Closed chriscroome closed 1 year ago

chriscroome commented 1 year ago

Using the Debian Bookworm version of mysqltuner, 1.9.9, which is currently the latest version, in a Docker container via Molecule run using GitLab CI, results in this failure:

fatal: [localhost]: FAILED! => 
    changed: false
    cmd:
    - mysqltuner
    - --json
    - --cvefile=/usr/share/mysqltuner/vulnerabilities.csv
    delta: '0:00:15.420839'
    end: '2023-08-24 08:26:59.018572'
    failed_when_result: true
    invocation:
        module_args:
            _raw_params: mysqltuner --json --cvefile=/usr/share/mysqltuner/vulnerabilities.csv
            _uses_shell: false
            argv: null
            chdir: null
            creates: null
            executable: null
            removes: null
            stdin: null
            stdin_add_newline: true
            strip_empty_ends: true
    msg: non-zero return code
    rc: 255
    start: '2023-08-24 08:26:43.597733'
    stderr: |-
        Illegal division by zero at /usr/bin/mysqltuner line 6099 (#1)
            (F) You tried to divide a number by 0.  Either something was wrong in
            your logic, or you need to put a conditional in to guard against
            meaningless input.
        Uncaught exception from user code:
                Illegal division by zero at /usr/bin/mysqltuner line 6099.
                main::mysql_innodb() called at /usr/bin/mysqltuner line 6843
    stderr_lines: <omitted>
    stdout: ''
    stdout_lines: <omitted>

MariaDB is running in the container, any suggestions regarding how I could try to debug this?

jmrenouard commented 1 year ago

Release v2.2.12 published: https://github.com/major/MySQLTuner-perl/releases/tag/v2.2.12

This version will fix this issue

jmrenouard commented 1 year ago

Thanks @chriscroome for reporting this issue