Bug #49091 | mysql source should support -xO4 optimization level using SunStudio12 | ||
---|---|---|---|
Submitted: | 25 Nov 2009 9:11 | Modified: | 10 Dec 2009 21:35 |
Reporter: | Sunanda Menon | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: Compiling | Severity: | S3 (Non-critical) |
Version: | 5.1.30,5.1.37, 5.1 bzr | OS: | Other (OpenSolaris2009.06) |
Assigned to: | CPU Architecture: | Any |
[25 Nov 2009 9:11]
Sunanda Menon
[25 Nov 2009 10:35]
Valeriy Kravchuk
Thank you for the problem report. Please, check with a newer version of MySQL server, 5.1.41, and inform about the results.
[26 Nov 2009 8:36]
Sunanda Menon
This is not fixed in 5.1.37 that I tested right now.I will not be able to keep testing the sources due to time constraints,but the problem does exists.
[30 Nov 2009 7:54]
Sveta Smirnova
Thank you for the report. Verified as described. Configure used: ./configure --prefix=/users/ssmirnova/host/build/mysql-5.1 --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-big-tables --with-plugins=max-no-ndb --with-embedded-server --enable-local-infile CC=cc CXX=CC CFLAGS=-xO4 CXXFLAGS=-xO4
[30 Nov 2009 7:56]
Sveta Smirnova
Problem is not repeatable on Solaris Sparc box.
[30 Nov 2009 10:28]
Daniel Fischer
With -xO3, it crashes in a different function. $ mdb ../sql/mysqld var/mysqld.1/data/core Loading modules: [ libc.so.1 ld.so.1 ] > $c libc.so.1`_lwp_kill+7(4, b, fea2c658) my_write_core+0x24(b, 8601db4, ea2e, febbff59) handle_segfault+0x1ac(b, 0, fea2c770) libc.so.1`__sighndlr+0xf(b, 0, fea2c770, 8219c28) libc.so.1`call_user_handler+0x22b(b, 0, fea2c770) libc.so.1`sigacthandler+0x65(b, 0, fea2c770) __1cRprev_record_reads6FpnEJOIN_IX_d_+0x2df(89f1860, 3, 1, 0) __1cQbest_access_path6FpnEJOIN_pnNst_join_table_pnDTHD_XIdd_v_+0x1e8(89f1860, 89eeaa4, 89c2b88, 8, 0, 3) __1cbGbest_extension_by_limited_search6FpnEJOIN_XIddII_b_+0x11d(89f1860, 8, 0, 3, 0, 40cca580) __1cbGbest_extension_by_limited_search6FpnEJOIN_XIddII_b_+0x2e2(89f1860, c, 0, 2, 0, 40cca580) __1cbGbest_extension_by_limited_search6FpnEJOIN_XIddII_b_+0x2e2(89f1860, e, 0, 1, 0, 40cca580) __1cbGbest_extension_by_limited_search6FpnEJOIN_XIddII_b_+0x2e2(89f1860, f, 0, 0, 0, 3ff00000) __1cNgreedy_search6FpnEJOIN_XII_b_+0xe1(89f1860, f, 0, 3e, 1, 4) __1cLchoose_plan6FpnEJOIN_X_b_+0xd6(89f1860, f, 0, 8290073) __1cUmake_join_statistics6FpnEJOIN_pnKTABLE_LIST_pnEItem_pnQst_dynamic_array__b_+0x13fa(89f1860, 89ecee0, 0, 89f2960) __1cEJOINIoptimize6M_i_+0x443(89f1860, 0, 89c3e80, 89c3c10) __1cMmysql_select6FpnDTHD_pppnEItem_pnKTABLE_LIST_IrnEList4n0B___p2IpnIst_order_9D39DXpnNselect_result_pnSst_select_lex_unit_pnNst_select_lex __b_+0x2f4(89c2b88, 89c3f78, 89ecee0, 0, 89c3f14, 0) __1cNhandle_select6FpnDTHD_pnGst_lex_pnNselect_result_L_b_+0xf4(89c2b88, 89c3bb4, 89ee528, 0) __1cVexecute_sqlcom_select6FpnDTHD_pnKTABLE_LIST__b_+0x17a(89c2b88, 89ecee0, 0, 0) __1cVmysql_execute_command6FpnDTHD__i_+0x429(89c2b88, fea2ebb0, 0, a7) __1cQdispatch_command6FnTenum_server_command_pnDTHD_pcI_b_+0x2154(3, 89c2b88, 89e4c79, a7) __1cKdo_command6FpnDTHD__b_+0xf0(89c2b88, 3c, fea2efd8, 8225f01) handle_one_connection+0x303(89c2b88) libc.so.1`_thr_setup+0x4e(fea30a00) libc.so.1`_lwp_start(fea30a00, 0, 0, fea2eff8, febc72e0, fea30a00)
[30 Nov 2009 11:14]
Daniel Fischer
Difference in prev_record_reads optimisation between -xO2: 5479. static double 5480. prev_record_reads(JOIN *join, uint idx, table_map found_ref) 5481. { 5482. double found=1.0; 5483. POSITION *pos_end= join->positions - 1; Discovered loop below has tag L266 Bounds test for L266 moved to top of loop 5485. for (POSITION *pos= join->positions + idx - 1; pos != pos_end; pos--) And -xO3: 5479. static double 5480. prev_record_reads(JOIN *join, uint idx, table_map found_ref) 5481. { 5482. double found=1.0; 5483. POSITION *pos_end= join->positions - 1; Source loop below has tag L49 L49 multi-versioned for improved-termination-test. Specialized version is L218 5485. for (POSITION *pos= join->positions + idx - 1; pos != pos_end; pos--)
[30 Nov 2009 12:15]
Daniel Fischer
Workaround: #pragma opt 2 (prev_record_reads) Setting to W5 since this bug only affects users who compile from source. Setting effort to E2. This is a compiler bug, but we could conditionallly include the above workaround on Solaris/Intel platforms.
[2 Dec 2009 11:34]
Alexey Kopytov
See bug #41710.
[4 Dec 2009 15:38]
Laurent Boschet
I had this bug on a fresh installed OpenSOlaris 2009.06 and the GA webstack (# pkg install amp) that I installed a few days ago. I just want to mention that I had the issue on a non-recompiled version of mysql: root# pkg list SUNWmysql51 NAME (PUBLISHER) VERSION STATE UFIX SUNWmysql51 5.1.30-0.111 installed ---- root# cat /etc/release OpenSolaris 2009.06 snv_111b X86 Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. Assembled 07 May 2009 I was able to reproduce the issue easyly using the SQL commands given in the error messages and pasted it into a mysql session => mysqld crashed. So, I assume that a lot of people will hit this bug. I 'll need to revert to Mysql 5.0.67 version. Regards,
[10 Dec 2009 21:35]
Omer Barnir
Duplicate of bug#43741
[18 Jan 2010 13:04]
Richie Chauhan
Probably should be marked Critical as it is part of the standard OpenSolaris download and it is forcing a downgrade. Details Name: SUNWmysql51 Summary: MySQL 5.1 - MySQL Database Management System (root component) Publisher: opensolaris.org Version: 5.1.30 Build Release: 5.11 Branch: 0.111 Packaging Date: Fri May 8 16:23:07 2009 Size: 448.23 MB FMRI: pkg:/SUNWmysql51@5.1.30,5.11-0.111:20090508T162307Z