Bug #26473 Mysql crashes on many queries on Freelink/Linkstation Pro (ARM, Debian)
Submitted: 18 Feb 2007 23:50 Modified: 4 Mar 2007 21:15
Reporter: Andre Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5,1 OS:Linux (Debian, ARM)
Assigned to: CPU Architecture:Any

[18 Feb 2007 23:50] Andre
Description:
I am running Debian on a Linkstation Pro (ARM9 processor)
Linux LS-GL7D6 2.6.12.6-arm1 #77 Tue Dec 5 22:23:46 CST 2006 armv5tejl GNU/Linux
There I've got slimserver installed which uses mysql for indexing music files.

I tried unstable and testing mysql server variants. general log and core attached...

mysqld, Version: 5.0.32-Debian_6-log (Debian etch distribution). started with:
Tcp port: 9092  Unix socket: /var/cache/slimserver/slimserver-mysql.sock
Time                 Id Command    Argument
070218 22:58:21       1 Connect     slimserver@ as anonymous on slimserver
                      1 Query       set autocommit=1
                      1 Query       SELECT COUNT( * ) FROM tracks me WHERE ( content_type IN ( 'ssp' ) )
070218 22:58:22       1 Query       SELECT me.name, me.value FROM metainformation me WHERE ( name = 'isScanning' )
                      1 Query       SELECT COUNT( DISTINCT( me.id ) ) FROM tracks me WHERE ( me.audio = '1' )
                      1 Query       SELECT COUNT( DISTINCT( me.id ) ) FROM albums me
                      1 Query       SELECT COUNT( DISTINCT( me.id ) ) FROM contributors me LEFT JOIN contributor_album contributorAlbums ON ( contributorAlbums.contributor = me.id ) WHERE ( contributorAlbums.role IN ( '1', '5' ) )
070218 22:58:25       1 Query       SELECT version()
070218 22:58:37       1 Query       SELECT version()
                      1 Query       SELECT me.name, me.value FROM metainformation me WHERE ( name = 'isScanning' )
070218 22:58:38       1 Query       set autocommit=0
                      1 Query       SELECT me.name, me.value FROM metainformation me WHERE ( ( me.name = 'isScanning' ) )
                      1 Query       commit
                      1 Query       set autocommit=1
070218 22:58:43       1 Query       SELECT me.name, me.value FROM metainformation me WHERE ( name = 'isScanning' )
070218 22:58:48       1 Query       SELECT me.name, me.value FROM metainformation me WHERE ( name = 'isScanning' )
070218 22:58:53       1 Query       SELECT me.name, me.value FROM metainformation me WHERE ( name = 'isScanning' )
070218 22:58:58       2 Connect     slimserver@ as anonymous on slimserver
                      2 Query       set autocommit=1
                      1 Query       SELECT me.name, me.value FROM metainformation me WHERE ( name = 'isScanning' )
                      2 Query       SET NAMES UTF8
                      2 Query       SELECT name FROM metainformation
                      3 Connect     slimserver@ as anonymous on slimserver
                      3 Query       set autocommit=1
                      3 Query       SELECT value FROM dbix_migration WHERE name = 'version'
                      3 Quit
                      4 Connect     slimserver@ as anonymous on slimserver
                      4 Query       set autocommit=1
                      4 Query       SELECT value FROM dbix_migration WHERE name = 'version'
                      5 Connect     slimserver@ as anonymous on slimserver
                      5 Query       set autocommit=1
                      4 Quit
                      5 Query       SELECT value FROM dbix_migration WHERE name = 'version'
                      5 Quit
070218 22:59:03       1 Query       SELECT me.name, me.value FROM metainformation me WHERE ( name = 'isScanning' )
                      2 Query       SELECT me.name, me.value FROM metainformation me WHERE ( name = 'isScanning' )
                      2 Query       set autocommit=0
                      2 Query       SELECT me.name, me.value FROM metainformation me WHERE ( ( me.name = 'isScanning' ) )
                      2 Query       commit
                      2 Query       commit
070218 22:59:04       2 Query       SELECT url FROM tracks WHERE url LIKE 'file://%'
                      2 Query       SELECT me.name, me.value FROM metainformation me WHERE ( name = 'lastRescanTime' )
                      2 Query       SELECT me.id, me.url, me.content_type, me.title, me.titlesort, me.titlesearch, me.album, me.tracknum, me.timestamp, me.filesize, me.disc, me.thumb, me.remote, me.audio, me.audio_size, me.audio_offset, me.year, me.secs, me.cover, me.vbr_scale, me.bitrate, me.samplerate, me.samplesize, me.channels, me.block_alignment, me.endian, me.bpm, me.tagversion, me.drm, me.moodlogic_id, me.moodlogic_mixable, me.musicmagic_mixable, me.musicbrainz_id, me.playcount, me.lastplayed, me.lossless, me.lyrics, me.rating, me.replay_gain, me.replay_peak FROM tracks me WHERE ( url = 'file:///mnt/disk1/share/Stahn%20-%20Senf%20Brise%20Mix%206/11.%20Track11.ogg' )
