Bug #35331 Crash in Field::maybe_null on view updates
Submitted: 17 Mar 2008 11:18 Modified: 28 Nov 2008 15:02
Reporter: Philip Stoev Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Views Severity:S3 (Non-critical)
Version:6.0-falcon-team OS:Any
Assigned to: Alexey Kopytov CPU Architecture:Any

[17 Mar 2008 11:18] Philip Stoev
Description:
When executing a concurrent workload involving updates on nested views, mysqld crashes with the following backtrace:

#0  0x00110402 in __kernel_vsyscall ()
#1  0x00bdc617 in pthread_kill () from /lib/libpthread.so.0
#2  0x08446fd7 in write_core (sig=11) at stacktrace.c:305
#3  0x082a1ec7 in handle_segfault (sig=11) at mysqld.cc:2598
#4  <signal handler called>
#5  0x081d74c7 in Field::maybe_null (this=0x0) at ../../sql/field.h:266
#6  0x0831dee2 in create_tmp_field (thd=0xab8fca0, table=0xac41798, item=0xabdce60, type=Item::FIELD_ITEM, copy_func=0xa9cfb1ec, from_field=0xac420e8,
    default_field=0xac420c0, group=false, modify_item=false, table_cant_handle_bit_fields=false, make_copy_field=false, convert_blob_length=0)
    at sql_select.cc:11357
#7  0x0831f0c7 in create_tmp_table (thd=0xab8fca0, param=0xac07d54, fields=@0xabdac50, group=0x0, distinct=false, save_sum_fields=true,
    select_options=2416204288, rows_limit=18446744073709551615, table_alias=0xabde640 "v2112") at sql_select.cc:11777
#8  0x08445362 in select_union::create_result_table (this=0xac07d48, thd_arg=0xab8fca0, column_types=0xabdac50, is_union_distinct=false, options=2416204288,
    table_alias=0xabde640 "v2112", bit_fields_as_long=false) at sql_union.cc:127
#9  0x08446b5f in mysql_derived_prepare (thd=0xab8fca0, lex=0xab90d28, orig_table_list=0xabde648) at sql_derived.cc:139
#10 0x084466df in mysql_handle_derived (lex=0xab90d28, processor=0x8446992 <mysql_derived_prepare(THD*, st_lex*, TABLE_LIST*)>) at sql_derived.cc:56
#11 0x08354d1c in mysql_multi_update_prepare (thd=0xab8fca0) at sql_update.cc:964
#12 0x082b4e88 in mysql_execute_command (thd=0xab8fca0) at sql_parse.cc:2794
#13 0x082bb6ca in mysql_parse (thd=0xab8fca0, inBuf=0xabddc88 "UPDATE v1221 SET f2 = (SELECT MAX(f2) FROM v2112) + 20 ORDER BY f2 DESC LIMIT 1", length=79,
    found_semicolon=0xa9cfc270) at sql_parse.cc:5643
#14 0x082bc0e3 in dispatch_command (command=COM_QUERY, thd=0xab8fca0,
    packet=0xabc7081 "UPDATE v1221 SET f2 = (SELECT MAX(f2) FROM v2112) + 20 ORDER BY f2 DESC LIMIT 1", packet_length=79) at sql_parse.cc:1030
#15 0x082bd262 in do_command (thd=0xab8fca0) at sql_parse.cc:722
#16 0x082aab76 in handle_one_connection (arg=0xab8fca0) at sql_connect.cc:1122
#17 0x00bd750b in start_thread () from /lib/libpthread.so.0
#18 0x00b18b2e in clone () from /lib/libc.so.6

How to repeat:
Test case will follow shortly.
[17 Mar 2008 11:28] Philip Stoev
Test case for bug #35331

Attachment: bug35331.zip (application/x-zip-compressed, text), 1.03 KiB.

[17 Mar 2008 11:30] Philip Stoev
To repeat, please unpack the archive and place the .txt file in mysql-test and the .test files in mysql-test/t . Then run:

$ perl ./mysql-test-run.pl --stress --stress-test-file=bug35331_run.txt \
--stress-test-duration=7200  --stress-threads=10 --skip-ndb

The crash will happen immediately.
[19 Mar 2008 18:07] Philip Stoev
This bug is reproducible on the latest mysql-6.0 bitkeeper tree and does not involve Falcon tables, just MyISAM.
[24 Mar 2008 23:29] Sveta Smirnova
Thank you for the report.

Verified as described.
[14 Nov 2008 20:23] Omer Barnir
triage: Updating tag from SR60GA to SR60BETA based on current guidelines as the SR60GA tag was set before there were criteria for the 6.0 release phases and bugs should not be set to SR60GA when we are still in alpha
[28 Nov 2008 15:02] Alexey Kopytov
Failed to repeat on the latest 6.0-bzr after running the attached test case for ~30 mins.