pt-query-digest --group-by db may crash profile report
Bug #924950 reported by
Daniel Nichter
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Medium
|
Daniel Nichter |
Bug Description
Jay encountered a bug when using pt-query-digest and --group-by db: the profile report crashed,
sub metrics {
my ( $self, %args ) = @_;
foreach my $arg ( qw(attrib where) ) {
die "I need a $arg argument" unless $args{$arg};
}
because where was "" (blank string). This was probably due to queries with no default db (e.g. admin commands). Jay was using pt-query-digest 2.0.2, but the bug probably exists in all older versions too.
Changing the die line to "unless defined" fixed the problem in the field.
Because this bug crashes a report, it causes this infinite loop: https:/
Related branches
lp:~percona-toolkit-dev/percona-toolkit/pqd-group-by-bug-924950
- Daniel Nichter: Approve
-
Diff: 223 lines (+84/-12)7 files modifiedbin/pt-query-digest (+5/-5)
lib/EventAggregator.pm (+1/-1)
lib/QueryReportFormatter.pm (+4/-4)
t/lib/EventAggregator.t (+16/-1)
t/lib/samples/slowlogs/slow055.txt (+15/-0)
t/pt-query-digest/samples/slow055.txt (+30/-0)
t/pt-query-digest/slowlog_analyses.t (+13/-1)
tags: | added: infinite-loop pt-query-digest risk |
Changed in percona-toolkit: | |
status: | New → Confirmed |
description: | updated |
Changed in percona-toolkit: | |
importance: | Undecided → Medium |
status: | Confirmed → In Progress |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I think I fixed this--the infinite loop--already for another bug. Need to verify.