Please see below for the answers to your questions.  I hope this helps
to diagnose the problem.  Please let me know if you need any more
information as this seems to be happening to more and more people. 
Thanks.

On Sun, 2003-08-10 at 04:29, Heikki Tuuri wrote:
> Richard,
> 
> > thd->query at 0x89af670 = SELECT * FROM order_data WHERE viewed='' ORDER
> > BY order_num DESC
> 

Also, a note about the above query:  that query probably caused the
crash or had something to do with it, but I don't think that is the root
problem.  I believe that an INSERT is causing the problem and since the
INSERT causes corruption, the SELECT doesn't work right.  Sometimes the
server crashes and sometimes it doesn't.

> what does
> 
> SHOW CREATE TABLE order_data;
> 
> say?
> 

CREATE TABLE `order_data` (
  `order_num` int(11) NOT NULL auto_increment,
  `client_id` int(11) NOT NULL default '0',
  `stamp` datetime NOT NULL default '0000-00-00 00:00:00',
  `link_id` int(11) NOT NULL default '0',
  `ship_first_name` varchar(128) NOT NULL default '',
  `ship_last_name` varchar(200) NOT NULL default '',
  `ship_address1` varchar(128) NOT NULL default '',
  `ship_address2` varchar(128) NOT NULL default '',
  `ship_city` varchar(128) NOT NULL default '',
  `ship_state` varchar(4) NOT NULL default '',
  `ship_zip` varchar(12) NOT NULL default '',
  `ship_country` varchar(128) NOT NULL default '',
  `ship_phone` varchar(64) NOT NULL default '',
  `ship_business_phone` varchar(128) NOT NULL default '',
  `ship_mobile_phone` varchar(32) NOT NULL default '',
  `ship_fax` varchar(64) NOT NULL default '',
  `ship_email` varchar(128) NOT NULL default '',
  `ship_company` varchar(200) NOT NULL default '',
  `bill_first_name` varchar(64) NOT NULL default '',
  `bill_last_name` varchar(128) NOT NULL default '',
  `bill_address1` varchar(200) NOT NULL default '',
  `bill_address2` varchar(200) NOT NULL default '',
  `bill_city` varchar(200) NOT NULL default '',
  `bill_state` varchar(4) NOT NULL default '',
  `bill_zip` varchar(16) NOT NULL default '',
  `bill_country` varchar(128) NOT NULL default '',
  `bill_phone` varchar(32) NOT NULL default '',
  `bill_business_phone` varchar(32) NOT NULL default '',
  `bill_mobile_phone` varchar(32) NOT NULL default '',
  `bill_fax` varchar(32) NOT NULL default '',
  `bill_email` varchar(128) NOT NULL default '',
  `bill_company` varchar(128) NOT NULL default '',
  `salesman` varchar(32) NOT NULL default '',
  `ship_date` date NOT NULL default '0000-00-00',
  `cc_type` tinyint(4) NOT NULL default '0',
  `cc_number` varchar(128) NOT NULL default '',
  `cc_exp_month` tinyint(4) NOT NULL default '0',
  `cc_exp_year` tinyint(4) NOT NULL default '0',
  `model_id` varchar(128) NOT NULL default '',
  `extended_warranty` varchar(128) NOT NULL default '',
  `shipping_cost` float(10,2) NOT NULL default '0.00',
  `shipping_method` varchar(255) NOT NULL default '',
  `quantity` tinyint(4) NOT NULL default '1',
  `comments` text NOT NULL,
  `amt_paid` float(7,2) NOT NULL default '0.00',
  `tracking` varchar(64) NOT NULL default '',
  `arrival_date` date NOT NULL default '0000-00-00',
  `payment_type` tinyint(4) NOT NULL default '0',
  `cogs` float(10,2) NOT NULL default '0.00',
  `paid_stamp` datetime NOT NULL default '0000-00-00 00:00:00',
  `returned` char(1) NOT NULL default 'n',
  `build_type` varchar(128) NOT NULL default '',
  `shipping` varchar(128) NOT NULL default '',
  `sales_tax` float(7,3) NOT NULL default '0.000',
  `order_status` varchar(255) NOT NULL default '115',
  `viewed` varchar(32) NOT NULL default '',
  `order_representative` varchar(255) NOT NULL default '',
  `due_date` date NOT NULL default '0000-00-00',
  `cc_name` varchar(128) NOT NULL default '',
  `cc_charged` int(11) NOT NULL default '0',
  `po_number` varchar(255) NOT NULL default '',
  `total` float(7,2) NOT NULL default '0.00',
  `ship_midinit` varchar(32) NOT NULL default '',
  `bill_midinit` varchar(32) NOT NULL default '',
  `entry_domain` varchar(255) NOT NULL default '',
  `last_seen` datetime default NULL,
  `giftcardtext` varchar(120) default NULL,
  `giftwrap` enum('Y','N') NOT NULL default 'N',
  `cc_card_code` varchar(4) NOT NULL default '',
  PRIMARY KEY  (`order_num`),
  KEY `ship_first_name` (`ship_first_name`(4)),
  KEY `ship_last_name` (`ship_last_name`(6)),
  KEY `bill_first_name` (`bill_first_name`(4)),
  KEY `bill_last_name` (`bill_last_name`(6)),
  KEY `ship_state` (`ship_state`(2)),
  KEY `bill_state` (`bill_state`(2)),
  KEY `viewed` (`viewed`(7)),
  KEY `order_status` (`order_status`)
) TYPE=MyISAM

