Bug #23348 Crash in handler.cc with 64-bit
Submitted: 16 Oct 2006 21:54 Modified: 25 Oct 2006 0:44
Reporter: Peter Gulutzan Email Updates:
Status: Duplicate Impact on me:
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.1.13-beta-debug (?) OS:Linux (SUSE 10.0 / 64-bit)
Assigned to: Assigned Account CPU Architecture:Any

[16 Oct 2006 21:54] Peter Gulutzan
I have an x86-64 (Turion) computer.

I did a fresh clone of the latest MySQL server source
("ChangeSet@1.2311, 2006-10-13 14:42:50+04:00 ...").
I built with BUILD/compile-pentium-debug-max.
I started mysqld.

Using ddd, I see this information when I start a run:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912506703008 (LWP 1264)]
0x0000000000756570 in closecon_handlerton (thd=0x1857368, plugin=0xf3f7e0, unused=0x0) at handler.cc:562

I also have another machine with the same operating system (SUSE 10.0)
but 32-bit instead of 64-bit. I pulled the source for that machine at
approximately the same time. It does not crash. 

How to repeat:
[17 Oct 2006 0:25] Peter Gulutzan
Tested with a few different build options.
BUILD/compile-amd64-max ... no problem.
BUILD/compile-amd64-debug-max ... crash.
BUILD/compile-pentium ... no problem.
[19 Oct 2006 20:08] Peter Gulutzan
Apparently it matters if I recently installed a storage
  engine plugin. Here are modified "how to repeat" instructions.

  Build with:
  CFLAGS="-O3 " CXX=gcc CXXFLAGS="-O3 \
  -felide-constructors -fno-exceptions -fno-rtti" ./configure --with-extra-charsets=all --enable-assembler --prefix=/usr/local/mysql --with-mysqld-flags=-rdynamic

  On mysql client, say INSTALL PLUGIN ARCHIVE SONAME 'ha_archive.so';

  The mysql.plugin file is now bad, but I built again with debug so
  that I could confirm the crash is still in handler.cc.

  Build again, with:
  BUILD/compile-pentium-debug (not BUILD/compile-pentium-debug-max)

  Load mysqld with debugger, e.g.
  ddd --args /usr/local/mysql/libexec/mysqld --user=root --skip-networking --skip-stack-trace

  Click "Run". Notice the messages accompanying the crash.

  Then remove the plugin* files in the datadir/mysql directory,
  and try again. This time it won't crash.
[20 Oct 2006 16:41] Sveta Smirnova
Thank you for the report.

Verified as described on SuSe 9 using last BK sources.
[20 Oct 2006 17:21] Sveta Smirnova
32-bit version is affected too
[25 Oct 2006 0:44] Antony Curtis
Duplicate of bug#22694 (which is currently in patch-pending state)