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

usafbeachusafbeach EntrantActive Member Contributor
edited April 1 in Percona Toolkit

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: https://github.com/0xBEAKER/0xBEAKER.github.io/blob/master/files/pdns_crash_create_and_query.pcap

Works fine: https://github.com/0xBEAKER/0xBEAKER.github.io/blob/master/files/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

Answers

  • lorraine.pocklingtonlorraine.pocklington Percona Community Manager Reader Mentor
    Hello @usafbeach
    I checked in with the team here. They believe it's related to this Jira issue https://jira.percona.com/browse/PT-1793
    If that's the case, then it's likely that it will be fixed for you in the next release, which should be within the next few days. If you want to be notified for sure, then the best thing to do would be to become a 'watcher' on that Jira issue, then you should get alerted to the fix. 
    Hope this helps?
  • usafbeachusafbeach Entrant Active Member Contributor
    Hi @lorraine.pocklington ,
    Thanks so much for the reply. I was aware of the previous JIRA issue you mentioned (in fact, I was one of the early commentators on this forum that pointed out it seemed to be related to the year, although I couldn't figure out why - https://forums.percona.com/discussion/comment/55173#Comment_55173).
    I do believe this may in fact be a different problem - I've tried setting my date back to 2019 (which was the trick I used before to overcome the issue in PT-1793), however I still get the same error results as above.
  • PeterPeter Percona CEO Percona Moderator
    I'd  suggest to create a minimal pcap file which reproduces the problem and file the bug.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.