mktemp error with pt-stalk

Bug #986151 reported by Olivier Doucet
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Fix Released
Medium
Daniel Nichter
2.0
Fix Released
Medium
Daniel Nichter
2.1
Fix Released
Medium
Daniel Nichter

Bug Description

When using pt-stalk on Linux, mktemp throws an error :

mktemp: cannot make temp dir /tmp/pt-stalk.2367.XXXXX: Invalid argument

Then program exits.

PTDEBUG=1 does not show anything else :(

After stracing process, it appears command line used is the following :

mktemp -d "/tmp/pt-stalk.2367.XXXXX"

I was able to solve the problem by adding an extra X at the end :

mktemp -d "/tmp/pt-stalk.2367.XXXXXX"
/tmp/pt-stalk.2367.Hi0RXV

mktemp -V
mktemp version 1.5

./pt-stalk --version
pt-stalk 2.1.1

Linux XXXX 2.6.36 SMP x86_64

Related branches

Revision history for this message
Olivier Doucet (odoucet) wrote :

I get the same error on every tool that used mktemp (for example pt-mext)

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Which OS? This seems to vary depending on the OS: some accept fewer X than others.

tags: added: crash pt-stalk
Revision history for this message
Olivier Doucet (odoucet) wrote :

This is a Linux from Scratch.
bash, version 3.2.8(1)-release
mktemp version 1.5

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

I can't reproduce this on our standard testing platforms, but I'll take your word for it. Adding another X to mktemp won't affect the tools in any case because they only care about the resulting tmp dir, no matter how many random chars it has.

tags: added: sys-cmd
Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Olivier, can you test one of the tools from the linked branches? They have 6 Xs now, so they should work on your system.

Revision history for this message
Olivier Doucet (odoucet) wrote :

Hi Daniel,

Tools were tested successfully. Patch is OK.

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Thanks Olivier.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-520

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.