I'm developing a site using MySQL and JSP (with Resin).
Everything seems to be jolly the first few times I load a page, but then MySQL just
crashes.
My system is:
- Hardware: Celeron 500, 128MB RAM
- Mandrake 9.0 vanilla
- Resin 2.1.5 (installed as per resin documentation, configured with Apache)
My connection to the database is through Resin's connection pool. I close the
connection in a finally {} block each time I use one. Not sure if this has anything to
do with it, but anyhow Resin shouldn't be able to crash MySQL, should it?
Any pointers to things I might have done wrong & any help otherwise will be greatly
appreciated.
I'm pretty sure I'm not on this mailing list, so replies that are also addressed to my
personal e-mail address will be even further appreciated =)
-- David
Following is the stack trace, err file and log file. The PicData and ThumbData are
both BLOB fields.
(If you'd like to help but need more information, a dump of the database, of the JSP
site, whatever, don't hesitate to write and I'll send it asap!..)
This is the resolved stack trace:
===============================
0x808e31c _Z15handle_segfaulti + 460
0x814e538 pthread_sighandler + 120
0x807a966 _ZN10Field_blob8val_realEv + 54
0x8049f4f _ZN10Item_field3valEv + 63
0x8063bed _ZN16Item_func_isnull18fix_length_and_decEv + 77
0x805371d _ZN9Item_func10fix_fieldsEP3THDP13st_table_list + 221
0x80536b8 _ZN9Item_func10fix_fieldsEP3THDP13st_table_list + 120
0x805ff8b _ZN9Item_cond10fix_fieldsEP3THDP13st_table_list + 283
0x80a69e9 _Z11setup_condsP3THDP13st_table_listPP4Item + 1593
0x80aa6a9
_Z12mysql_selectP3THDP13st_table_listR4ListI4ItemEPS4_P8st_orderS9_S7_S9_jP13select_result
+ 281
0x80926f6 _Z21mysql_execute_commandv + 726
0x8091710 _Z10do_commandP3THD + 1440
0x8090b6b _Z21handle_one_connectionPv + 843
This is the MySQL .err file (edited):
=============================
021209 22:18:28 mysqld started
/usr/sbin/mysqld: ready for connections
mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
===== (text removed) ======
key_buffer_size=8388600
record_buffer=131072
sort_buffer=2097144
max_used_connections=5
max_connections=100
threads_connected=6
It is possible that mysqld could use up to
key_buffer_size + (record_buffer + sort_buffer)*max_connections = 225791 K
bytes of memory
===== (text removed) ======
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:
0x808e31c
0x814e538
0x807a966
0x8049f4f
0x8063bed
0x805371d
0x80536b8
0x805ff8b
0x80a69e9
0x80aa6a9
0x80926f6
0x8091710
0x8090b6b
Stack trace seems successful - bottom reached
===== (text removed) ======
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x8280b30 = SELECT ThumbData FROM pictures WHERE Id='9' AND (NOT
(ThumbData IS NULL))
thd->thread_id=4
Successfully dumped variables, if you ran with --log, take a look at the
details of what thread 4 did to cause the crash. In some cases of really
bad corruption, the values shown above may be invalid
===== (text removed) ======
Number of processes running now: 0
021209 22:22:35 mysqld restarted
/usr/sbin/mysqld: ready for connections
mysqld got signal 11;
===== (text removed) ======
key_buffer_size=8388600
record_buffer=131072
sort_buffer=2097144
max_used_connections=0
max_connections=100
threads_connected=1
===== (text removed) ======
Stack range sanity check OK, backtrace follows:
0x808e31c
0x814e538
0x807a966
0x8049f4f
0x8063bed
0x805371d
0x80536b8
0x805ff8b
0x80a69e9
0x80aa6a9
0x80926f6
0x8091710
0x8090b6b
Stack trace seems successful - bottom reached
===== (text removed) ======
thd->query at 0x827aaf8 = SELECT ThumbData FROM pictures WHERE Id='8' AND (NOT
(ThumbData IS NULL))
thd->thread_id=1
details of what thread 1 did to cause the crash. In some cases of really
===== (text removed) ======
Number of processes running now: 0
021209 22:32:39 mysqld restarted
/usr/sbin/mysqld: ready for connections
mysqld got signal 11;
===== (text removed) ======
key_buffer_size=8388600
record_buffer=131072
sort_buffer=2097144
max_used_connections=8
max_connections=100
threads_connected=9
===== (text removed) ======
Stack range sanity check OK, backtrace follows:
0x808e31c
0x814e538
0x807a966
0x8049f4f
0x8063bed
0x805371d
0x80536b8
0x805ff8b
0x80a69e9
0x80aa6a9
0x80926f6
0x8091710
0x8090b6b
Stack trace seems successful - bottom reached
===== (text removed) ======
thd->query at 0x82b4220 = SELECT ThumbData FROM pictures WHERE Id='8' AND (NOT
(ThumbData IS NULL))
thd->thread_id=12
details of what thread 12 did to cause the crash. In some cases of really
===== (text removed) ======
======(END OF ERR FILE)==========
This is the MySQL log file in its entirety, my apologies for the spam if it's not
necessary:
===============================
/usr/sbin/mysqld, Version: 3.23.52-log, started with:
Tcp port: 3306 Unix socket: /var/lib/mysql/mysql.sock
Time Id Command Argument
021209 22:18:43 1 Connect [EMAIL PROTECTED] on
1 Init DB koedpaalaeg
021209 22:18:48 2 Connect [EMAIL PROTECTED] on
2 Init DB koedpaalaeg
2 Query SELECT s.*, p.FirstName, p.LastName,
COUNT(pictures.Id) PicCount FROM series s, person p LEFT JOIN pictures ON
(pictures.Series=s.Id) WHERE p.Id=s.Owner AND s.Site='1' AND (NOT (s.Deleted = '1'))
GROUP BY pictures.Series
021209 22:18:51 2 Query SELECT p.*, pn1.FirstName AS UploaderFName,
pn1.LastName AS UploaderLName, pn2.FirstName AS VetoedByFName, pn2.LastName AS
VetoedByLName FROM pictures p, person pn1 LEFT OUTER JOIN person pn2 ON
(pn2.Id=p.VetoedBy) WHERE pn1.Id=p.Uploader AND Series='1' AND VetoedBy='0'
021209 22:19:51 3 Connect [EMAIL PROTECTED] on
3 Init DB koedpaalaeg
3 Query SELECT p.*, pn1.FirstName AS UploaderFName,
pn1.LastName AS UploaderLName, pn2.FirstName AS VetoedByFName, pn2.LastName AS
VetoedByLName FROM pictures p, person pn1 LEFT OUTER JOIN person pn2 ON
(pn2.Id=p.VetoedBy) WHERE pn1.Id=p.Uploader AND Series='1' AND VetoedBy='0'
021209 22:22:31 4 Connect [EMAIL PROTECTED] on
4 Init DB koedpaalaeg
4 Query SELECT s.*, p.FirstName, p.LastName,
COUNT(pictures.Id) PicCount FROM series s, person p LEFT JOIN pictures ON
(pictures.Series=s.Id) WHERE p.Id=s.Owner AND s.Site='1' AND (NOT (s.Deleted = '1'))
GROUP BY pictures.Series
021209 22:22:32 4 Query SELECT p.*, pn1.FirstName AS UploaderFName,
pn1.LastName AS UploaderLName, pn2.FirstName AS VetoedByFName, pn2.LastName AS
VetoedByLName FROM pictures p, person pn1 LEFT OUTER JOIN person pn2 ON
(pn2.Id=p.VetoedBy) WHERE pn1.Id=p.Uploader AND Series='1' AND VetoedBy='0'
021209 22:22:34 5 Connect [EMAIL PROTECTED] on
4 Query SELECT ThumbData FROM pictures WHERE Id='9' AND
(NOT (ThumbData IS NULL))
5 Init DB koedpaalaeg
5 Query SELECT ThumbData FROM pictures WHERE Id='11' AND
(NOT (ThumbData IS NULL))
6 Connect [EMAIL PROTECTED] on
6 Init DB koedpaalaeg
6 Query SELECT ThumbData FROM pictures WHERE Id='7' AND
(NOT (ThumbData IS NULL))
8 Connect [EMAIL PROTECTED] on
7 Connect [EMAIL PROTECTED] on
7 Init DB koedpaalaeg
7 Query SELECT ThumbData FROM pictures WHERE Id='10' AND
(NOT (ThumbData IS NULL))
/usr/sbin/mysqld, Version: 3.23.52-log, started with:
Tcp port: 3306 Unix socket: /var/lib/mysql/mysql.sock
Time Id Command Argument
021209 22:32:36 1 Connect [EMAIL PROTECTED] on
1 Init DB koedpaalaeg
1 Query SELECT p.*, pn1.FirstName AS UploaderFName,
pn1.LastName AS UploaderLName, pn2.FirstName AS VetoedByFName, pn2.LastName AS
VetoedByLName FROM pictures p, person pn1 LEFT OUTER JOIN person pn2 ON
(pn2.Id=p.VetoedBy) WHERE pn1.Id=p.Uploader AND Series='1' AND VetoedBy='0'
021209 22:32:38 1 Query SELECT ThumbData FROM pictures WHERE Id='8' AND
(NOT (ThumbData IS NULL))
/usr/sbin/mysqld, Version: 3.23.52-log, started with:
Tcp port: 3306 Unix socket: /var/lib/mysql/mysql.sock
Time Id Command Argument
021209 22:32:43 1 Connect [EMAIL PROTECTED] on
1 Init DB koedpaalaeg
1 Query SELECT ThumbData FROM pictures WHERE Id='10' AND
(NOT (ThumbData IS NULL))
2 Connect [EMAIL PROTECTED] on
2 Init DB koedpaalaeg
2 Query SELECT ThumbData FROM pictures WHERE Id='7' AND
(NOT (ThumbData IS NULL))
021209 22:43:06 3 Connect [EMAIL PROTECTED] on
3 Statistics
3 Query SELECT VERSION()
3 Query SHOW VARIABLES
3 Query SHOW STATUS
3 Query SHOW PROCESSLIST
3 Query show databases
3 Init DB hmm
3 Query show tables
3 Init DB koedpaalaeg
3 Query show tables
3 Init DB mysql
3 Query show tables
3 Init DB test
3 Query show tables
021209 22:43:52 3 Init DB koedpaalaeg
3 Query SHOW TABLE STATUS
3 Query SHOW FIELDS FROM `site`
3 Query SHOW KEYS FROM `site`
021209 22:47:09 3 Query SHOW FIELDS FROM `series`
3 Query SHOW KEYS FROM `series`
021209 22:49:55 3 Query SHOW FIELDS FROM `pictures`
3 Query SHOW KEYS FROM `pictures`
021209 22:51:25 3 Query SHOW FIELDS FROM `person`
3 Query SHOW KEYS FROM `person`
021209 22:52:18 3 Query SHOW KEYS FROM `person`
021209 23:24:13 4 Connect [EMAIL PROTECTED] on
4 Init DB koedpaalaeg
021210 1:18:09 5 Connect [EMAIL PROTECTED] on
5 Init DB koedpaalaeg
021210 2:40:54 3 Quit
021210 3:26:43 6 Connect [EMAIL PROTECTED] on
6 Init DB koedpaalaeg
021210 3:26:45 7 Connect [EMAIL PROTECTED] on
7 Init DB koedpaalaeg
7 Query SELECT s.*, p.FirstName, p.LastName,
COUNT(pictures.Id) PicCount FROM series s, person p LEFT JOIN pictures ON
(pictures.Series=s.Id) WHERE p.Id=s.Owner AND s.Site='1' AND (NOT (s.Deleted = '1'))
GROUP BY pictures.Series
021210 3:26:49 7 Query SELECT p.*, pn1.FirstName AS UploaderFName,
pn1.LastName AS UploaderLName, pn2.FirstName AS VetoedByFName, pn2.LastName AS
VetoedByLName FROM pictures p, person pn1 LEFT OUTER JOIN person pn2 ON
(pn2.Id=p.VetoedBy) WHERE pn1.Id=p.Uploader AND Series='1' AND VetoedBy='0'
021211 2:10:41 8 Connect [EMAIL PROTECTED] on
8 Init DB koedpaalaeg
021211 2:10:45 9 Connect [EMAIL PROTECTED] on
9 Init DB koedpaalaeg
021211 2:10:48 10 Connect [EMAIL PROTECTED] on
10 Init DB koedpaalaeg
021211 2:10:52 11 Connect [EMAIL PROTECTED] on
11 Init DB koedpaalaeg
021211 2:15:24 12 Connect [EMAIL PROTECTED] on
12 Init DB koedpaalaeg
12 Query SELECT s.*, p.FirstName, p.LastName,
COUNT(pictures.Id) PicCount FROM series s, person p LEFT JOIN pictures ON
(pictures.Series=s.Id) WHERE p.Id=s.Owner AND s.Site='1' AND (NOT (s.Deleted = '1'))
GROUP BY pictures.Series
021211 2:15:30 12 Query SELECT p.*, pn1.FirstName AS UploaderFName,
pn1.LastName AS UploaderLName, pn2.FirstName AS VetoedByFName, pn2.LastName AS
VetoedByLName FROM pictures p, person pn1 LEFT OUTER JOIN person pn2 ON
(pn2.Id=p.VetoedBy) WHERE pn1.Id=p.Uploader AND Series='1' AND VetoedBy='0'
021211 2:15:32 12 Query SELECT ThumbData FROM pictures WHERE Id='8' AND
(NOT (ThumbData IS NULL))
13 Connect [EMAIL PROTECTED] on
13 Init DB koedpaalaeg
13 Query SELECT ThumbData FROM pictures WHERE Id='9' AND
(NOT (ThumbData IS NULL))
14 Connect [EMAIL PROTECTED] on
14 Init DB koedpaalaeg
14 Query SELECT ThumbData FROM pictures WHERE Id='7' AND
(NOT (ThumbData IS NULL))
15 Connect [EMAIL PROTECTED] on
15 Init DB koedpaalaeg
15 Query SELECT ThumbData FROM pictures WHERE Id='11' AND
(NOT (ThumbData IS NULL))
16 Connect [EMAIL PROTECTED] on
16 Init DB koedpaalaeg
16 Query SELECT ThumbData FROM pictures WHERE Id='10' AND
(NOT (ThumbData IS NULL))
======(END OF LOG FILE)==========
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php