Bugzilla – Bug 10137
Squeezecenter won't start - ReadyNas Pro (probably database)
Last modified: 2009-07-31 10:32:35 UTC
Created attachment 4339 [details] logfile Tried to install the ReadyNas Pro build of SC. It works until I've restarted it - then it is unreachable. To remedy this I did a factory reset of my ReadyNas - so it was totally clean, then I reinstalled SC. Same problem again. Could you guys look into it? Seems like a corruption of the database. Attaching slimserver.log
Emmanuele: please don't set priority or severity, that will be done during bug review. Matt: can you look into this
James, Please have QA verify this ... QA has the only ReadyNas pro available for testing.
Created attachment 4346 [details] Log of SqueezeCenter failing to start on ReayNAS Pro I see the same behavior that Emmanuele reports . In addition uninstalling SqueezeCenter by clicking the remove button on the ReadyNAS interface and then installing again using the ReadyNAS system update did not get around the issue either. I was also wondering if the ReadyNAS folks were planing on updating their CleanSqueezeCenter add-on for the Pro.
Matt, is this one for you?
Justin, Can you look into this?
this is not a 7.3 blocker, but does prevent us from releasing a final 7.3 build for the ReadyNAS Pro platform. Justin?
Hi! Sorry for setting severety etc. - thought i was supposed to :) However, there are more people having these problems (just FYI): http://www.readynas.com/forum/viewtopic.php?f=22&t=22209 http://www.readynas.com/forum/viewtopic.php?f=22&t=23259
Looks like MySQLHelper.pm is finding the mysqld in /usr/share/squeezecenter/Bin/i386-linux/ and using that instead of the one that's already on the system. The 7.3 addon worked fine on my box once I removed that file. Can somebody check that?
Removed the mysqld that you are mentioninh, but still same problem.
Can you try installing the addon at http://www.readynas.com/download/addons/x86/4.2/Clean_SqueezeCenter_DB_1.0-x86.bin ?
Yay! Heres some love to you guys, FINALLY it works. I'll get back about its stability - but so far, so good! I just have to add that I really admire all the work and dedication you guys put into the products - CREDS!
Clean squeezecenter addon solves the problem - but after I provoced the database a bit by rescanning it a couple of times it got corrupted again. Fixed by the add-on again though.
Justin: what is the proper thing to do here to fix the root cause of the issue? It appears there is a difference in the mysql.helper file between RN install and SC installs.
All the helper does is start mysql if it isn't already running, correct?? The difference shouldn't cause any problems once it does its job.
I don't see why you would need that file at all. It's based on some very old code. I'd just want to be sure we don't see these issues due to the outdated file.
It's still needed to dynamically start mysql when it's not running. I modified it quite some time ago to use the system's mysqld instead of SqueezeCenter's (actually SlimServer at the time) version. I can make the same changes to the current version, but I highly doubt that will fix anything. Is this reproducible for everyone? I don't the same problem here on my Pro.
Whether this issue is related to MySQLHelper or not - we don't know yet. But we shouldn't need it. One potential conflict less to care about. Do you have an idea what's causing the issues "fixed" by the cleanup script?
But we *do* need MySQLHelper. As I said before, we need it to start mysqld dynamically. I haven't seen the same problem on my system, but from the logs out there, there seems to be a problem in SqueezeCenter DB migration path. Maybe it doesn't expect a table to be there, but it already is there for some reason?? I really don't know. Below is the relevant log entry. [08-11-25 15:00:03.6505] DBIx::Migration::migrate (115) Warning: Database error: Can't create table './slimserver/metainformation.frm' (errno: 121) at /usr/share/squeezecenter/CPAN/DBIx/Migration.pm line 115.
> But we *do* need MySQLHelper. Of course. But you shouldn't need a customized version of it. > I haven't seen the same problem on my system, but from the logs out there, > there seems to be a problem in SqueezeCenter DB migration path. Maybe it The customized MySQLHelper version you're using is using incorrect API calls in the code handling table creation. Maybe it's unrelated, but keeping that changed and broken file around seems like a good source for such issues.
As there is yet another request about ReadyNAS issues in the forums, I took a closer look at the log snippets. (http://forums.slimdevices.com/showthread.php?t=55824) [08-11-25 19:49:14.1280] Slim::Utils::Misc::msg (1126) Warning: [19:49:14.1277] Use of uninitialized value in sprintf at /usr/share/perl5/Slim/Utils/MySQLHelper.pm line 354. That line is indeed using some property which is _not_ initialized in your customized MySQLHelper.pm file. The init() has been stripped down to a bare minimum, leaving behind a few uninitialized variables. As they are used in other parts of the module, trouble must be expected. Matt - could we try to build a ReadyNAS package using our standard MySQLHelper.pm file? The modified version has not been updated in almost a year, and there obviously are bugs in there which can crash SC. Whatever change was needed should now be done in OS/ReadyNAS.pm. I'll be happy to help re-factor even MySQLHelper.pm to support this.
I've tried to get it working with our mysqlhelper and it fails ... It shouldn't be hard for QA to give you access to our ReadyNas Pro and you can try swapping in the stock mysqlhelper and making the changes that are necessary. I'd actually love to see the changes put into the OSDetect code so that we no longer have to replace the mysqlhelper script...
Justin - is your ReadyNAS running MySQL for some other application too? From what I understand MySQLHelper.pm can't start it if it's not running yet. I'm working on a patch for 7.3 which should render the custom MySQLHelper.pm obsolete. Hope to have it ready later this afternoon.
change 24185 - make our MySQLHelper.pm compatible with ReadyNAS. It now uses the OSDetect code to initialize mysql the way it was doing it in the custom file used so far. Justin - could you please test this change and include it with your builds if it's ok? Thanks!
For the most part it looks good to me with 7.3-24187, except that it's still using /usr/share/squeezecenter/Bin/i386-linux/mysqld first if it finds it, and it is currently being included with the ReadyNAS package. So we can either change the build script to remove mysqld from the ReadyNAS package, or add something like this to ReadyNAS.pm to force it to use the system's mysqld: sub decodeExternalHelperPath { if ($_[1] =~ '/mysqld') { return "/usr/sbin/mysqld"; } else { return Slim::Utils::Unicode::utf8decode_locale($_[1]); } }
change 24204 - remove mysqld binary from the readynas builds
Justin/Michael/Steven/Matt: Is this resolved?
I can't really say since I never saw the issue. Can we get Emmanuele to try out the latest package?
I'll try it immediately.
Any news?
Marking this one as fixed, QA and Emmanuele to verify
Tried to provoke it for a couple of days now - so far, so good. Well done guys!
Looks good to me as well. Marking bug as verified fixed.
Sorry - but it has crashed again. Upgraded to 7.3 today and now the problem is back again. Is the bugfix really included in the official 7.3?
Some info from the log. 2008-12-12 13:21:30 SqueezeCenter died. Restarting. [08-12-12 13:21:31.6321] Slim::Schema::init (153) Warning: Creating new database - empty database or database from 6.3.x found [08-12-12 13:21:31.6967] DBIx::Migration::migrate (115) Warning: Database error: Can't create table './slimserver/metainformation.frm' (errno: 121) at /usr/share/squeezecenter/CPAN/DBIx/Migration.pm line 115. [08-12-12 13:21:31.6972] Slim::Schema::forceCommit (1481) Warning: Trying to commit transactions before DB is initialized!
Emmanuele, I am not seeing this issue on the ReadyNAS Pro here in the office with the 7.3 release. Do you have any idea what may have triggered the crash? Did SqueezeCenter recover after the crash?
Hmmm - I did an uninstallation of the latest beta and installed the released 7.3. I cleaned the database with the addon from Netgear and after that it restarted. Let's give it some days - I'll get back to you on the issue.
7.3.1 release is now available and contains ReadyNAS specific fixes. Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already. If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Reduce number of active targets for SC