# Pt-deadlock stopped working with 'Use of uninitialized value $query\_text'

**URL:** <https://forums.percona.com/t/pt-deadlock-stopped-working-with-use-of-uninitialized-value-query-text/38094>\
**Category:** MySQL & MariaDB\
**Created:** [May 26, 2025, 10:37am UTC](https://forums.percona.com/t/pt-deadlock-stopped-working-with-use-of-uninitialized-value-query-text/38094 "2025-05-26T10:37:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![poltpolt](https://avatars.discourse-cdn.com/v4/letter/p/ee7513/32.png) [@poltpolt](https://forums.percona.com/u/poltpolt)\
**Post date:** [May 26, 2025, 10:37am UTC](https://forums.percona.com/t/pt-deadlock-stopped-working-with-use-of-uninitialized-value-query-text/38094/1 "2025-05-26T10:37:04Z")

</div>

Suddenly (possibly after upgrade)  
my percone-deadlock logger returns

Error getting SHOW ENGINE INNODB STATUS: Use of uninitialized value $query\_text in substitution (s///) at /usr/bin/pt-deadlock-logger line 4949.

percona-toolkit/noble,now 3.2.1-1 all [installed]  
MariaDB 10.11.11

the line 4949 seams fine:

4949 $query\_text =~ s/\s+$//;  
4950 $query\_text =~ s/\s+/ /g;

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [May 26, 2025, 1:57pm UTC](https://forums.percona.com/t/pt-deadlock-stopped-working-with-use-of-uninitialized-value-query-text/38094/2 "2025-05-26T13:57:19Z")

</div>

Hi @poltpolt,  
Please search our [public bugs tracker](https://jira.percona.com/) for a similar issue. If you don’t find anything, please open a new issue. Include a repeatable test case so our developers can reproduce the issue to fix the bug.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [May 26, 2025, 1:58pm UTC](https://forums.percona.com/t/pt-deadlock-stopped-working-with-use-of-uninitialized-value-query-text/38094/3 "2025-05-26T13:58:12Z")

</div>

Did you upgrade MariaDB or did you upgrade Percona Toolkit? If you upgraded the toolkit, try downgrading to previous version. If it works on older version, please include that in your report.

---

<div class="post-metadata">

**Author:** ![poltpolt](https://avatars.discourse-cdn.com/v4/letter/p/ee7513/32.png) [@poltpolt](https://forums.percona.com/u/poltpolt)\
**Post date:** [May 27, 2025, 9:26pm UTC](https://forums.percona.com/t/pt-deadlock-stopped-working-with-use-of-uninitialized-value-query-text/38094/4 "2025-05-27T21:26:02Z")

</div>

downgrading is not as simple as the whole upgrade to Ubuntu Server 24.04 has been done.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [May 27, 2025, 9:45pm UTC](https://forums.percona.com/t/pt-deadlock-stopped-working-with-use-of-uninitialized-value-query-text/38094/5 "2025-05-27T21:45:31Z")

</div>

> [@matthewb](#):
>
> Did you upgrade MariaDB or did you upgrade Percona Toolkit?

Which upgrade did you perform?

---

<div class="post-metadata">

**Author:** ![poltpolt](https://avatars.discourse-cdn.com/v4/letter/p/ee7513/32.png) [@poltpolt](https://forums.percona.com/u/poltpolt)\
**Post date:** [September 9, 2025, 9:16am UTC](https://forums.percona.com/t/pt-deadlock-stopped-working-with-use-of-uninitialized-value-query-text/38094/6 "2025-09-09T09:16:31Z")

</div>

i did dist-upgrade to upgrade from Ubuntu server 24.04, this upgraded mariadb and percona-toolkit.

Percona toolkit is in version 3.2.1-1 from official ubuntu repo added by percona-relaase utility  
and this pt-deadlock-logger --user=ptuser --password=“.perconarandompasswordonlyforlocals.” --host=“localhost”  
Error getting SHOW ENGINE INNODB STATUS: Use of uninitialized value $query\_text in substitution (s///) at /usr/bin/pt-deadlock-logger line 4949.returns  
`pt-deadlock-logger --user=ptuser --password=".perconarandompasswordonlyforlocals." --host="localhost" `  
`Error getting SHOW ENGINE INNODB STATUS: Use of uninitialized value $query_text in substitution (s///) at /usr/bin/pt-deadlock-logger line 4949.`

so i did apt purge percona-toolkit, downloaded the latest percona-toolkit package from [https://www.percona.com/percona-toolkit](https://www.percona.com/percona-toolkit)  
so now i have installed percona-toolit-3.7.0-2 that is the latest available there for ubuntu 24.04  
and i get  
`polrus@wi:~$ pt-deadlock-logger --version`  
`pt-deadlock-logger 3.7.0`  
`polrus@wi:~$ pt-deadlock-logger --user=ptuser --password=“.perconarandompasswordonlyforlocals.” --host=“localhost”`  
`Error getting SHOW ENGINE INNODB STATUS: Use of uninitialized value $query_text in substitution (s///) at /usr/bin/pt-deadlock-logger line 5051.`

in 5050 the error might be related to the fact that i use MariaDB and  
my ( $query\_text ) = $body =~ m/\nMySQL thread id .\*\n((?s).\*)/;  
will never be found

so i change it to  
my ( $query\_text ) = $body =~ m/\nMariaDB thread id .\*\n((?s).\*)/;

but now i get  
Error getting SHOW ENGINE INNODB STATUS: Argument “” isn’t numeric in numeric comparison (\<=\>) at /usr/bin/pt-deadlock-logger line 5200.

There seams to be some bug with percona-toolkit jira bugtracker - I keep getting error jira error suggesting to notify admin but i don’t have access to that

---

<div class="post-metadata">

**Author:** ![poltpolt](https://avatars.discourse-cdn.com/v4/letter/p/ee7513/32.png) [@poltpolt](https://forums.percona.com/u/poltpolt)\
**Post date:** [October 8, 2025, 12:14pm UTC](https://forums.percona.com/t/pt-deadlock-stopped-working-with-use-of-uninitialized-value-query-text/38094/7 "2025-10-08T12:14:24Z")

</div>

update to mariadb 11.8 solved the problem
