Bug #45772 hangs in mysql_real_query mysql 5.1.31
Submitted: 26 Jun 2009 3:18 Modified: 5 Sep 2009 9:49
Reporter: jian yi Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: C API (client library) Severity:S2 (Serious)
Version:5.1.31 OS:Linux (SuSE10.1)
Assigned to: CPU Architecture:Any
Tags: deadlock, hangs, mysql_real_query, vio_read

[26 Jun 2009 3:18] jian yi
Description:
1) A
#0  0xbfffe402 in __kernel_vsyscall ()
#1  0xb779e2db in __read_nocancel () from /lib/libpthread.so.0
#2  0xb56a6b78 in vio_read (vio=0x8a62798, buf=0x8a6fb18 "\a", size=16384) at viosocket.c:44 
#3  0xb56a6bf7 in vio_read_buff (vio=0x8a62798, buf=0x8a81eb0 "\023", size=4) at viosocket.c:83
#4  0xb56a7ea3 in my_real_read (net=0x8a6e778, complen=0xb66e3d38) at net.c:815
#5  0xb56a8263 in my_net_read (net=0x8a6e778) at net.c:996
#6  0xb56a1dd9 in cli_safe_read (mysql=0x8a6e778) at client.c:669
#7  0xb56a2565 in cli_read_query_result (mysql=0x8a6e778) at client.c:2739
#8  0xb56a07d4 in mysql_real_query (mysql=0x8a6e778, query=0x8a6db74 "set @@autocommit=0", length=18)
    at client.c:2843

2) B
#0  0x00002abad848894b in __gxx_personality_v0 () from /lib64/libpthread.so.0
#1  0x00002aaaaed9d339 in vio_read_buff (vio=0x3e, buf=0x2aaaafd21850 "\020\001", size=4) at viosocket.c:83
#2  0x00002aaaaed9e511 in my_real_read (net=0x2aaaafd133c0, complen=0x406ff2d0) at net.c:815
#3  0x00002aaaaed9e8c5 in my_net_read (net=0x3e) at net.c:996
#4  0x00002aaaaed98aa2 in cli_safe_read (mysql=0x2aaaafd133c0) at client.c:669
#5  0x00002aaaaed992c9 in cli_read_query_result (mysql=0x2aaaafd133c0) at client.c:2739
#6  0x00002aaaaed9766e in mysql_real_query (mysql=0x2aaaafd133c0, query=<valu e optimized out>, length=<value optimized out>)
    at client.c:2843

How to repeat:
B can't repeat.
gdb with mysql server will repeat A
[26 Jun 2009 3:45] Valeriy Kravchuk
Thank you for the problem report. What query was executing in case B? Do you have SHO INNODB STATUS results at the moment of hang?
[26 Jun 2009 5:12] jian yi
*****SQL*****
insert into cs_page_458.t_page_sum(fdate, ftime, fid, fpv, fuv, fvv, fqv, fiv)                                              values(90626, 0, 128921118881732213, 25, 0, 0, 0, 0)                                                                     on duplicate key update fpv = fpv+25, fuv = fuv+0, fvv = fvv+0,                                                                     fqv = fqv+0, fiv = fiv+0, ftime = 0;

