pt-query-digest: Use of initialized value $types[0]

Description

This is not a repeat of PT-1793.

When running pt-query-digest on a certain type of database query, I receive the following error. If I run other types of queries, the error does not appear:

The pipeline caused an error: Pipeline process 4 (MySQLProtocolParser) caused an error: Use of uninitialized value $types[0] in hash element at /usr/local/bin/pt-query-digest line 4847, <$fh> line 5343.

Terminating pipeline because process 3 (MySQLProtocolParser) caused too many errors.

I have uploaded two pcaps to github, one with queries that pt-query-digest crashes on, and another from the same system with only queries that work fine. For context, this is a powerdns server. Queries that involve some combination of updating and reading the database are crashing it, while queries that only read from the database (no updates) seem to work fine.

Crashes pt-query-digest: pdns_crash_create_and_query.pcap

Works fine: pdns_only_queries.pcap

Additional info:

Tcpdump command used to collect data:

sudo tcpdump -s 65535 -x -nn -q -tttt -i ens33 tcp port 3306 > tcpdump.pcap

pt-query-digest command:

pt-query-digest --type tcpdump tcpdump.pcap --timeline --no-report

Environment

Ubuntu 18.04

Attachments

2

Smart Checklist

Activity

Lalit Choudhary July 6, 2020 at 11:07 AM

 

Hi

Thank you for the report.

 

 

 

 

Details

Assignee

Reporter

Priority

Affects versions

Fix versions

Smart Checklist

Created May 30, 2020 at 10:47 PM
Updated February 29, 2024 at 8:58 PM