Bug #18535 Invalid pointer after ENTER SINGLE USER MODE
Submitted: 27 Mar 2006 9:33 Modified: 24 Apr 2006 16:11
Reporter: Serge Kozlov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:5.1.9 (beta) OS:Linux (FC4)
Assigned to: Jonas Oreland CPU Architecture:Any

[27 Mar 2006 9:33] Serge Kozlov
Description:
Following error appears after trying to run load_tpcb.pl script when cluster already was switched to SINGLE USER MODE:

*** glibc detected *** /home/ndbdev/skozlov/builds/libexec/mysqld: free(): invalid pointer: 0x00000000019a2638 ***
======= Backtrace: =========
/lib64/libc.so.6[0x33b836a71e]
/lib64/libc.so.6(__libc_free+0x6e)[0x33b836ac4e]
/home/ndbdev/skozlov/builds/libexec/mysqld(_Z27ha_create_table_from_engineP3THDP
KcS2_+0xec)[0x69e76c]
/home/ndbdev/skozlov/builds/libexec/mysqld(_Z20mysql_rm_table_part2P3THDP13st_ta
ble_listbbbb+0x7bb)[0x6ad9eb]
/home/ndbdev/skozlov/builds/libexec/mysqld(_Z14mysql_rm_tableP3THDP13st_table_li
stcc+0x8b)[0x6adb5b]
/home/ndbdev/skozlov/builds/libexec/mysqld(_Z21mysql_execute_commandP3THD+0x183a
)[0x5eda2a]
/home/ndbdev/skozlov/builds/libexec/mysqld(_Z11mysql_parseP3THDPcj+0x3c8)[0x5f44
f8]
/home/ndbdev/skozlov/builds/libexec/mysqld(_Z16dispatch_command19enum_server_com
mandP3THDPcj+0x49b)[0x5f49eb]
/home/ndbdev/skozlov/builds/libexec/mysqld(_Z10do_commandP3THD+0x9d)[0x5f5b4d]
/home/ndbdev/skozlov/builds/libexec/mysqld(handle_one_connection+0x8bc)[0x5f652c
]
/lib64/libpthread.so.0[0x33b8c0697c]
/lib64/libc.so.6(__clone+0x6e)[0x33b83c992e]
======= Memory map: ========
00400000-00be8000 r-xp 00000000 68:03 489030                             /home/ndbdev/skozlov/builds/libexec/mysqld
00ce8000-00e1c000 rw-p 007e8000 68:03 489030                             /home/ndbdev/skozlov/builds/libexec/mysqld
00e1c000-019e0000 rw-p 00e1c000 00:00 0                                  [heap]
40000000-40001000 ---p 40000000 00:00 0
40001000-40011000 rw-p 40001000 00:00 0
40011000-40012000 ---p 40011000 00:00 0
40012000-40022000 rw-p 40012000 00:00 0
40022000-40023000 ---p 40022000 00:00 0
40023000-40033000 rw-p 40023000 00:00 0
40033000-40034000 ---p 40033000 00:00 0
40034000-40044000 rw-p 40034000 00:00 0
40044000-40045000 ---p 40044000 00:00 0
40045000-40055000 rw-p 40045000 00:00 0
40055000-40056000 ---p 40055000 00:00 0
40056000-40096000 rw-p 40056000 00:00 0
40096000-40097000 ---p 40096000 00:00 0
40097000-400d7000 rw-p 40097000 00:00 0
400d7000-400d8000 ---p 400d7000 00:00 0
400d8000-40ad8000 rw-p 400d8000 00:00 0
40ad8000-40ad9000 ---p 40ad8000 00:00 0
40ad9000-414d9000 rw-p 40ad9000 00:00 0
414d9000-414da000 ---p 414d9000 00:00 0
414da000-41eda000 rw-p 414da000 00:00 0
41eda000-41edb000 ---p 41eda000 00:00 0
41edb000-428db000 rw-p 41edb000 00:00 0
428db000-428dc000 ---p 428db000 00:00 0
428dc000-432dc000 rw-p 428dc000 00:00 0
432dc000-432dd000 ---p 432dc000 00:00 0
432dd000-43cdd000 rw-p 432dd000 00:00 0
43cdd000-43cde000 ---p 43cdd000 00:00 0
43cde000-446de000 rw-p 43cde000 00:00 0
446de000-446df000 ---p 446de000 00:00 0
446df000-450df000 rw-p 446df000 00:00 0
450df000-450e0000 ---p 450df000 00:00 0
450e0000-45120000 rw-p 450e0000 00:00 0
45120000-45121000 ---p 45120000 00:00 0
45121000-45161000 rw-p 45121000 00:00 0
45161000-45162000 ---p 45161000 00:00 0
45162000-451a2000 rw-p 45162000 00:00 0
33b8100000-33b811a000 r-xp 00000000 68:03 65222                          /lib64/ld-2.3.5.so
33b8219000-33b821a000 r--p 00019000 68:03 65222                          /lib64/ld-2.3.5.so
33b821a000-33b821b000 rw-p 0001a000 68:03 65222                          /lib64/ld-2.3.5.so
33b8300000-33b842d000 r-xp 00000000 68:03 65231                          /lib64/libc-2.3.5.so
33b842d000-33b852c000 ---p 0012d000 68:03 65231                          /lib64/libc-2.3.5.so
33b852c000-33b8530000 r--p 0012c000 68:03 65231                          /lib64/libc-2.3.5.so
33b8530000-33b8532000 rw-p 00130000 68:03 65231                          /lib64/libc-2.3.5.so
33b8532000-33b8536000 rw-p 33b8532000 00:00 0
33b8600000-33b8602000 r-xp 00000000 68:03 65240                          /lib64/libdl-2.3.5.so
33b8602000-33b8702000 ---p 00002000 68:03 65240                          /lib64/libdl-2.3.5.so
33b8702000-33b8703000 r--p 00002000 68:03 65240                          /lib64/libdl-2.3.5.so
33b8703000-33b8704000 rw-p 00003000 68:03 65240                          /lib64/libdl-2.3.5.so
33b8800000-33b8884000 r-xp 00000000 68:03 65245

