Bug #40928 main.func_str, Lost connection to MySQL server
Submitted: 21 Nov 2008 16:09 Modified: 1 Feb 2013 11:23
Reporter: Matthias Leich Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version:5.1.30, 5.1.37 OS:Solaris (i386-pc-solaris2.8)
Assigned to: CPU Architecture:Any

[21 Nov 2008 16:09] Matthias Leich
Description:
Tests on 5.1.30 run by the build team:
--------------------------------------

- mysql-*5.1.30-solaris8-i386.tar.gz
- enterprise-gpl-advanced
- run on intelxeon3 solaris8-i386 / i386-pc-solaris2.8

main.func_str in normal, ps and embedded mode fails
but not in debug mode! :
------------------------

mysqltest: At line 1143: query 'select substring(f1,1,1) from t1 group by 1' failed: 2013: Lost connection to MySQL server during query

The result from queries just before the failure was:
 snip >
CHAR(0xff,0x8f USING utf8) IS NULL
1
Warnings:
Error 1300    Invalid utf8 character string: 'FF8F'
SET SQL_MODE=@orig_sql_mode;
select substring('abc', cast(2 as unsigned int));
substring('abc', cast(2 as unsigned int))
bc
select repeat('a', cast(2 as unsigned int));
repeat('a', cast(2 as unsigned int))
aa
select rpad('abc', cast(5 as unsigned integer), 'x');
rpad('abc', cast(5 as unsigned integer), 'x')
abcxx
select lpad('abc', cast(5 as unsigned integer), 'x');
lpad('abc', cast(5 as unsigned integer), 'x')
xxabc
create table t1(f1 longtext);
insert into t1 values ("123"),("456");
select substring(f1,1,1) from t1 group by 1;

main.func_str did not fail on:
------------------------------
- mysql-*5.1.30-solaris10-i386.tar.gz
  frigg23
  solaris10-i386 / i386-pc-solaris2.10
- mysql-*5.1.30-solaris10-x86_64.tar.gz
  frigg21
  solaris10-x86_64 / x86_64-pc-solaris2.10
- mysql-*5.1.30-solaris9-i386.tar.gz
  skade06
  solaris9-i386 / i386-pc-solaris2.9
- solaris*-sparc

Conclusion:
  The current bug seems to be a
     solaris8
     i386 (I guess this means here 32 Bit)
  related problem.

I do not know if there were core files or not.

How to repeat:
not available
[1 Sep 2009 17:23] Sveta Smirnova
Thank you for the report.

Verified as described. Also fails in same place with error 11 if run Solaris 8 binaries on Solaris 10. No core file created.
[2 Sep 2009 8:16] Philip Stoev
This is a crash, which means a server bug, not a test bug. Without a backtrace it is difficult to guess what is going on, but still trying to guess category and lead.
[7 Sep 2009 11:53] Sveta Smirnova
Bug is repeatable on Solaris8

Backtrace:

Reading libmp.so.2
t@null (l@16) terminated by signal SEGV (Segmentation Fault)
0xdfb669ac: __sigprocmask+0x000c:       jae      __sigprocmask+0x21     [ 0xdfb669c1, .+0x15 ]
current thread: t@1
=>[1] _libc_poll(0x80464f4, 0x2, 0xffffffff), at 0xdf799599 
  [2] _select(0x7, 0x8046640, 0x0, 0x0, 0x0), at 0xdf7ad28b 
  [3] select(0x0, 0x804672c, 0xdfbf0dc8, 0x804673c, 0x8466cbe, 0x804673c), at 0xdfb684c4 
  [4] main(0x7, 0x8046770, 0x8046790), at 0x81e9109 
