Bug #38894 pure virtual function called
Submitted: 19 Aug 2008 14:36 Modified: 29 Aug 2008 2:42
Reporter: Daniel Fischer Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S1 (Critical)
Version:6.0 OS:Solaris (10)
Assigned to: CPU Architecture:Any

[19 Aug 2008 14:36] Daniel Fischer
Description:
The MySQL 6.0 server built with Sun Studio 12 immediately crashes as follows:

Pure virtual function called
080819 15:34:27 - mysqld got signal 6 ;

The problem can be observed on both Sparc and i386 but goes away when Falcon is not compiled in.

Backtrace:
$ mdb var/master-data/core
Loading modules: [ libc.so.1 ld.so.1 ]
> $C
08045758 libc.so.1`_lwp_kill+7(1, 6, 8045778)
08045778 my_write_core+0x24(6, 8a16194, 52744, 83c1de9)
080457d8 handle_segfault+0x1b7(6, 0, 8045884)
080457ec libc.so.1`__sighndlr+0xf(6, 0, 8045884, 83c1ddc)
0804584c libc.so.1`call_user_handler+0x22b(6, 0, 8045884)
08045870 libc.so.1`sigacthandler+0xbb(6, 0, 8045884)
08045a94 libc.so.1`_lwp_kill+7(1, 6)
08045aac libc.so.1`raise+0x1f(6)
08045af4 libc.so.1`abort+0x64(1, 8045b28, feffdca8, 8045b28, 859d15b, 8bca888)
08045b08 libCrun.so.1`__1cG__CrunKpure_error6F_v_+0x26(8bca888, 8045b50, 1, 0)
08045b28 __1cESyncElock6MnILockType__v_+0x33(8045b50, 1, 8a3b1dc, 9a66638)
08045b88 __1cGMemMgrFalloc6Mi_pnIMemBlock__+0x34(8bca808, 28, fee90a60, 80b0220)
08045ba8 __1cGMemMgrIallocate6Mi_pv_+0x4e(8bca808, 18, 1, fec7165c, 8045be0, fefcba44)
08045bc8 __1cOMemMgrAllocate6FI_pv_+0x13(18, 0, fedc03a0, 9645fe8, 8045c08, fef00890)
08045be8 __1c2n6FI_pv_+0xe(18)
08045c08 libCstd.so.1`__1cDstdNbasic_filebuf4Cwn0ALchar_traits4Cw___Fclose6M_p1_+0x36(fedc02d0)
08045c30 libCstd.so.1`__1cDstdNbasic_filebuf4Cwn0ALchar_traits4Cw___2T6M_v_+0x27(fedc02d0)
08045c40 libCstd.so.1`__1cDstdL__Wide_Init2T5B6M_v_+0x56(8045c64)
08045c6c libCstd.so.1`__SUNW_fini_iostreams+0x1f(fec501c0, fec32218, fed7ff44, fec50200, fec32218, fec2d000)
08045c90 libCrun.so.1`__1cH__CimplKcplus_fini6F_v_+0x5b(fec2d000, feb91d7d, 8045f00, 8045d18, fec2d000, fec32200)
08045cb0 libCstd.so.1`_init+0x56(0, 83c0df3, 0, 0, 8045cd8, 83c0dcd)
08045cd8 libc.so.1`exit+0x12(0, 9631540, 83cbb14, aecccd0)
08045cf8 unireg_abort+0x4d(0, 9631778, 8045d28, 83c4179)
08045d28 main+0x342(e, 8045d5c, 8045d98, 8045d50)
08045d50 _start+0x7d(e, 8045f68, 8045f9c, 8045faa, 8045fb6, 8045ff4)

How to repeat:
export CFLAGS='-g -O2 -Xa -xstrconst -mt -D_FORTEC_'
export CXXFLAGS='-g -O2 -noex -mt -D_FORTEC_'
export ASFLAGS=-g
export LDFLAGS=-g
./configure --enable-thread-safe-client --enable-local-infile --with-pic --with-client-ldflags=-static --with-mysqld-ldflags=-static --with-zlib-dir=bundled --without-ndb-debug --with-big-tables --with-ssl --with-readline --with-embedded-server --with-archive-storage-engine --with-blackhole-storage-engine --with-csv-storage-engine --with-example-storage-engine --with-federated-storage-engine --with-partition --with-extra-charsets=all --with-innodb --with-ndbcluster --with-libevent --with-falcon
make -j 4
cd mysql-test
perl mysql-test-run.pl alias

Also happens with these CFLAGS/CXXFLAGS:
CFLAGS='-g -O2 -Xa -xstrconst -mt -D_FORTEC_'
CXXFLAGS='-g -O2 -mt -D_FORTEC_'

CFLAGS='-g -Xa -xstrconst -mt -D_FORTEC_ -m64'
CXXFLAGS='-g -mt -D_FORTEC_ -m64'

CFLAGS='-g -Xa -xstrconst -mt -D_FORTEC_'
CXXFLAGS='-g -noex -mt -D_FORTEC_'

CFLAGS='-g -O2 -D_FORTEC_'
CXXFLAGS='-g -O2 -D_FORTEC_ -noex'

Also happens when Falcon is compiled in by way of the --with-plugins= configure option instead of the above.
[19 Aug 2008 14:49] Vladislav Vaintroub
This seems to be a duplicate of Bug#38594 - crash on exit() on Solaris.
This should be fixed ( better name is workarounded) in current mysql-6.0-falcon and I believe also in main. See also Bug#38598 (not yet fixed)