070218 22:59:05       2 Query       INSERT INTO tracks (audio, audio_offset, audio_size, bitrate, channels, content_type, drm, filesize, lossless, rating, remote, samplerate, secs, timestamp, title, titlesearch, titlesort, tracknum, url, vbr_scale, year) VALUES ('1', '0', '5681730', '192000', '2', 'ogg', '0', '5681730', '0', '0', '0', '44100', '267', '1167318596', 'Track11', 'TRACK11', 'TRACK11', '11', 'file:///mnt/disk1/share/Stahn%20-%20Senf%20Brise%20Mix%206/11.%20Track11.ogg', '0', '0')
                      2 Query       SELECT me.id, me.name, me.namesort, me.namesearch, me.moodlogic_id, me.moodlogic_mixable, me.musicmagic_mixable FROM genres me WHERE ( ( me.namesearch = 'NO GENRE' ) )
                      2 Query       commit
                      2 Query       SELECT me.id, me.name, me.namesort, me.namesearch, me.moodlogic_id, me.moodlogic_mixable, me.musicmagic_mixable FROM genres me WHERE ( ( me.namesearch = 'NO GENRE' ) )
                      2 Query       SELECT me.genre, me.track FROM genre_track me WHERE ( ( me.genre = '1' AND me.track = '17' ) OR ( me.genre = '1' AND me.track = '17' ) )
070218 22:59:06       2 Query       INSERT INTO genre_track (genre, track) VALUES ('1', '17')
                      2 Query       SELECT me.id, me.name, me.namesort, me.moodlogic_id, me.moodlogic_mixable, me.musicmagic_mixable, me.namesearch, me.musicbrainz_id FROM contributors me WHERE ( ( me.namesearch = 'SHARE' ) )
                      2 Query       SELECT me.role, me.contributor, me.track FROM contributor_track me WHERE ( ( me.contributor = '2' AND me.role = '1' AND me.track = '17' ) OR ( me.contributor = '2' AND me.role = '1' AND me.track = '17' ) )
                      2 Query       INSERT INTO contributor_track (contributor, role, track) VALUES ('2', '1', '17')
                      2 Query       SELECT me.id, me.titlesort, me.contributor, me.compilation, me.year, me.artwork, me.disc, me.discc, me.musicmagic_mixable, me.titlesearch, me.replay_gain, me.replay_peak, me.musicbrainz_id, me.title FROM albums me LEFT JOIN tracks tracks ON ( tracks.album = me.id ) WHERE ( me.disc IS NULL AND me.discc IS NULL AND me.title = 'Stahn - Senf Brise Mix 6' AND tracks.url LIKE 'file:///mnt/disk1/share/Stahn%20-%20Senf%20Brise%20Mix%206%' ) GROUP BY me.id

How to repeat:
installing slimserver 6.5.1 on freelink on linkstation pro, there it is clearly reproducible, this also happens with a few others NAS'ses

Suggested fix:
no idea
[19 Feb 2007 0:03] Andre
core dump 1

Virus scan engine found a threat. This file might be infected. Attachment: core.17863.bz2 (application/octet-stream, text), 478.75 KiB.

[19 Feb 2007 0:04] Andre
core dump attached
[19 Feb 2007 8:11] Sveta Smirnova
Thank you for the report.

For using core file we also need mysqld binary, from which the core file has created. Also, please, indicate accurate version of mysqld you use.
[19 Feb 2007 12:56] Johan Idrén
Can't repeat using SlimServer 6.5.1 with included mysql 5.0.22 on Mac OS X 10.4.8
[19 Feb 2007 21:34] Andre
mysqld part 1

Attachment: mysqld.part01.rar (audio/x-pn-realaudio-plugin, text), 488.28 KiB.

[19 Feb 2007 21:39] Andre
this seems not to happen on other platforms, therefor you can't reproduce it on mac:

I uploaded bug-mysqld-26473.zip to ftp

I could also arrange access to the system, would that be helpful?
[20 Feb 2007 8:26] Sveta Smirnova
Thank you, Andre, for the mysqld and core file.

But mysqld is stripped, so we can not examine core file.

Please, download current 5.0.33 version of MySQL server from http://dev.mysql.com/downloads/mysql/5.0.html, configure it with --debug option, compile and try to get core file again.
[4 Mar 2007 21:15] Andre
I downloaded the most current sources and built a new binary [5.0.36 for unknown-linux-gnu on armv5tejl (Source distribution)]. This fixed it! The version used before was 5.0.32.
Closing it...