pt-query-digest 2.2 prints unwanted debug info on tcpdump parsing errors

Reported by Michael Renner on 2013-03-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit
Medium
Brian Fraser

Bug Description

Version 2.2.1 of pt-query-digest has a troubling regression compared to earlier versions where it will produce lots of unwanted debug output when it encounters errors in it's input.

-rw------- 1 root root 27M Mär 26 13:07 pt-query-digest-errors.mLQjSNN
-rw------- 1 root root 15M Mär 26 13:03 pt-query-digest-errors.qnhJxnC
-rw------- 1 root root 17M Mär 26 13:11 pt-query-digest-errors.qzRLjh0

[..]

Session 192.168.2.58:43498 had errors, Reason: got an unexpected EOF packet, will save them in /tmp/pt-query-digest-errors.qzRLjh0
Session 192.168.2.55:34050 had errors, Reason: got an unexpected EOF packet, will save them in /tmp/pt-query-digest-errors.qzRLjh0
Session 192.168.2.220:34170 had errors, Reason: got an unexpected EOF packet, will save them in /tmp/pt-query-digest-errors.qzRLjh0
Session 192.168.2.56:52370 had errors, Reason: got an unexpected EOF packet, will save them in /tmp/pt-query-digest-errors.qzRLjh0
Session 192.168.3.71:37314 had errors, Reason: got an unexpected EOF packet, will save them in /tmp/pt-query-digest-errors.qzRLjh0

[..]

This boils down to the fail_session rewrite in http://bazaar.launchpad.net/~percona-toolkit-dev/percona-toolkit/2.2/revision/530.3.6.

The destined _no_save_error flag isn't hooked up anywhere and can't be used without hacking the source by hand.

Daniel Nichter (daniel-nichter) wrote :

Thanks for reporting this. We did change how pqd handles tcpdump parsing errors in 2.2. We'll look into this and fix it soon in the next release, 2.2.2.

summary: - pt-query-digest produces lots of unwanted debug output
+ pt-query-digest 2.2 prints unwanted debug info on tcpdump parsing errors
tags: added: pt-query-digest
Changed in percona-toolkit:
importance: Undecided → Medium
milestone: none → 2.2.2
status: New → Triaged
Brian Fraser (fraserbn) on 2013-04-02
Changed in percona-toolkit:
assignee: nobody → Brian Fraser (fraserbn)
tags: added: spam
Brian Fraser (fraserbn) on 2013-04-16
Changed in percona-toolkit:
status: Triaged → Fix Committed
Brian Fraser (fraserbn) wrote :

This was fixed in three ways. First, we only warn once, so that should keep the spam to a minimum. Second, the "warning" is now actually a warning and goes to stderr, so it should be simpler to silence. Finally, we now support changing the error file's location through the PERCONA_TOOLKIT_TCP_ERRORS_FILE environment variable, so errors can be entirely ignored by setting PERCONA_TOOLKIT_TCP_ERRORS_FILE to /dev/null.

Michael Renner (robe) wrote :

This will still create unwanted & unnecessary files in /tmp and noise on STDERR.

The /tmp files can be mitigated by setting PERCONA_TOOLKIT_TCP_ERRORS_FILE to /dev/null but I don't really enjoy having to introduce yet another "2>&1 | grep -v ..." cronjob suffix to restore intended behavior.

Could you consider dumping/warning about the tcpdump parse errors only when PTDEBUG is present or introducing a command line flag which prevents those errors? If not the new behaviour would still be a regression compared to pre-2.2 pt-query-digest versions and cause issues in all environments where pt-query-digest is part of an automated process/pipeline.

Changed in percona-toolkit:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers