Bug #19183 Mysqld crashes, then restarts
Submitted: 19 Apr 2006 5:11 Modified: 11 Jul 2006 15:15
Reporter: Mr Antoine Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:3.23.54 OS:Linux (Red Hat Linux release 7.2 (Enigm)
Assigned to: CPU Architecture:Any

[19 Apr 2006 5:11] Mr Antoine
Description:
Sometimes, mysqld crashes, then restarts.

In /var/log/mysqld.log, I get :
-------------------------------------------------------------------------------
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
record_buffer=131072
sort_buffer=2097144
max_used_connections=77
max_connections=1000
threads_connected=16
It is possible that mysqld could use up to
key_buffer_size + (record_buffer + sort_buffer)*max_connections = 2184184 K
bytes of memory
Hope that's ok, if not, decrease some variables in the equation

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...
Stack range sanity check OK, backtrace follows:
0x80b3c9f
0x4002cac5
0x80fe6b0
0x814739c
0x818b1c6
0x8180d1d
0x817e881
0x815b0a0
0x81571ab
0x8100bfa
0x80f737a
0x80dae6e
0x80da38c
0x80da104
0x80d2c84
0x80b9f1f
0x80bd315
0x80b9213
0x80b87c9
Stack trace seems successful - bottom reached
Please read http://www.mysql.com/doc/U/s/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 0x857d6c0 = SELECT id_mois , id_forfait FROM dby_temps WHERE id_inscrit = 9227 AND ((annee < 2006) OR ((annee = 2006) AND (id_mois <= 4))) ORDER BY annee DESC , id_mois DESC LIMIT 1
thd->thread_id=7700

Successfully dumped variables, if you ran with --log, take a look at the
details of what thread 7700 did to cause the crash.  In some cases of really
bad corruption, the values shown above may be invalid

The manual page at http://www.mysql.com/doc/C/r/Crashing.html contains
information that should help you find out what is causing the crash

Number of processes running now: 0
060419 06:32:55  mysqld restarted
/usr/libexec/mysqld: ready for connections
-------------------------------------------------------------------------------

After doing what is explaint on http://www.mysql.com/doc/U/s/Using_stack_trace.html, I get :
-------------------------------------------------------------------------------
[root@ensim tmp]# resolve_stack_dump -s /tmp/mysqld.sym -n mysqld.stack
0x80b3c9f handle_segfault__Fi + 431
0x4002cac5 _end + 937274461
0x80fe6b0 berkeley_cmp_packed_key__FP4__dbPC8__db_dbtT1 + 80
0x814739c __bam_cmp + 288
0x818b1c6 __bam_search + 886
0x8180d1d __bam_c_search + 1633
0x817e881 __bam_c_get + 1297
0x815b0a0 __db_c_get + 840
0x81571ab __db_get + 323
0x8100bfa rnd_pos__11ha_berkeleyPcT1 + 106
0x80f737a rr_from_pointers__FP14st_read_record + 58
0x80dae6e join_init_read_record__FP13st_join_table + 78
0x80da38c sub_select__FP4JOINP13st_join_tableb + 76
0x80da104 do_select__FP4JOINPt4List1Z4ItemP8st_tableP9Procedure + 404
0x80d2c84 mysql_select__FP3THDP13st_table_listRt4List1Z4ItemP4ItemP8st_orderT4T3T4UiP13select_result + 7268
0x80b9f1f mysql_execute_command__Fv + 831
0x80bd315 mysql_parse__FP3THDPcUi + 69
0x80b9213 do_command__FP3THD + 1219
0x80b87c9 handle_one_connection__FPv + 633
[root@ensim tmp]#
-------------------------------------------------------------------------------

Schema for table dby_temps is :
CREATE TABLE `dby_temps` (
  `id_inscrit` int(11) NOT NULL default '0',
  `annee` int(4) NOT NULL default '0',
  `id_mois` int(2) NOT NULL default '0',
  `id_forfait` int(4) NOT NULL default '0',
  `sec_jour` int(7) NOT NULL default '0',
  `sec_nuit` int(7) NOT NULL default '0',
  `sec_hf` int(7) NOT NULL default '0',
  `sec_24h` int(7) NOT NULL default '0',
  `sec_inv` int(7) NOT NULL default '0',
  `sec_hsc` int(7) NOT NULL default '0',
  `sec_hc` int(7) NOT NULL default '0',
  `sec_hp` int(7) NOT NULL default '0',
  `sec_hsc_gg` int(7) NOT NULL default '0',
  `sec_hc_gg` int(7) NOT NULL default '0',
  `sec_hp_gg` int(7) NOT NULL default '0',
  `mnt_facture` decimal(10,5) NOT NULL default '0.00000',
  `mnt_non_rembourse` decimal(10,5) NOT NULL default '0.00000',
  `RadAcctId` bigint(21) NOT NULL default '0',
  `etat_temps` char(1) NOT NULL default 'W',
  `ts` timestamp(14) NOT NULL,
  `option_nomade` char(1) NOT NULL default 'f',
  `option_hidden` char(1) NOT NULL default 'f',
  `nb_view` smallint(6) NOT NULL default '0',
  `nb_session` mediumint(9) NOT NULL default '0',
  PRIMARY KEY  (`id_inscrit`,`annee`,`id_mois`)
) TYPE=BerkeleyDB;

How to repeat:
I don't know how to repeat it.

It repeats itself sometimes, with no visible (for me) reason
[19 Apr 2006 8:28] Valeriy Kravchuk
Thank you for a problem report. Can you send a dump of that table's data? Can you try to repeat with a newer version, 3.23.58?

Your my.cnf file content may be also useful.
[19 Apr 2006 9:14] Mr Antoine
Hi,

Dump is available at : http://216.127.82.43/DbyTemps.Sql.gz
my.cnf is available at : http://216.127.82.43/my.cnf.txt

As this server is a production server, I can't try a new version ...

Thank's
[19 Apr 2006 9:17] Mr Antoine
Hi,

mysqld just crashed again ...

SQL request was :
thd->query at 0x857d6c0 = SELECT id_mois , id_forfait FROM dby_temps WHERE id_inscrit = 9227 AND ((annee < 2006) OR ((annee = 2006) AND (id_mois <= 4))) ORDER BY annee DESC , id_mois DESC LIMIT 1
[2 May 2006 13:34] Mr Antoine
Hi,

Do you have any idea ?

Antoine
[17 May 2006 21:46] Valeriy Kravchuk
Please, sent the

EXPLAIN SELECT id_mois , id_forfait FROM dby_temps WHERE
id_inscrit = 9227 AND ((annee < 2006) OR ((annee = 2006) AND (id_mois <= 4))) ORDER BY annee DESC , id_mois DESC LIMIT 1\G

results from your server. Even with your data, I'll be forced to check on 3.23.58, by the way.
[18 May 2006 4:21] Mr Antoine
Hi,

Explain is hereunder :
mysql> EXPLAIN SELECT id_mois , id_forfait FROM dby_temps WHERE id_inscrit = 9227 AND ((annee < 2006) OR ((annee = 2006) AND (id_mois <= 4))) ORDER BY annee DESC , id_mois DESC LIMIT 1;
+-----------+-------+---------------+---------+---------+------+------+----------------------------+
| table     | type  | possible_keys | key     | key_len | ref  | rows | Extra                      |
+-----------+-------+---------------+---------+---------+------+------+----------------------------+
| dby_temps | range | PRIMARY       | PRIMARY |      12 | NULL |    5 | where used; Using filesort |
+-----------+-------+---------------+---------+---------+------+------+----------------------------+
1 row in set (0.00 sec)

Thank's
[19 May 2006 4:00] Mr Antoine
Hi,

Do you thing upgrading to a new version should correct the problem ?

Which version do you recommend ?
Is that new version fully compatible with 3.23.54 ?
How should I upgrade to that new version (it is a production server)

Antoine
[11 Jun 2006 15:15] Valeriy Kravchuk
> Do you thing upgrading to a new version should correct the problem ?

I do not know for sure, but even if we'll verify a bug, bug fix will be made in the latest version.

> Which version do you recommend ?

Try 3.23.58. If the bug is still repeatable - try 4.0.27.

> Is that new version fully compatible with 3.23.54 ?

3.23.58 is fully compatible. Try it and inform about the results.

> How should I upgrade to that new version (it is a production server)

Just stop server and install new binaries. Start server again. As usual, backup of all data will be useful before any upgrade (and without upgrades).
[11 Jul 2006 23:00] 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".