Bug #67394 infinite 100% cpu hang on load data local infile
Submitted: 27 Oct 2012 9:08 Modified: 22 Dec 2012 12:46
Reporter: Ruben Cardenal Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: DML Severity:S1 (Critical)
Version:5.5.17, 5.5.24 OS:Linux
Assigned to: CPU Architecture:Any
Tags: cpu, hog, LOAD DATA, local infile

[27 Oct 2012 9:08] Ruben Cardenal
Description:
This has happened two times in a day in 2 different server versions. When issuing a "load data local infile" of a mere 326 rows file, mysql server stucks at 100% cpu, and you can't kill the query (remains "Killed" forever). The only way of getting rid of this is killing (-9!!!!) the mysqld process.

The "show engine innodb status" shows

---TRANSACTION 12A00EBC, ACTIVE 60096 sec
mysql tables in use 1, locked 1
1 lock struct(s), heap size 376, 0 row lock(s), undo log entries 10
MySQL thread id 756170, OS thread handle 0x7fc44d29d700, query id 648993881 192.168.12.211 datos
LOAD DATA  LOCAL INFILE '/home/keetle/ETL/MRW/files/20121021.txt' REPLACE INTO TABLE TEMP.tmp_mrw FIELDS TERMINATED BY '\n' LINES  TERMINATED BY '\n' IGNORE 1 LINES (`data`)
TABLE LOCK table `TEMP`.`tmp_mrw` trx id 12A00EBC lock mode IX

| 756170 | datos       | 192.168.12.211:4955 | TEMP | Killed  | 60119 | NULL                                                                        | LOAD DATA ...

The versions specified are those of the 2 servers where this has happened yesterday.

How to repeat:
Looks like trying to import that file (and others like that) makes it happen.
[28 Oct 2012 20:07] MySQL Verification Team
Consider, this sounds similar to:
http://bugs.mysql.com/bug.php?id=51840
[28 Oct 2012 20:50] Ruben Cardenal
Hi Shane,

Yes, I checked that before opening this. It's last comment is yours, 2 years ago, asking the patch to be pushed. Checking the sql/sql_load.cc, looks like the patch was never applied.
[22 Dec 2012 12:46] MySQL Verification Team
duplicate of bug #51840