From: Mattias Jonsson Date: September 9 2008 7:11pm Subject: Re: bzr commit into mysql-5.1 branch (ingo.struewing:2735) Bug#37958 List-Archive: http://lists.mysql.com/commits/53642 Message-Id: <48C6CA4B.3060709@sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Hi, It still crashes on the 'SELECT * FROM t1' see below. Ingo, I can try to setup an account on my machine for you, if you want? (or try to get some time to investigate myself...) /Mattias Output from test: main.plugin [ fail ] mysqltest: At line 17: query 'SELECT * FROM t1' failed: 2013: Lost connection to MySQL server during query The result from queries just before the failure was: CREATE TABLE t1(a int) ENGINE=EXAMPLE; Warnings: Warning 1286 Unknown table engine 'EXAMPLE' Warning 1266 Using storage engine MyISAM for table 't1' DROP TABLE t1; INSTALL PLUGIN example SONAME 'ha_example.so'; INSTALL PLUGIN EXAMPLE SONAME 'ha_example.so'; ERROR HY000: Function 'EXAMPLE' already exists UNINSTALL PLUGIN example; INSTALL PLUGIN example SONAME 'ha_example.so'; CREATE TABLE t1(a int) ENGINE=EXAMPLE; SELECT * FROM t1; More results from queries before failure can be found in /Users/mattiasj/clones/bzrroot/test-51-bugteam/mysql-test/var/log/plugin.log Here is a bt at the crash: Program received signal EXC_ARITHMETIC, Arithmetic exception. 0x91bc2466 in hash_search () (gdb) bt #0 0x91bc2466 in hash_search () #1 0x00ee40ee in get_share (table_name=0x10724a8 "./test/t1", table=0x1071a18) at ha_example.cc:177 #2 0x00ee4476 in ha_example::open (this=0x1074628, name=0x10724a8 "./test/t1", mode=2, test_if_locked=2) at ha_example.cc:294 #3 0x00232241 in handler::ha_open (this=0x1074628, table_arg=0x1071a18, name=0x10724a8 "./test/t1", mode=2, test_if_locked=2) at handler.cc:2025 #4 0x00167a77 in open_table_from_share (thd=0x1026418, share=0x1072228, alias=0x1069b50 "t1", db_stat=39, prgflag=44, ha_open_flags=0, outparam=0x1071a18, is_create_table=false) at table.cc:1858 #5 0x0015a2a5 in open_unireg_entry (thd=0x1026418, entry=0x1071a18, table_list=0x1069b58, alias=0x1069b50 "t1", cache_key=0xb00616bd "test", cache_key_length=8, mem_root=0xb00618e4, flags=0) at sql_base.cc:3881 #6 0x0015cf39 in open_table (thd=0x1026418, table_list=0x1069b58, mem_root=0xb00618e4, refresh=0xb0061927, flags=0) at sql_base.cc:2904 #7 0x0015daba in open_tables (thd=0x1026418, start=0xb00619b4, counter=0xb0061998, flags=0) at sql_base.cc:4515 #8 0x0015e30d in open_and_lock_tables_derived (thd=0x1026418, tables=0x1069b58, derived=true) at sql_base.cc:4915 #9 0x00117aa0 in open_and_lock_tables (thd=0x1026418, tables=0x1069b58) at mysql_priv.h:1530 #10 0x00104245 in execute_sqlcom_select (thd=0x1026418, all_tables=0x1069b58) at sql_parse.cc:4791 #11 0x0010b75a in mysql_execute_command (thd=0x1026418) at sql_parse.cc:2134 #12 0x00114c42 in mysql_parse (thd=0x1026418, inBuf=0x1069a28 "SELECT * FROM t1", length=16, found_semicolon=0xb0062df4) at sql_parse.cc:5717 #13 0x00115f1c in dispatch_command (command=COM_QUERY, thd=0x1026418, packet=0xce6019 "SELECT * FROM t1", packet_length=16) at sql_parse.cc:1152 #14 0x001171f8 in do_command (thd=0x1026418) at sql_parse.cc:809 #15 0x001026fd in handle_one_connection (arg=0x1026418) at sql_connect.cc:1115 #16 0x91b566f5 in _pthread_start () #17 0x91b565b2 in thread_start () my quick guess is an error in the example handler... Ingo Strüwing wrote: > Hi Sergey, > > Sergey Vojtovich, 09.09.2008 16:34: > ... >> On Tue, Sep 09, 2008 at 04:29:57PM +0200, Ingo Strüwing wrote: > ... >>> Sergey, thanks for the review. Why do you think it's a different problem? >> At least because it is not obvious how hton2plugin mapping could affect >> EXAMPLE share. Of course unless it is some kind of tricky memory corruption. > > I hope, the array overrun was the cause for this. > > There is one doubt left though. One run of plugin.test was not > sufficient to overrun the array. OTOH, on my machine it crashed only on > slot 20 of 15. So it didn't crash on the first overrun. Three test runs > were required to come to slot 20. > > On Mac it might crash on the first overrun. If some "INSTALL PLUGIN" > have been executed in the same server life time before plugin.test, the > crash could still result from the overrun. > > Regards > Ingo