current thread: t@2
=>[1] __signotifywait(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xdf79b4a7 
  [2] _dynamiclwps(0x0, 0xdf408000, 0x100000, 0x1000, 0xdf407d94, 0xffd94), at 0xdfb5dac9 
current thread: t@3
=>[1] __lwp_sema_wait(0xdf306e6c), at 0xdf79b37c 
  [2] _park(0xdf306d94, 0xdfb7e2c4, 0xdfb7e2c4, 0xdfb7a000, 0xdfb5ce47, 0xdf306d68), at 0xdfb593d9 
  [3] _swtch(0x0), at 0xdfb591e2 
  [4] _reap_wait(0xdfb7e2c4), at 0xdfb5cd85 
  [5] _reaper(0x0, 0xdfb5cb0c), at 0xdfb5cb50 
current thread: t@4
=>[1] __lwp_sema_wait(0xdf660e6c), at 0xdf79b37c 
  [2] _park(0xdf660d94, 0xdfb7b0f0, 0xdf660d94, 0xdfb7a000, 0xdf660d94, 0xdf660c90), at 0xdfb593d9 
  [3] _swtch(0x0), at 0xdfb58fd4 
  [4] cond_timedwait_sig(0xdfb7b0f0, 0xdf660cd0, 0xdf660cf8, 0xdf660cf4, 0x0, 0xdf660cf0), at 0xdfb670f2 
  [5] _ti_sigtimedwait(0xdf660d60, 0x0, 0x0), at 0xdfb673ab 
  [6] _sigwait(0xdf660d60), at 0xdfb671d4 
  [7] __posix_sigwait(0xdf660d60, 0xdf660d74), at 0xdf7c772a 
  [8] signal_hand(0x0, 0x81e74cc), at 0x81e75e3 
current thread: t@6
=>[1] __sigprocmask(0x3, 0xdf61ec40, 0x0), at 0xdfb669ac 
  [2] _resetsig(0x0, 0x6, 0xdfb7a000, 0x0, 0x1, 0xdf620d00), at 0xdfb5d724 
  [3] _sigon(0xdfb7a000, 0xdf61ec9c, 0xdfb5f6f6, 0xdfb81278, 0xb, 0x6), at 0xdfb5d047 
  [4] _lmutex_unlock(0xdfb81278), at 0xdfb5a96c 
  [5] _thrp_kill(0xdf620d94, 0x6, 0xb, 0xdf61ed80, 0xb, 0xb), at 0xdfb5f6f6 
  [6] _thr_kill(0x6, 0xb), at 0xdfb5f5e4 
  [7] my_write_core(0xb), at 0x8402ec5 
  [8] handle_segfault(0xb, 0xdf61f000, 0xdf61ee00, 0xdf61edec, 0xdfb65aca, 0xb), at 0x81e70e2 
  [9] __sighndlr(0xb, 0xdf61f000, 0xdf61ee00, 0x81e6f3c), at 0xdfb579bf 
  ---- called from signal handler with signal 11 (SIGSEGV) ------
  [10] get_best_combination(0x8889140), at 0x8243ffa 
  [11] make_join_statistics(0x8889140, 0x8888e50, 0x0, 0x888a240), at 0x823ff09 
  [12] JOIN::optimize(0x8889140), at 0x823bf6f 
  [13] mysql_select(0x8807020, 0x8808410, 0x8888e50, 0x0, 0x88083ac, 0x0, 0x1, 0x0, 0x8889098, 0x0, 0x0, 0x80044a00, 0x0, 0x8889128, 0x88080a8, 0x8808318, 0x8808318), at 0x823edcc 
  [14] handle_select(0x8807020, 0x880804c, 0x8889128, 0x0), at 0x823b0af 
  [15] execute_sqlcom_select(0x8807020, 0x8888e50), at 0x81f795d 
  [16] mysql_execute_command(0x8807020), at 0x81f19d7 
  [17] mysql_parse(0x8807020, 0x8888b50, 0x2b, 0xdf620d0c), at 0x81f8d5d 
  [18] dispatch_command(0x3, 0x8807020, 0x8851f61, 0x2b), at 0x81f04b8 
  [19] do_command(0x8807020), at 0x81efb3e 
  [20] handle_one_connection(0x8807020, 0x81eea1c), at 0x81eeaf9
[21 Oct 2009 15:43] Joerg Bruehe
Same test failure still in the build of 5.1.40 (42 times).
[1 Jun 2010 12:18] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/109729

3408 Georgi Kodinov	2010-06-01
      Bug#40928 : make main.func_str experimental on Solaris
[2 Jun 2010 8:49] Bugs System
Pushed into 5.1.48 (revid:georgi.kodinov@oracle.com-20100602084411-2yu607bslbmgufl3) (version source revid:georgi.kodinov@oracle.com-20100601121635-a2zisixtnkxasfv9) (merge vers: 5.1.48) (pib:16)
[17 Jun 2010 6:13] Bugs System
Pushed into 5.5.5-m3 (revid:alexey.kopytov@sun.com-20100615145247-8bj0vmuqlotbqsn9) (version source revid:georgi.kodinov@oracle.com-20100601123137-l8svn3xfxtp0y8nk) (merge vers: 5.5.5-m3) (pib:16)
[17 Jun 2010 6:16] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100615150216-cubqoyn1fj9b6a2p) (version source revid:alik@sun.com-20100607075151-xjus8wzgjv3g9ok0) (pib:16)
[14 Oct 2010 8:34] Bugs System
Pushed into mysql-5.1-telco-7.0 5.1.51-ndb-7.0.20 (revid:martin.skold@mysql.com-20101014082627-jrmy9xbfbtrebw3c) (version source revid:vasil.dimov@oracle.com-20100531152341-x2d4hma644icamh1) (merge vers: 5.5.5-m3) (pib:21)
[14 Oct 2010 8:49] Bugs System
Pushed into mysql-5.1-telco-6.3 5.1.51-ndb-6.3.39 (revid:martin.skold@mysql.com-20101014083757-5qo48b86d69zjvzj) (version source revid:vasil.dimov@oracle.com-20100531152341-x2d4hma644icamh1) (merge vers: 5.5.5-m3) (pib:21)
[14 Oct 2010 9:03] Bugs System
Pushed into mysql-5.1-telco-6.2 5.1.51-ndb-6.2.19 (revid:martin.skold@mysql.com-20101014084420-y54ecj85j5we27oa) (version source revid:vasil.dimov@oracle.com-20100531152341-x2d4hma644icamh1) (merge vers: 5.5.5-m3) (pib:21)