Easy way to crash 4.1.0-alpha (read more and find out)
am 04.02.2004 15:29:36 von martinHi people,
A coworker of mine is capable of crashing MySQL 4.1.0-alpha
(hand compiled) with the following query:
SELECT master_servicestatus.host_name, service_description,
if(scheduled_downtime_depth>0, service_status_code -10,
service_status_code) as 'service_status_code', last_state_change,
SUBSTRING(plugin_output,1,100), is_flapping FROM master_servicestatus
join nagios_Master_translation on master_servicestatus.host_name =
nagios_Master_translation.host_name where master_host_id in ( 1865 ,
1856 , 1866 , 1868 , 1876 , 1882 , 1888 , 1890 , 1858 , 1859 , 1864 ,
1841 , 1870 , 1869 , 1886 , 1873 , 1874 , 1879 , 1880 , 1842 , 1871 ,
1889 , 1855 , 1885 , 1844 , 1843 , 1877 , 1878 , 1845 , 1846 , 1847 ,
1848 , 1849 , 1850 , 1851 , 1852 , 1862 , 1853 , 1881 , 1860 , 1883 ,
1867 , 1861 , 1875 , 1887 , 1854 , 1884 , 1857 , 2058 ) and
checks_enabled = 1 and last_state_change < date_add(now(), INTERVAL -0
SECOND) and service_status_code > 0 group by
master_servicestatus.host_name having
count(master_servicestatus.host_name) = 1 union Select
master_servicestatus.host_name,
concat(Count(master_servicestatus.host_name), ' Problems detected'),
max(service_status_code), min(last_state_change) , 'More than one', 0
FROM master_servicestatus join nagios_Master_translation on
master_servicestatus.host_name = nagios_Master_translation.host_name
where master_host_id in ( 1865 , 1856 , 1866 , 1868 , 1876 , 1882 , 1888
, 1890 , 1858 , 1859 , 1864 , 1841 , 1870 , 1869 , 1886 , 1873 , 1874 ,
1879 , 1880 , 1842 , 1871 , 1889 , 1855 , 1885 , 1844 , 1843 , 1877 ,1878 , 1845 , 1846 , 1847 , 1848 , 1849 , 1850 , 1851 , 1852 , 1862 ,
1853 , 1881 , 1860 , 1883 , 1867 , 1861 , 1875 , 1887 , 1854 , 1884 ,
1857 , 2058 ) and checks_enabled = 1 and last_state_change <
date_add(now(), INTERVAL -0 SECOND) and service_status_code > 0 and
scheduled_downtime_depth = 0 group by master_servicestatus.host_name
having count(master_servicestatus.host_name) > 1 union Select
master_servicestatus.host_name,
concat(Count(master_servicestatus.host_name), ' Problems detected'),
max(service_status_code)-10, min(last_state_change) , 'More than one', 0
FROM master_servicestatus join nagios_Master_translation on
master_servicestatus.host_name = nagios_Master_translation.host_name
where master_host_id in ( 1865 , 1856 , 1866 , 1868 , 1876 , 1882 , 1888
, 1890 , 1858 , 1859 , 1864 , 1841 , 1870 , 1869 , 1886 , 1873 , 1874 ,
1879 , 1880 , 1842 , 1871 , 1889 , 1855 , 1885 , 1844 , 1843 , 1877 ,
1878 , 1845 , 1846 , 1847 , 1848 , 1849 , 1850 , 1851 , 1852 , 1862 ,
1853 , 1881 , 1860 , 1883 , 1867 , 1861 , 1875 , 1887 , 1854 , 1884 ,
1857 , 2058 ) and checks_enabled = 1 and last_state_change <
date_add(now(), INTERVAL -0 SECOND) and service_status_code > 0 and
scheduled_downtime_depth > 0 group by master_servicestatus.host_name
having count(master_servicestatus.host_name) > 1 order by
service_status_code desc, last_state_change desc;
I'm not really sure what he tried to do here (I'm more a Perl hacker)
but you probably do. :)
The stacktrace resolves into the following:
0x811d71c handle_segfault + 416
0x4003c929 _end + 935996509
0xcea9 (?)
0x814999d _ZN4JOIN7cleanupEP3THD + 165
0x81b22f1 _ZN18st_select_lex_unit7cleanupEv + 97
0x81b149b _Z11mysql_unionP3THDP6st_lexP13select_resultP18st_select_lex _unitb + 43
0x8146f68 _Z13handle_selectP3THDP6st_lexP13select_result + 100
0x812a6e8 _Z21mysql_execute_commandP3THD + 768
0x812ea8d _Z11mysql_parseP3THDPcj + 205
0x81294e3 _Z16dispatch_command19enum_server_commandP3THDPcj + 859
0x812914e _Z10do_commandP3THD + 110
0x8128aa1 handle_one_connection + 769
0x40036ada _end + 935972366
0x402828c7 _end + 938380283
After which MySQL crashes and restarts. I'm very glad it restarts. My
coworker on the other hand would like the query to work.
I hope you can help me out helping him out. If you have questions, I'll
be very happy to oblige.
Thanks for reading,
Martin Boer
--
Tin will not rust or give in but melts directly when heated =B-)
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org