Bug #8506 SELECT CONVERT_TZ crashes server.
Submitted: 14 Feb 2005 22:17 Modified: 16 Feb 2005 21:32
Reporter: Chad Clark Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S3 (Non-critical)
Version:Ver 14.7 Distrib 4.1.7 OS:Linux (Slackware Linux 10.0.0)
Assigned to: CPU Architecture:Any

[14 Feb 2005 22:17] Chad Clark
Description:
My client was losing connection when running this query:

  SELECT CONVERT_TZ('2005-02-28 12:00:00', 'Canada/Mountain', 'Canada/Atlantic');

I found that the server was crashing and re-starting.  The following query also crashes the server.

  SELECT CONVERT_TZ(NOW(), 'Canada/Mountain', 'Canada/Atlantic');

I noticed that the client user needed read access to the mysql.time_* tables so I used grant queries like the following:

  grant select on mysql.time_zone_transition_type to 'cl_greet'@'%';

Here is the output from the error log.

050214 14:52:25InnoDB: Error: trying to access a stray pointer (nil)
InnoDB: buf pool start is at 0x413dc000, end at 0x41bdc000
InnoDB: Probable reason is database corruption or memory
InnoDB: corruption. If this happens in an InnoDB database recovery,
InnoDB: you can look from section 6.1 at http://www.innodb.com/ibman.html
InnoDB: how to force recovery.
050214 14:52:25InnoDB: Assertion failure in thread 180236 in file ../include/buf0buf.ic line
 262
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/mysql/en/Forcing_recovery.html
InnoDB: about forcing recovery.
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=3
max_connections=200
threads_connected=2
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 670942 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=0x52300490
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Cannot determine thread, fp=0xbe3fdd18, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x8131043
0x4003bbe5
0x82a4eae
0x81a9fa5
0x81e57b7
0x81e6046
0x8110b98
0x815c132
0x81604a8
0x8163281
0x8160356
0x814058a
0x8144b89
0x813f13f
0x813eac8
0x813e1f8
0x40035cc4
0x4015cbe7
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://dev.mysql.com/doc/mysql/en/Using_stack_trace.html and follow instructions
 on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x8a52590 = SELECT CONVERT_TZ(NOW(), 'Canada/Mountain', 'Canada/Atlantic')
thd->thread_id=12
The manual page at http://www.mysql.com/doc/en/Crashing.html contains
information that should help you find out what is causing the crash.

Number of processes running now: 0
050214 14:52:25  mysqld restarted
050214 14:52:26  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
050214 14:52:26  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 190747831.
InnoDB: Doing recovery: scanned up to log sequence number 0 190747872
InnoDB: Last MySQL binlog file position 0 79, file name ./sql-bin.000033
050214 14:52:26  InnoDB: Flushing modified pages from the buffer pool...
050214 14:52:26  InnoDB: Started; log sequence number 0 190747872
/usr/local/mysql/bin/mysqld: ready for connections.
Version: '4.1.7-max-log'  socket: '/tmp/mysql.sock'  port: 3306  Official MySQL-max binary

How to repeat:
Run the query:

  SELECT CONVERT_TZ(NOW(), 'Canada/Mountain', 'Canada/Atlantic');

Suggested fix:
Unknown.
[15 Feb 2005 11:59] Aleksey Kishkin
Hi! i tested iton slackware 10 against mysql 4.1.9, query browser 1.1.15 and was not able to reproduce this error. I got a NULL string as result.

If you have any ideas how to reproduce this error, please let us know.
[16 Feb 2005 21:23] Chad Clark
I tried on another slackware 10.0 server but running 4.1.9.  I guess it has been fixed since 4.1.7.  Now I just need to get some time to bring down the main server for an upgrade.  :(

I think this bug can be closed.

Thanks,
/Chad
[16 Feb 2005 21:25] Chad Clark
I think the NULL string result means your mysql.time* tables don't exist or have not been populated.  Also after populating the tables I had to stop and start mysqld to get CONVERT_TZ to return anything other than NULL.

/Chad