Bug #7666 Cannot use raw device for InnoDB
Submitted: 4 Jan 2005 16:36 Modified: 5 Feb 2005 13:21
Reporter: [ name withheld ] Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1.7/4.1.8 OS:Linux (SuSE SLES8 SP3)
Assigned to: Assigned Account CPU Architecture:Any

[4 Jan 2005 16:36] [ name withheld ]
Description:
050104 18:03:26 [Warning] One can only use the --user switch if running as root

InnoDB: The first specified data file /dev/sdb1 did not exist:
InnoDB: a new database to be created!
050104 18:03:26  InnoDB: Setting file /dev/sdb1 size to 1024 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Progress in MB: 100 200 300 400 500 600 700 800 900 1000
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=0
read_buffer_size=131072
max_used_connections=0
max_connections=100
threads_connected=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 217599 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=(nil)
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=0xbfffa9c8, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x814d2bf
0x40050a6a
0x821569b
0x8215729
0x8216c92
0x81d2687
0x81ca155
0x815017d
0x814d94b
0x401994c2
0x80d69f1
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
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.

How to repeat:
1. chmod /dev/sdb1 and /dev/sdb3 to let user "mysql417gcc" have right to access these devices.

2. set ./my.cnf as the following:
[mysqld]
user            = root
port            = 3306
socket          = /tmp/mysql.sock

innodb_data_home_dir =
innodb_data_file_path = /dev/sdb1:1Gnewraw
innodb_log_group_home_dir =
innodb_log_arch_dir = /dev/sdb3:1Gnewraw

3. run mysqld

./mysqld --basedir=$MYSQL_BASEDIR \
  --skip-grant-tables \
  --socket=/tmp/mysql.sock
[4 Jan 2005 23:01] MySQL Verification Team
Verified on Fedora Core 3 with 4.1.8 version:

InnoDB: The first specified data file /dev/hdb2 did not exist:
InnoDB: a new database to be created!
050104 20:57:07  InnoDB: Setting file /dev/hdb2 size to 1024 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Progress in MB: 100 200 300 400 500 600 700 800 900 1000
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=0
read_buffer_size=131072
max_used_connections=0
max_connections=100
threads_connected=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 217599 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=(nil)
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=0xfeffc7b8, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x808dc17
0x82e45b8
0x8140afb
0x8140bbd
0x8142340
0x8101284
0x80f9867
0x808ee88
0x808f20a
0x82ec6a4
0x8048101
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 followinstructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
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.
[5 Jan 2005 0:57] MySQL Verification Team
Sorry I did a mistake in my last test (with the raw device point). I will test it again.
[5 Jan 2005 3:31] MySQL Verification Team
Ok.. now tested with the correct device.
[5 Jan 2005 13:21] Heikki Tuuri
Miguel, Zhang,

please resolve the stack dump. I guesss the call of fsync() crashes on a raw device.

Thank you,

Heikki
[13 Jan 2005 13:03] Aleksey Kishkin
Hmm. at least it works for slackware 10 (kernel 2.6.7) and mysql 4.1.9. 
Innodb fails on 

innodb_log_arch_dir = /dev/(somedevice):1Gnewraw

but I think it's not a bug. Raw device with data was initialized without error. I am going to check on kernel 2.4, on mysql 4.1.7, and (if all previous test dont produce sigsegv) other distribution (FC or RH or Suse)
[14 Feb 2005 22:54] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".