LP #887638: pt-query-digest prints negative byte offset

Description

**Reported in Launchpad by Richard Lynch last update 14-01-2013 22:18:33

I have added the requested information to the original bug report, whose status I can't change...

http://code.google.com/p/maatkit/issues/detail?id=1352

Environment

None

Smart Checklist

Activity

Show:

lpjirasync January 24, 2018 at 5:12 PM

**Comment from Launchpad by: Brian Fraser on: 15-11-2012 18:27:42

While I wasn't able to reproduce this with a real world test case, I'm pretty sure I nailed down the cause: The printf format %d, which we use for the at byte output, is documented to return whatever the underlaying C implementation would return, so for a large enough index on a 32-bit machine, the values would wrap around.
The other possible cause of breakage would be tell() misbehaving on a large file, but I have no clue how to test that, and there's few chances of a workaround in any case; If someone does manage to reproduce this even with the fix in the attached branch, please create a new bug report!

lpjirasync January 24, 2018 at 5:12 PM

**Comment from Launchpad by: Richard Lynch on: 08-11-2012 22:46:22

I think the original was on RHEL 5 32-bit...

I realized that Drupal queries were not the issue, and moved on with life, I'm afraid...

I'll try to reproduce with the same box I was on before.

Perhaps other fixes purged this one.

lpjirasync January 24, 2018 at 5:12 PM

**Comment from Launchpad by: Brian Fraser on: 08-11-2012 12:09:34

Gosh, this one fell through the cracks. Running this now, I can't seem able to reproduce it; I tried pqd 1.0.2 and 2.1.5 against the 900MB log file, on Ubuntu 12 (64 bits), Debian 6 (32 bits, VM) and CentOS 5 (64 bits, VM), and all show positive byte offsets. However, I doubt that it was fixed – Is anyone still seeing this?

lpjirasync January 24, 2018 at 5:12 PM

**Comment from Launchpad by: Daniel Nichter on: 16-12-2011 16:42:35

Basic summary of problem: pt-query-digest can print:

  1. Query 1: 0.08 QPS, 0.03x concurrency, ID 0xC94C6BB4AC84C91A at byte -2135329898

The "at byte" is wrong.

Done

Details

Assignee

Reporter

Priority

Smart Checklist

Created January 24, 2018 at 5:11 PM
Updated January 24, 2018 at 5:12 PM
Resolved January 24, 2018 at 5:12 PM