*****mysql server log*****
090328 14:01:47  InnoDB: Page checksum 707413311, prior-to-4.0.14-form checksum 904489658
InnoDB: stored checksum 80283037, prior-to-4.0.14-form stored checksum 904489658
InnoDB: Page lsn 160 3792685182, low 4 bytes of lsn at page end 3792685182
InnoDB: Page number (if stored to page already) 283792,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 0
InnoDB: Page may be an index page where index id is 0 1842394
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 283792.
InnoDB: You may have to recover from a backup.
InnoDB: It is also possible that your operating
InnoDB: system has corrupted its own file cache
InnoDB: and rebooting your computer removes the
InnoDB: error.
InnoDB: If the corrupt page is an index page
InnoDB: you can also try to fix the corruption
InnoDB: by dumping, dropping, and reimporting
InnoDB: the corrupt table. You can use CHECK
InnoDB: TABLE to scan your table for corruption.
InnoDB: See also http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html
InnoDB: about forcing recovery.
InnoDB: Ending processing because of a corrupt database page.
090328 14:01:47 mysqld_safe mysqld from pid file /usr/local/mysql/data/test.pid ended
[26 Jun 2009 5:15] jian yi
I think mysql server can't reponse to mysql client, but the client should not hang at mysql_real_query.
[26 Jun 2009 5:39] jian yi
len 16384; hex 04c9059d00045490ffffffff0008e199000000a0e20fc87e45bf00000000000000000000000000193f8180a51437063039570005000000930000000000000000000000000000001c1cdaa30200000652ff085e00000578000000000000002c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b830ba0155003016f63d6d0001620100001cc64f2a00000671f30e48000004d800000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0f844015500995a054ab90001620100001cbfccbd800000b666126b0000046a00000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c8289b015500aa06148d300001620100001caee730800007f27304e80000035200000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d000c60155017bc5f21bb70001620100001ca461c30000075a5505840000012c00000000000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d831800155004ae07ed5fd0001620100001cbb867b800001a87914f50000041a00000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0258301550180426245c90001620100001ca28ddb80000549f80742000000d200000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800e8f9d00155001aab5ff2b60001620100001cea38190000075e063d27000005aa000000000000004b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f018c0015500420ab99fc50001620100001cde5c32000000c64f3bfe0000058200000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f815a8015500bf24e73c3c0001620100001cdea8e1000001f637275c00000582000000000000000b0000000000000000000000000000000000000000000000000000000000000000000000000000ba0001620100001cde617e80000253f7108f0000058200000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000601734015500c7cea36adc0001620100001ce4aaa6000004c0240c3700000596000000000000000d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000681fb60155001b9b644a310001620100001cc911fb000001f0531d300000052800000000000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400701356015500c0e6205f300001620100001ce4aae6000003430b31ae000005960000000000000007000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000078fe74015500770a5edf7f0001620100001cd67a21000000cbe0044b000005460000000000000005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080207c0155004c91a9bcbd0001620100001cbed17280000993b404d00000046000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000880f7801550034f8bb3f260001620100001cea3f9100000339991236000005aa0000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000090fc85015500a4740790990001620100001caee65200000640171dec00000352000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009810a1015500ab4784d0420001620100001cb94050000007dae9006c0000040600000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00dec0155001d601e33fb0001620100001cc0e0b980000163a112f60000047400000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a8fc85015500c3c0bae2650001620100001ce4c136000004398104e4000005960000000000000004000
[26 Jun 2009 5:44] jian yi
mysql server error log file

Attachment: test.err (, text), 187.88 KiB.

[26 Jun 2009 5:45] jian yi
problem happen at 14:00~17:00 at china, please the error log file test.err
[26 Jun 2009 6:06] jian yi
2009-6-25
[30 Jun 2009 13:54] MySQL Verification Team
Thank you for the feedback. Are you able to provide a C complete test case?. Thanks in advance.
[30 Jun 2009 14:43] jian yi
I can't understand the "__gxx_personality_v0", I will try to reproduce it
[13 Jul 2009 17:38] MySQL Verification Team
Asking again if you could provide a C complete test case?. Thanks in advance.
[23 Jul 2009 4:58] jian yi
sorry, i can't produce a c program
[5 Aug 2009 9:49] Sveta Smirnova
Thank you for the feedback.

In the initial description you said:

> gdb with mysql server will repeat A

Do you have an idea how to do it? I tried to set breakpoints in indicated functions, then kill mysqld without success: client got error immediately.

Please also try with current version 5.1.37: this can be fixed.
[5 Sep 2009 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".