> What does
> 
> CHECK TABLE order_data;
> 
> say? Does it print anything to the .err log in the MySQL datadir?
> 

The check says "ok" now, but the table was corrupted after the crash.  I
repaired it, but no messages were printed to the log.  Usually a row is
lost however and sometimes a message like this is found in the log:

Note: Found 804 of 805 rows when repairing

> Please resolve the stack trace below:
> 
> > Stack range sanity check OK, backtrace follows:
> > 0x80dbe1f
> > 0x4003b47e
> > 0x8101e09
> > 0x810e90d
> > 0x80e6d8a
> > 0x80ea88b
> > 0x80e5ed3
> > 0x80ebe0e
> > 0x80e50bf
> > 0x40035941
> > 0x420da1ca
> > New value of fp=(nil) failed sanity check, terminating stack trace!
> > Please read http://www.mysql.com/doc/en/Using_stack_trace.html and
> > follow instructions on how to resolve the stack trace.
> 

resolve_stack_dump -s mysqld-max.sym -n mysql.stack
0x80dbe1f handle_segfault + 423
0x4003b47e _end + 934910594
0x8101e09
mysql_select__FP3THDP13st_table_listRt4List1Z4ItemP4ItemP8st_orderT4T3T4UlP13select_result
 + 6937
0x810e90d handle_select__FP3THDP6st_lexP13select_result + 101
0x80e6d8a mysql_execute_command__Fv + 966
0x80ea88b mysql_parse__FP3THDPcUi + 559
0x80e5ed3 dispatch_command__F19enum_server_commandP3THDPcUi + 1471
0x80ebe0e do_command__FP3THD + 154
0x80e50bf handle_one_connection + 635
0x40035941 _end + 934887237
0x420da1ca _end + 969115598


> Best regards,
> 
> Heikki Tuuri
> Innobase Oy
> http://www.innodb.com
> Transactions, foreign keys, and a hot backup tool for MySQL
> Order MySQL technical support from https://order.mysql.com/
> 
> 
> 
> ----- Original Message ----- 
> From: "Richard Gabriel" <[EMAIL PROTECTED]>
> Newsgroups: mailing.database.mysql
> Sent: Friday, August 08, 2003 11:50 PM
> Subject: read_const error 127 - then MySQL dies
> 
> 
> > Hi all,
> >
> > The following keeps happening and I can't pinpoint a query that is
> > causing it.  It did not happen in 3.23.x, but started upon upgrading to
> > 4.0.14.  The operating system/hardware information is as follows:
> >
> > RedHat 8.0 - kernel 2.4.18SMP
> > 4x Xeon Processors
> > 4x 80GB SCSI drives (hardware RAID-10)
> > 2GB RAM
> >
> > The following is a log exerpt:
> >
> > 030808 15:22:09  read_const: Got error 127 when reading table ****
> > 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=8388600
> > read_buffer_size=131072
> > max_used_connections=184
> > max_connections=1000
> > threads_connected=21
> > It is possible that mysqld could use up to
> > key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections
> > = 2184184 K
> > bytes of memory
> > Hope that's ok; if not, decrease some variables in the equation.
> >
> > thd=0x98772088
> > 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=0x98a4ad98, backtrace may not be correct.
> > Stack range sanity check OK, backtrace follows:
> > 0x80dbe1f
> > 0x4003b47e
> > 0x8101e09
> > 0x810e90d
> > 0x80e6d8a
> > 0x80ea88b
> > 0x80e5ed3
> > 0x80ebe0e
> > 0x80e50bf
> > 0x40035941
> > 0x420da1ca
> > New value of fp=(nil) failed sanity check, terminating stack trace!
> > Please read http://www.mysql.com/doc/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 0x89af670 = SELECT * FROM order_data WHERE viewed='' ORDER
> > BY order_num DESC
> > thd->thread_id=42660972
> > 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
> > 030808 15:22:19  mysqld restarted
> > 030808 15:22:20  InnoDB: Database was not shut down normally.
> > InnoDB: Starting recovery from log files...
> > InnoDB: Starting log scan based on checkpoint at
> > InnoDB: log sequence number 5 4012008225
> > InnoDB: Doing recovery: scanned up to log sequence number 5 4012079335
> > 030808 15:22:20  InnoDB: Starting an apply batch of log records to the
> > database...
> > InnoDB: Progress in percents: 31 32 33 34 35 36 37 38 39 40 41 42 43 44
> > 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
> > 69 70 71 72 73 74 75
> > InnoDB: Apply batch completed
> > InnoDB: Last MySQL binlog file position 0 1058709429, file name
> > ./db1-bin.062
> > 030808 15:22:21  InnoDB: Flushing modified pages from the buffer pool...
> > 030808 15:22:21  InnoDB: Started
> > /usr/sbin/mysqld-max: ready for connections.
> > Version: '4.0.14-Max-log'  socket: '/var/lib/mysql/mysql.sock'  port:
> > 3306
> >
> >
> > This happens often.  Any ideas?  Thanks.
> >
> > -- 
> > Richard Gabriel <[EMAIL PROTECTED]>
> >
> > -- 
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
> >
-- 
Richard Gabriel <[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