Bug #46347 Segmentation fault in main.subselect_gis
Submitted: 23 Jul 12:22
Reporter: Lenz Grimmer
Status: Open
Category:Server: GIS Severity:S3 (Non-critical)
Version:5.1.35-snapshot20090630 OS:Linux (openSUSE 11.0)
Assigned to: Alexey Botchkov Target Version:
Tags: testfailure, gis, crash

[23 Jul 12:22] Lenz Grimmer
Description:
I compiled a 32bit Linux binary using the 5.1.35-snapshot20090630 sources taken from
pushbuild (based on the mysql-5.1-wl1326 source tree). Running the entire GIS tests
results in a segfault when running the main.subselect_gis test - see the attached log
file for a backtrace (BugDB would not let me post it in the description).

Interestingly, this only happens if there are other tests run before the failing test.
Running subselect_gis alone passes, and I did not observe this failure in pushbuild as
well:

[SNIP]
lenz@thebe:/mypool/space/tmp/mysql-5.1.35-snapshot20090630/mysql-test> ./mysql-test-run
subselect_gis.test
Logging: ./mysql-test-run  subselect_gis.test
090723 11:55:06 [Warning] Forcing shutdown of 1 plugins
MySQL Version 5.1.35
Checking supported features...
 - skipping ndbcluster, mysqld not compiled with ndbcluster
 - SSL connections supported
Collecting tests...
vardir: /mypool/space/tmp/mysql-5.1.35-snapshot20090630/mysql-test/var
Checking leftover processes...
Removing old var directory...
Creating var directory
'/mypool/space/tmp/mysql-5.1.35-snapshot20090630/mysql-test/var'...
Installing system database...
Using server port 15846

==============================================================================

TEST                                      RESULT   TIME (ms)
------------------------------------------------------------

worker[1] Using MTR_BUILD_THREAD 250, with reserved ports 12500..12509
main.subselect_gis                       [ pass ]   2006
------------------------------------------------------------
The servers were restarted 0 times
Spent 2.006 of 19 seconds executing testcases

All 1 tests were successful.
[SNIP]

How to repeat:
Take the mysql-5.1.35-snapshot20090630.tar.gz source tarball (from pushbuild) and compile
it using the following options:

CFLAGS='-g -O2 -Wall -DUNIV_LINUX' CXX='g++' CXXFLAGS='-g -O2 -Wall -Wall  
-fno-implicit-templates -fno-exceptions -fno-rtti'  LDFLAGS='-g -rdynamic '  ASFLAGS='-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

Now run the subselect_gis test after another test:

$ cd mysql-test
$ ./mysql-test-run gis.test subselect_gis.test

Observe the crash documented above.

Suggested fix:
No idea how to fix this - let me know if you need any additional information or a
precompiled binary. I used gcc 4.3.1 for this build.
[23 Jul 12:26] Lenz Grimmer
Console output incl. stack trace of the segfault

Attachment: bug46347.txt (text/plain), 12.41 KiB.