Hi Heikki,


Thanks so much for taking the time to look into this. No wonder you have such a great product.

When 4.0.17 comes out, I'll certainly test it.

Thanks again,

Don


Heikki Tuuri wrote:


Don,

I believe I found the bug.

"
MySQL/InnoDB-4.0.17, December xx, 2003

* Fixed a bug: if you created a column prefix secondary index and updated it
so that the last characters in the column prefix were spaces, InnoDB would
assert in row0upd.c, line 713. The same assertion failed if you updated a
column in an ordinary secondary index so that the new value was
alphabetically equivalent, but had a different length. This could happen,
for example, in the utf-8 character set if you updated a letter to its
accented or umlaut form.
"

This also explains the assertion reported by Bruce Dembecki with a column
prefix index. This fixes also a bug reported by someone about updating utf-8
accent characters, I do not remember who made that bug report.

Please test with 4.0.17 when it comes out.

Thank you,

Heikki

----- Alkuperäinen viesti ----- Lähettäjä: "Don MacAskill" <[EMAIL PROTECTED]>
Vastaanottaja: "Heikki Tuuri" <[EMAIL PROTECTED]>
Kopio: <[EMAIL PROTECTED]>
Lähetetty: Thursday, December 11, 2003 2:29 AM
Aihe: Re: MySQL 4.0.16 64bit crash report




Hi Heikki,

Heikki Tuuri wrote:


Don,

it is the assertion below which fails.

Do you use FOREIGN KEY .... ON UPDATE CASCADE?


Nope.



Do you have any idea which query causes the crash?


I didn't, but after Googling for similar problems, I found a thread where you had talked about a bug in a column prefix index. (here's the message:

http://archives.neohapsis.com/archives/mysql/2003-q4/0697.html )


I was fairly sure I wasn't using any column prefix indexes, but sure
enough, there was one.  I removed the index, and MySQL has stopped
crashing completely.

Now, it's entirely possible that whichever user was submitting some
query just stopped at the same time I removed that index.  But prior to
my doing that, MySQL was crashing every few minutes.  Probably a dozen
times within an hour or two.

I'm keeping a close eye on it, and if it happens again, I'll turn the
query log on to see if I can catch it.


Please run CHECK TABLE on suspicious tables.

Can you test on an x86 computer?


I would be happy to, but since I don't know which query is doing it, I'm not sure it'd be much use. I can't easily put an x86 box into production to get the same load on it.


Have you changed the default character set of the server in my.cnf?


Nope.



Can you please send me your my.cnf.


Here it is. I actually had the innodb buffer set to 4G before, and lowered it to see if we were still hitting some old 32bit limit or something. Of course, there was no change, the crashes still occurred.

FWIW, this on Red Hat Enterprise 3 for AMD64.

---

[mysqld]
datadir         = /xserve1/mysql
port            = 3306
socket          = /tmp/mysql.sock
pid-file        = /xserve1/mysql/zeus.pid
skip-external-locking
set-variable    = key_buffer=256M
set-variable    = max_allowed_packet=10M
set-variable    = table_cache=256
set-variable    = sort_buffer=1M
set-variable    = read_buffer_size=1M
set-variable    = thread_cache=8
set-variable    = thread_concurrency=4
set-variable    = myisam_sort_buffer_size=512M
set-variable    = query_cache_size=512M
set-variable    = query_cache_type=1
set-variable    = max_connections=500
set-variable    = long_query_time=1

log-bin
server-id=1

innodb_data_home_dir = /xserve1/mysql/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /xserve1/mysql/
innodb_log_arch_dir = /xserve1/mysql/
set-variable = innodb_buffer_pool_size=2G
set-variable = innodb_additional_mem_pool_size=20M
set-variable = innodb_log_file_size=512M
set-variable = innodb_log_buffer_size=8M
innodb_flush_log_at_trx_commit=1
set-variable = innodb_lock_wait_timeout=50

log-slow-queries
log-error
open-files-limit=8192
ft_min_word_len=3

max_connect_errors = 1000000000

---

Thanks for your reply!  Please let me know if there's anything else I
can do.  I'm happy to help test and debug.

Don



Heikki Tuuri
Innobase Oy
http://www.innodb.com
Foreign keys, transactions, and row level locking for MySQL
InnoDB Hot Backup - hot backup tool for InnoDB which also backs up

MyISAM


tables


Order MySQL technical support from https://order.mysql.com/





.................. Builds an update vector from those fields which in a secondary index

entry


differ from a record that has the equal ordering fields. NOTE: we

compare


the fields as binary strings! */

upd_t*
row_upd_build_sec_rec_difference_binary(
/*====================================*/
                               /* out, own: update vector of differing
                               fields */
       dict_index_t*   index,  /* in: index */
       dtuple_t*       entry,  /* in: entry to insert */
       rec_t*          rec,    /* in: secondary index record */
       mem_heap_t*     heap)   /* in: memory heap from which allocated

*/


{
       upd_field_t*    upd_field;
       dfield_t*       dfield;
       byte*           data;
       ulint           len;
       upd_t*          update;
       ulint           n_diff;
       ulint           i;

       /* This function is used only for a secondary index */
       ut_ad(0 == (index->type & DICT_CLUSTERED));

update = upd_create(dtuple_get_n_fields(entry), heap);

n_diff = 0;

for (i = 0; i < dtuple_get_n_fields(entry); i++) {

data = rec_get_nth_field(rec, i, &len);

dfield = dtuple_get_nth_field(entry, i);

ut_a(len == dfield_get_len(dfield));


----- Original Message ----- From: "Don MacAskill" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.myodbc
Sent: Wednesday, December 10, 2003 7:49 PM
Subject: MySQL 4.0.16 64bit crash report





I'm running 4.0.16 on a dual-Opteron using the 64bit mysql-max binary
distribution (tar.gz, not rpm) from mysql.com.  I have 8GB of RAM, and
it was using about 4.5GB at the time of the crash.

031210  9:24:34  InnoDB: Assertion failure in thread 1171265904 in file
row0upd.c line 713
InnoDB: Failing assertion: len == dfield_get_len(dfield)
InnoDB: We intentionally generate a memory trap.
InnoDB: Send a detailed bug report to [EMAIL PROTECTED]
InnoDB: Thread 1183455600 stopped in file ha_innodb.cc line 396
InnoDB: Thread 1176770928 stopped in file ha_innodb.cc line 396
mysqld got signal 11;
This could be because you hit a bug. It is also possible that this

binary


or one of the libraries it was linked against is corrupt, improperly

built,



or misconfigured. This error can also be caused by malfunctioning

hardware.



We will try our best to scrape up some info that will hopefully help
diagnose
the problem, but since we have already crashed, something is definitely
wrong
and this may fail.

key_buffer_size=268435456
read_buffer_size=1044480
max_used_connections=336
max_connections=500
threads_connected=143
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections
= 1284140 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

InnoDB: Thread 1174018416 stopped in file ha_innodb.cc line 396
InnoDB: Thread 1214912880 stopped in file ha_innodb.cc line 396

Number of processes running now: 0


Any ideas?


Thanks,

Don





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:

http://lists.mysql.com/[EMAIL PROTECTED]







--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to