pt-table-checksum Illegal division by zero at line 7950

Bug #1075638 reported by Gert van Dijk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Fix Released
Medium
Brian Fraser

Bug Description

While running pt-table-checksum on a machine with singe-master, single-slave setup, I *sometimes* run into a bunch of these errors:

Error checksumming table scheme_name.table_name: Illegal division by zero at /usr/bin/pt-table-checksum line 7950.
11-06T17:47:56 1 0 141 1 0 0.004 scheme_name.table_name

In a test/lab setup, copied over the whole database, I was unable to reproduce this. It seems the production enviroment with older/slower hardware with more load as a result triggers this. Re-running on the same server doesn't always trigger it, so it seems. Because it is usually a meaningless error for the sysadmin and it will be checksummed in the next run anyway, it generates a lot of unwanted noise in the cron output.

Installation details:
Ubuntu 12.04.1 running plain MySQL server 5.5.28-0ubuntu0.12.04.2, Percona toolkit 2.1.5 (upstream repository), ~ 8600 InnoDB tables and < 100 MyISAM.

The simplest table affected here:

CREATE TABLE `table_name` (
  `col1` int(10) unsigned NOT NULL DEFAULT '0',
  `col2` int(10) unsigned NOT NULL DEFAULT '0',
  KEY `key1` (`col1`),
  KEY `key2` (`col2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC

Related branches

Revision history for this message
Brian Fraser (fraserbn) wrote :

While probably caused by something entirely different, this and the ptc part of https://bugs.launchpad.net/percona-toolkit/+bug/1050737 hit the same error in the same part of the code: When the time to nibble a table is (reported as) zero, ptc will start dividing by zero.

Changed in percona-toolkit:
status: New → Triaged
Brian Fraser (fraserbn)
tags: added: crash pt-table-checksum
Brian Fraser (fraserbn)
Changed in percona-toolkit:
assignee: nobody → Brian Fraser (fraserbn)
status: Triaged → In Progress
Brian Fraser (fraserbn)
Changed in percona-toolkit:
milestone: none → 2.1.7
Changed in percona-toolkit:
milestone: 2.1.7 → 2.1.8
Changed in percona-toolkit:
importance: Undecided → Medium
Brian Fraser (fraserbn)
Changed in percona-toolkit:
status: In Progress → Fix Committed
summary: - Illegal division by zero at pt-table-checksum line 7950
+ pt-table-checksum Illegal division by zero at line 7950
Changed in percona-toolkit:
status: Fix Committed → Fix Released
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-593

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.