pt-upgrade error: Use of uninitialized value in printf

Bug #1657611 reported by Edwin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Confirmed
Undecided
Unassigned

Bug Description

We executed pt-upgrade applying work load queries, when the query has some non-printable characters like Japanese/Chinese characters, it will fire error: Use of uninitialized value in printf like below:

Error reporting query class **************: Use of uninitialized value in printf at /usr/bin/pt-upgrade line 6074, <> line 15998736.

$VAR1 = {
  discarded => 0,
  errors => [],
  failures => [
    [
      'INSERT INTO metadata_freeform_string_value (string_value_id,string_value,string_value_hash,creation_action_id) VALUES(11272,\'TRICS - \u30af\u30ed\u30c3\u30af\u7cbe\u5ea6(\u4f4d\u76f8\u30ce\u30a4\u30ba=\u30af\u30ed\u30c3\u30af\u30b8\u30c3\u30bf)\u304cGPS\u306e\u4f4d\u7f6e\u7cbe\u5ea6\u306b\u5927\u304d\u304f\u5f71\u97ff - ni\',-1605749910,54024972)',
      'DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`ni`.`metadata_freeform_string_value`, CONSTRAINT `_metadata_freeform_string_value_ibfk_1` FOREIGN KEY (`creation_action_id`) REFERENCES `action_log` (`action_id`)) [for Statement "INSERT INTO metadata_freeform_string_value (string_value_id,string_value,string_value_hash,creation_action_id) VALUES(11272,\'TRICS - \u30af\u30ed\u30c3\u30af\u7cbe\u5ea6(\u4f4d\u76f8\u30ce\u30a4\u30ba=\u30af\u30ed\u30c3\u30af\u30b8\u30c3\u30bf)\u304cGPS\u306e\u4f4d\u7f6e\u7cbe\u5ea6\u306b\u5927\u304d\u304f\u5f71\u97ff - ni\',-1605749910,54024972)"]',
      'DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`ni`.`metadata_freeform_string_value`, CONSTRAINT `_metadata_freeform_string_value_ibfk_1` FOREIGN KEY (`creation_action_id`) REFERENCES `action_log` (`action_id`)) [for Statement "INSERT INTO metadata_freeform_string_value (string_value_id,string_value,string_value_hash,creation_action_id) VALUES(11272,\'TRICS - \u30af\u30ed\u30c3\u30af\u7cbe\u5ea6(\u4f4d\u76f8\u30ce\u30a4\u30ba=\u30af\u30ed\u30c3\u30af\u30b8\u30c3\u30bf)\u304cGPS\u306e\u4f4d\u7f6e\u7cbe\u5ea6\u306b\u5927\u304d\u304f\u5f71\u97ff - ni\',-1605749910,54024972)"]'
    ],
    [
      'INSERT INTO metadata_freeform_string_value (string_value_id,string_value,string_value_hash,creation_action_id) VALUES(11273,\'[Hardware] USRP [Software] LabVIEW [Application] RF,GPS [Technical Issue] GPS\u306e\u4f4d\u7f6e\u7cbe\u5ea6\u304c\u3070\u3089\u3064\u304f [Solution] \u30b3\u30e1\u30f3\u30c8\u53c2\u7167\u3002 [\u6dfb\u4ed8] \u7121\u3057 [\u30b3\u30e1\u30f3\u30c8] GPS\u4fe1\u53f7\u306e\u8a18\u9332\u518d\u751f\u3092USRP2920(\u30af\u30ed\u30c3\u30af\u7cbe\u5ea6\u306e\u60aa\u3044\u65b9\u306eUSRP)\u3067\u3084\u308b\u3068\u3001\u4f4d\u7f6e\u7cbe\u5ea6\u304c\u3070\u3089\u3064\u304f\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3057\u305f\u3002 \u30d7\u30ed\u30b0\u30e9\u30e0\u306fUSRP\u306eR&P\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 VI\u306f\u4ee5\u4e0b\u3067\u3059\u3002 http://forums.ni.com/t5/Software-Defined-Radio/RF-Record-and-Playback-with-NI-USRP/ta-p/3535243 VI\u306e\u8aac\u660e\u306e\u30ea\u30f3\u30af\u3067\u3059\u3002 http://www.ni.com/white-paper/13881/ja/#toc1 [\u624b\u9806] (1)\u5ea7\u6a19\u304c\u56fa\u5b9a\u3055\u308c\u305fGPS\u4fe1\u53f7\u3092GPS\u30c4\u30fc\u30eb\u30ad\u30c3\u30c8+VST\u3092\u4f7f\u7528\u3057\u3066\u9001\u4fe1\u3057\u3001USRP2920\u3067\u53d7\u4fe1\u3057\u3066\u3001\u30ec\u30b3\u30fc\u30c9\u3002 (2)\u30ec\u30b3\u30fc\u30c9\u3057\u305fGPS\u4fe1\u53f7\u3092USRP2920\u3067\u30d7\u30ec\u30a4\u30d0\u30c3\u30af\u3057\u3066\u3001GPS\u53d7\u4fe1\u6a5f(u-blox\u306eEVK-5H)\u3067\u53d7\u4fe1\u3002 (3)u-blo...\',-1107216618,54024972)',
      'DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`ni`.`metadata_freeform_string_value`, CONSTRAINT `_metadata_freeform_string_value_ibfk_1` FOREIGN KEY (`creation_action_id`) REFERENCES `action_log` (`action_id`)) [for Statement "INSERT INTO metadata_freeform_string_value (string_value_id,string_value,string_value_hash,creation_action_id) VALUES(11273,\'[Hardware] USRP [Software] LabVIEW [Application] RF,GPS [Technical Issue] GPS\u306e\u4f4d\u7f6e\u7cbe\u5ea6\u304c\u3070\u3089\u3064\u304f [Solution] \u30b3\u30e1\u30f3\u30c8\u53c2\u7167\u3002 [\u6dfb\u4ed8] \u7121\u3057 [\u30b3\u30e1\u30f3\u30c8] GPS\u4fe1\u53f7\u306e\u8a18\u9332\u518d\u751f\u3092USRP2920(\u30af\u30ed\u30c3\u30af\u7cbe\u5ea6\u306e\u60aa\u3044\u65b9\u306eUSRP)\u3067\u3084\u308b\u3068\u3001\u4f4d\u7f6e\u7cbe\u5ea6\u304c\u3070\u3089\u3064\u304f\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3057\u305f\u3002 \u30d7\u30ed\u30b0\u30e9\u30e0\u306fUSRP\u306eR&P\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 VI\u306f\u4ee5\u4e0b\u3067\u3059\u3002 http://forums.ni.com/t5/Software-Defined-Radio/RF-Record-and-Playback-with-NI-USRP/ta-p/3535243 VI\u306e\u8aac\u660e\u306e\u30ea\u30f3\u30af\u3067\u3059\u3002 http://www.ni.com/white-paper/13881/ja/#toc1 [\u624b\u9806] (1)\u5ea7\u6a19\u304c\u56fa\u5b9a\u3055\u308c\u305fGPS\u4fe1\u53f7\u3092GPS\u30c4\u30fc\u30eb\u30ad\u30c3\u30c8+VST\u3092\u4f7f\u7528\u3057\u3066\u9001\u4fe1\u3057\u3001USRP2920\u3067\u53d7\u4fe1\u3057\u3066\u3001\u30ec\u30b3\u30fc\u30c9\u3002 (2)\u30ec\u30b3\u30fc\u30c9\u3057\u305fGPS\u4fe1\u53f7\u3092USRP2920\u3067\u30d7\u30ec\u30a4\u30d0\u30c3\u30af\u3057\u3066\u3001GPS\u53d7\u4fe1\u6a5f(u-blox\u306eEVK-5H)\u3067\u53d7\u4fe1\u3002 (3)u-blo...\',-1107216618,54024972)"]',
      'DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`ni`.`metadata_freeform_string_value`, CONSTRAINT `_metadata_freeform_string_value_ibfk_1` FOREIGN KEY (`creation_action_id`) REFERENCES `action_log` (`action_id`)) [for Statement "INSERT INTO metadata_freeform_string_value (string_value_id,string_value,string_value_hash,creation_action_id) VALUES(11273,\'[Hardware] USRP [Software] LabVIEW [Application] RF,GPS [Technical Issue] GPS\u306e\u4f4d\u7f6e\u7cbe\u5ea6\u304c\u3070\u3089\u3064\u304f [Solution] \u30b3\u30e1\u30f3\u30c8\u53c2\u7167\u3002 [\u6dfb\u4ed8] \u7121\u3057 [\u30b3\u30e1\u30f3\u30c8] GPS\u4fe1\u53f7\u306e\u8a18\u9332\u518d\u751f\u3092USRP2920(\u30af\u30ed\u30c3\u30af\u7cbe\u5ea6\u306e\u60aa\u3044\u65b9\u306eUSRP)\u3067\u3084\u308b\u3068\u3001\u4f4d\u7f6e\u7cbe\u5ea6\u304c\u3070\u3089\u3064\u304f\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3057\u305f\u3002 \u30d7\u30ed\u30b0\u30e9\u30e0\u306fUSRP\u306eR&P\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 VI\u306f\u4ee5\u4e0b\u3067\u3059\u3002 http://forums.ni.com/t5/Software-Defined-Radio/RF-Record-and-Playback-with-NI-USRP/ta-p/3535243 VI\u306e\u8aac\u660e\u306e\u30ea\u30f3\u30af\u3067\u3059\u3002 http://www.ni.com/white-paper/13881/ja/#toc1 [\u624b\u9806] (1)\u5ea7\u6a19\u304c\u56fa\u5b9a\u3055\u308c\u305fGPS\u4fe1\u53f7\u3092GPS\u30c4\u30fc\u30eb\u30ad\u30c3\u30c8+VST\u3092\u4f7f\u7528\u3057\u3066\u9001\u4fe1\u3057\u3001USRP2920\u3067\u53d7\u4fe1\u3057\u3066\u3001\u30ec\u30b3\u30fc\u30c9\u3002 (2)\u30ec\u30b3\u30fc\u30c9\u3057\u305fGPS\u4fe1\u53f7\u3092USRP2920\u3067\u30d7\u30ec\u30a4\u30d0\u30c3\u30af\u3057\u3066\u3001GPS\u53d7\u4fe1\u6a5f(u-blox\u306eEVK-5H)\u3067\u53d7\u4fe1\u3002 (3)u-blo...\',-1107216618,54024972)"]'
    ],
    [
      'INSERT INTO metadata_freeform_string_value (string_value_id,string_value,string_value_hash,creation_action_id) VALUES(11274,\'http://forums.ni.com/t5/Alliance-Partner-Network-Japan/TRICS-nbsp-%E3%82%AF%E3%83%AD%E3%83%83%E3%82%AF%E7%B2%BE%E5%BA%A6-%E4%BD%8D%E7%9B%B8%E3%83%8E%E3%82%A4%E3%82%BA-%E3%82%AF%E3%83%AD%E3%83%83%E3%82%AF%E3%82%B8%E3%83%83%E3%82%BF-%E3%81%8CGPS%E3%81%AE%E4%BD%8D%E7%BD%AE%E7%B2%BE%E5%BA%A6%E3%81%AB%E5%A4%A7%E3%81%8D%E3%81%8F%E5%BD%B1%E9%9F%BF/ta-p/3558502\',-1586887004,54025087)',
      'DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`ni`.`metadata_freeform_string_value`, CONSTRAINT `_metadata_freeform_string_value_ibfk_1` FOREIGN KEY (`creation_action_id`) REFERENCES `action_log` (`action_id`)) [for Statement "INSERT INTO metadata_freeform_string_value (string_value_id,string_value,string_value_hash,creation_action_id) VALUES(11274,\'http://forums.ni.com/t5/Alliance-Partner-Network-Japan/TRICS-nbsp-%E3%82%AF%E3%83%AD%E3%83%83%E3%82%AF%E7%B2%BE%E5%BA%A6-%E4%BD%8D%E7%9B%B8%E3%83%8E%E3%82%A4%E3%82%BA-%E3%82%AF%E3%83%AD%E3%83%83%E3%82%AF%E3%82%B8%E3%83%83%E3%82%BF-%E3%81%8CGPS%E3%81%AE%E4%BD%8D%E7%BD%AE%E7%B2%BE%E5%BA%A6%E3%81%AB%E5%A4%A7%E3%81%8D%E3%81%8F%E5%BD%B1%E9%9F%BF/ta-p/3558502\',-1586887004,54025087)"]',
      'DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`ni`.`metadata_freeform_string_value`, CONSTRAINT `_metadata_freeform_string_value_ibfk_1` FOREIGN KEY (`creation_action_id`) REFERENCES `action_log` (`action_id`)) [for Statement "INSERT INTO metadata_freeform_string_value (string_value_id,string_value,string_value_hash,creation_action_id) VALUES(11274,\'http://forums.ni.com/t5/Alliance-Partner-Network-Japan/TRICS-nbsp-%E3%82%AF%E3%83%AD%E3%83%83%E3%82%AF%E7%B2%BE%E5%BA%A6-%E4%BD%8D%E7%9B%B8%E3%83%8E%E3%82%A4%E3%82%BA-%E3%82%AF%E3%83%AD%E3%83%83%E3%82%AF%E3%82%B8%E3%83%83%E3%82%BF-%E3%81%8CGPS%E3%81%AE%E4%BD%8D%E7%BD%AE%E7%B2%BE%E5%BA%A6%E3%81%AB%E5%A4%A7%E3%81%8D%E3%81%8F%E5%BD%B1%E9%9F%BF/ta-p/3558502\',-1586887004,54025087)"]'
    ]
  ],
  fingerprint => 'insert into metadata_freeform_string_value (string_value_id,string_value,string_value_hash,creation_action_id) values(?+)',
  id => 'DA30C81663C7639B',
  query_time_diffs => [],
  row_diffs => [],
  total_queries => 3,
  unique_queries => {
    'INSERT INTO metadata_freeform_string_value (string_value_id,string_value,string_value_hash,creation_action_id) VALUES(11272,\'TRICS - \u30af\u30ed\u30c3\u30af\u7cbe\u5ea6(\u4f4d\u76f8\u30ce\u30a4\u30ba=\u30af\u30ed\u30c3\u30af\u30b8\u30c3\u30bf)\u304cGPS\u306e\u4f4d\u7f6e\u7cbe\u5ea6\u306b\u5927\u304d\u304f\u5f71\u97ff - ni\',-1605749910,54024972)' => 1,
    'INSERT INTO metadata_freeform_string_value (string_value_id,string_value,string_value_hash,creation_action_id) VALUES(11273,\'[Hardware] USRP [Software] LabVIEW [Application] RF,GPS [Technical Issue] GPS\u306e\u4f4d\u7f6e\u7cbe\u5ea6\u304c\u3070\u3089\u3064\u304f [Solution] \u30b3\u30e1\u30f3\u30c8\u53c2\u7167\u3002 [\u6dfb\u4ed8] \u7121\u3057 [\u30b3\u30e1\u30f3\u30c8] GPS\u4fe1\u53f7\u306e\u8a18\u9332\u518d\u751f\u3092USRP2920(\u30af\u30ed\u30c3\u30af\u7cbe\u5ea6\u306e\u60aa\u3044\u65b9\u306eUSRP)\u3067\u3084\u308b\u3068\u3001\u4f4d\u7f6e\u7cbe\u5ea6\u304c\u3070\u3089\u3064\u304f\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3057\u305f\u3002 \u30d7\u30ed\u30b0\u30e9\u30e0\u306fUSRP\u306eR&P\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 VI\u306f\u4ee5\u4e0b\u3067\u3059\u3002 http://forums.ni.com/t5/Software-Defined-Radio/RF-Record-and-Playback-with-NI-USRP/ta-p/3535243 VI\u306e\u8aac\u660e\u306e\u30ea\u30f3\u30af\u3067\u3059\u3002 http://www.ni.com/white-paper/13881/ja/#toc1 [\u624b\u9806] (1)\u5ea7\u6a19\u304c\u56fa\u5b9a\u3055\u308c\u305fGPS\u4fe1\u53f7\u3092GPS\u30c4\u30fc\u30eb\u30ad\u30c3\u30c8+VST\u3092\u4f7f\u7528\u3057\u3066\u9001\u4fe1\u3057\u3001USRP2920\u3067\u53d7\u4fe1\u3057\u3066\u3001\u30ec\u30b3\u30fc\u30c9\u3002 (2)\u30ec\u30b3\u30fc\u30c9\u3057\u305fGPS\u4fe1\u53f7\u3092USRP2920\u3067\u30d7\u30ec\u30a4\u30d0\u30c3\u30af\u3057\u3066\u3001GPS\u53d7\u4fe1\u6a5f(u-blox\u306eEVK-5H)\u3067\u53d7\u4fe1\u3002 (3)u-blo...\',-1107216618,54024972)' => 1,
    'INSERT INTO metadata_freeform_string_value (string_value_id,string_value,string_value_hash,creation_action_id) VALUES(11274,\'http://forums.ni.com/t5/Alliance-Partner-Network-Japan/TRICS-nbsp-%E3%82%AF%E3%83%AD%E3%83%83%E3%82%AF%E7%B2%BE%E5%BA%A6-%E4%BD%8D%E7%9B%B8%E3%83%8E%E3%82%A4%E3%82%BA-%E3%82%AF%E3%83%AD%E3%83%83%E3%82%AF%E3%82%B8%E3%83%83%E3%82%BF-%E3%81%8CGPS%E3%81%AE%E4%BD%8D%E7%BD%AE%E7%B2%BE%E5%BA%A6%E3%81%AB%E5%A4%A7%E3%81%8D%E3%81%8F%E5%BD%B1%E9%9F%BF/ta-p/3558502\',-1586887004,54025087)' => 1
  },
  warning_diffs => []
};

Revision history for this message
Valerie Parham-Thompson (valerie-o) wrote :

Note this error has more to do with the 3rd query with html encoding than the Japanese characters. See https://bugs.launchpad.net/percona-toolkit/+bug/1657926.

Revision history for this message
Sveta Smirnova (svetasmirnova) wrote :

Thank you for the report.

Verified as described using test case from lp:1657926 Only difference is that error is printed in the end of error file:

$ pt-upgrade h=127.0.0.1,P=3371,u=root h=127.0.0.1,P=3371,u=root --no-read-only ~/bugs/bug1657926.log 1>~/tmp/results.log
$VAR1 = {
  discarded => 0,
  errors => [],
...
Error reporting query class 6D51BCBEA2D449AB: Missing argument in printf at /usr/bin/pt-upgrade line 6074.

tags: added: pt-upgrade
Changed in percona-toolkit:
status: New → Confirmed
Revision history for this message
Sveta Smirnova (svetasmirnova) wrote :

Tested with versions 2.2.20 and 3.0.2

tags: added: pt123
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-1409

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.