How to repeat:
1. Start cluster with 1 mysld and 1 api nodes. I used simple configuration with 2 ndbd nodes and two replicas:

[ndbd default]
NoOfReplicas: 2
IndexMemory: 200M
DataMemory: 500M
DataDir: /space/run
FileSystemPath: /space/run

[mgm default]
ArbitrationRank: 1
DataDir: /space/run

[ndb_mgmd]
Id: 1
HostName: ndb16

[ndbd]
Id: 2
HostName: ndb17

[ndbd]
Id: 3
HostName: ndb18

[mysqld]
Id: 15
HostName: ndb16

[api]

2. Run ndb_mgm and execute SHOW.
3. Look at ID of api node (not mysqld!). Remember one.
4. Switch ENTER SINGLE USER MODE _id_ where _id_ is Id of api (16 for my case)
5. Run ./load_tpcb.pl ndb16 3306 root BLANK ndb
6. Look error in description
[18 Apr 2006 13:30] Jonas Oreland
This is replication...
[21 Apr 2006 8:03] Jonas Oreland
ChangeSet@1.2306.15.5, 2006-04-18 15:21:39+02:00, jonas@perch.ndb.mysql.com
  ndb - replication
    Make sure that SUB_GCP_COMPLETE_ACK is sent uncond, failure to do so can lead to problems...

maillist is currently down, so I cant get link :-(
[21 Apr 2006 14:41] Tomas Ulin
pushed to 5.1.10
[23 Apr 2006 6:12] Jonas Oreland
No, the bug was in replication.
And caused mysqld to crash when entering single user mode.
(On other node id)
[24 Apr 2006 16:11] Jon Stephens
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Documented in 5.1.10 changelog. Closed.