Buy Percona ServicesBuy Now!

pt-query-digest: MySQLProtocolParser caused an error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • pt-query-digest: MySQLProtocolParser caused an error

    I used to run this command:

    tcpdump -i lo port 3306 -s 65535 -x -n -q -tttt > pt.log; pt-query-digest --type=tcpdump pt.log

    But it stopped working for me. I cannot put my finger on the problem because I experience it on different Debian versions and different percona server versions, different percona-toolkit version and I can even reproduce with mariadb.

    The error I get:

    Pipeline process 4 (MySQLProtocolParser) caused an error: Argument "" isn't numeric in multiplication (*) at /usr/bin/pt-que
    ry-digest line 4505, <$fh> line 8.
    Will retry pipeline process 3 (MySQLProtocolParser) 100 more times.
    Pipeline process 4 (MySQLProtocolParser) caused an error: Argument "" isn't numeric in multiplication (*) at /usr/bin/pt-que
    ry-digest line 4505, <$fh> line 10.
    Will retry pipeline process 3 (MySQLProtocolParser) 99 more times.

    ...


    Will retry pipeline process 3 (MySQLProtocolParser) 1 more time.
    The pipeline caused an error: Pipeline process 4 (MySQLProtocolParser) caused an error: Argument "" isn't numeric in multipl
    ication (*) at /usr/bin/pt-query-digest line 4505, <$fh> line 210.
    Terminating pipeline because process 3 (MySQLProtocolParser) caused too many errors.

    What is wrong?

  • #2
    Hello,
    Could you share the dump file?

    Comment


    • #3
      I published a log which should contain only 1 query at https://ctors.net/pub/pt.log

      Comment


      • #4
        I am having this exact same problem. Interestingly, if I change the date on my computer's clock back to 2019 and collect a tcpdump, pt-query-digest has no problem parsing that file. But any file collected now with the correct date gives errors like tvlooy posted above. I can't seem to figure out why a new year might be throwing things off though.

        I have attached a 7z archive with two pcaps, one from last year (working), and one from today (not working). Remove the .txt extension.
        Last edited by lorraine.pocklington; 01-09-2020, 10:05 AM.

        Comment


        • #5
          Hi usafbeach, thanks for reporting, I'll bring it to the attention of the team.
          I have, though, deleted the attachment as we don't accept archive files. You can either leave it at that or you can use an external host for the pcaps
          Let's see if the team need them?

          Comment


          • #6
            Hi again, could you upload those pcaps to/as gist please? https://gist.github.com/
            Then I can get the dev team to review. THANKS!

            Comment


            • #7
              Hi Lorraine, thanks for the reply. Hopefully you don't mind, but it was easier to upload the files to a github repo instead:

              https://github.com/0xBEAKER/0xBEAKER...pdump2019.pcap
              https://github.com/0xBEAKER/0xBEAKER...pdump2020.pcap

              Comment


              • #8
                That should work too, I will ping the dev team

                Comment


                • #9
                  I had this same problem with a new pcap. I opened a small pcap in vim and changed all of the dates from '2020-01-08' to '2019-01-08'. pt-query-digest no longer errors.
                  We are too far into the future. Please make a time machine so we can go back a few years when pt-query-digest still worked. Or whatever you see fit.

                  Thank you

                  Comment


                  • #10
                    Hello,
                    There is a fix in progress. I think it is related to this issue: https://github.com/percona/percona-toolkit/pull/434

                    Comment


                    • #11
                      The fix works. Thanks a lot everyone!

                      Comment


                      • #12
                        The fix is already merged in the 3.0 branch and it will be released in the next version

                        Comment


                        • #13
                          Hey guys!
                          That method worked for me too for a while. Day 04 Fev was the last time I executed a pt-query-digest command and it worked fine!
                          Today, 07 Fev it returns me a new error and I didn't touch in anything. Its a crontab script.. the error is:

                          Pipeline process 3 (TcpdumpParser) caused an error: Use of uninitialized value $source in pattern match (m//) at /usr/bin/pt-query-digest line 3683, <$fh> chunk 1.
                          Will retry pipeline process 2 (TcpdumpParser) 100 more times.
                          TCP session 10.8.0.2:57218 had errors, will save them in /tmp/pt-query-digest-errors.L9yj1ui
                          Pipeline process 3 (TcpdumpParser) caused an error: Use of uninitialized value $source in pattern match (m//) at /usr/bin/pt-query-digest line 3683, <$fh> chunk 17.
                          Will retry pipeline process 2 (TcpdumpParser) 99 more times.


                          What should I do?
                          Its awkward...

                          Thank you!!

                          Comment


                          • #14
                            Hello,

                            That's a different error. I would need steps of a tcpdump file to reproduce it.
                            Could you provide it?

                            Thanks

                            Comment

                            Working...
                            X