pt-deadlock-logger error: Use of uninitialized value $ts in pattern match (m//)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
High
|
Daniel Nichter | |
| 2.1 |
Fix Released
|
High
|
Daniel Nichter | |
| 2.2 |
Fix Released
|
High
|
Daniel Nichter |
Bug Description
A customer has reported a case where the deadlock information causes:
Use of uninitialized value $ts in pattern match (m//) at /usr/bin/
The lines around 4143:
4141 # Extract some miscellaneous data from the deadlock.
4142 my ( $ts ) = $dl_text =~ m/^$s$/m;
4143 my ( $year, $mon, $day, $hour, $min, $sec ) = $ts =~ m/^((?:
4144 if ( length($year) == 2 ) {
4145 $year += 2000;
4146 }
4147 $ts = sprintf(
4148 my ( $victim ) = $dl_text =~ m/^\*\*\* WE ROLL BACK TRANSACTION \((\d+)\)$/m;
4149 $victim ||= 0;
Related branches
- Daniel Nichter: Approve on 2013-06-26
-
Diff: 69 lines (+36/-0)3 files modifiedbin/pt-deadlock-logger (+5/-0)
t/pt-deadlock-logger/bugs.t (+17/-0)
t/pt-deadlock-logger/samples/bug_1195034.txt (+14/-0)
- Daniel Nichter: Approve on 2013-06-26
-
Diff: 69 lines (+36/-0)3 files modifiedbin/pt-deadlock-logger (+5/-0)
t/pt-deadlock-logger/bugs.t (+17/-0)
t/pt-deadlock-logger/samples/bug_1195034.txt (+14/-0)
Daniel Nichter (daniel-nichter) wrote : | #1 |
Changed in percona-toolkit: | |
status: | Confirmed → Fix Committed |
Shahriyar Rzayev (rzayev-sehriyar) wrote : | #2 |
Percona now uses JIRA for bug reports so this bug report is migrated to: https:/
The cause is timestamp lines like:
130624 17:39:24TOO DEEP OR LONG SEARCH IN THE LOCK TABLE WAITS-FOR GRAPH, WE WILL ROLL BACK FOLLOWING TRANSACTION
The code assumed that ts matched /^<ts>$/. Now when this fails, we try to match /^<ts>TOO DEEP/.