PDA

View Full Version : SlimServer 6.5.3 enters infinite restart loop under Debian unstable



dimitris
2007-07-11, 17:46
6.5.2 has been rock solid for a while, however after upgrading to 6.5.3 I get:

2007-07-11 17:29:42 Slimserver died. Restarting.
Can't locate object method "mk_classaccessor" via package "Slim::Schema" at /usr/share/perl5/Slim/Schema.pm line 181.
2007-07-11 17:29:45.5083 ERROR: forceCommit: Trying to commit transactions before DB is initialized!

repeatedly in the logs. Even after forcibly downgrading to 6.5.2, the same error continues. Any ideas?

dimitris
2007-07-11, 17:57
OK, looks like the DBIx::Class API has changed:

http://www.mail-archive.com/dbix-class@lists.rawmode.org/msg03715.html

The workaround mentioned in that thread works, just add



*** Schema.pm.old 2007-07-11 01:10:18.000000000 -0700
--- Schema.pm 2007-07-11 17:54:51.000000000 -0700
***************
*** 94,99 ****
--- 94,101 ----

=cut

+ sub mk_classaccessor { shift->mk_classdata(@_); }
+
sub init {
my $class = shift;



Looks like the fixed version of dbix just didn't make it to Debian unstable yet, but it will.

bbb
2007-07-15, 13:49
Hi, not quite sure what you are suggesting here. That looks like a patch to Schema.pm (as opposed to text to add to the file) -- I also have two copies of that file on my system, usr/share/perl5/DBIx/Class/Schema.pm and /usr/share/perl5/Slim/Schema.pm. Which one should I be patching? Both?


-- Thanks


OK, looks like the DBIx::Class API has changed:

http://www.mail-archive.com/dbix-class@lists.rawmode.org/msg03715.html

The workaround mentioned in that thread works, just add



*** Schema.pm.old 2007-07-11 01:10:18.000000000 -0700
--- Schema.pm 2007-07-11 17:54:51.000000000 -0700
***************
*** 94,99 ****
--- 94,101 ----

=cut

+ sub mk_classaccessor { shift->mk_classdata(@_); }
+
sub init {
my $class = shift;



Looks like the fixed version of dbix just didn't make it to Debian unstable yet, but it will.

michaeleroy
2007-07-15, 21:35
The posted fix looks to be a patch to the file /usr/share/perl5/Slim/Schema.pm

I didn't apply this as a patch but just added the line

sub mk_classaccessor { shift->mk_classdata(@_); }

to the Schema.pm file at about line 98 (after the "=cut" and before the "sub init..."

dimitris
2007-07-15, 23:49
The posted fix looks to be a patch to the file /usr/share/perl5/Slim/Schema.pm

I didn't apply this as a patch but just added the line

sub mk_classaccessor { shift->mk_classdata(@_); }

to the Schema.pm file at about line 98 (after the "=cut" and before the "sub init..."

Yes, that's the file. Sorry, I didn't specify the full path above.

doenitz16
2007-07-18, 21:21
This fix has worked for a while, but I guess it is no longer needed in Debian unstable. I was working on unrelated issues and and needed to reboot, and so slimserver got restarted. It enters into some massive loop and memory leak and even starts to eat up my swap very quickly (I have 2 gigs memory before swap).

So I commented out the addition of the line:

sub mk_classaccessor { shift->mk_classdata(@_); }

All seems to be working as normal now.

dimitris
2007-07-18, 22:30
I also reverted the Schema.pm patch since libdbix-class-perl in unstable is not version 8003 which contains the API fix. Now, however, I'm getting these in the log every time I start slimserver:



2007-07-18 22:22:41 slimserver_safe started.
2007-07-18 22:22:46.5815 ERROR: DBI Exception: DBD::mysql::db begin_work failed: Already in a transaction
2007-07-18 22:22:46.5816 ERROR: Backtrace follows:

2007-07-18 22:22:46.5818 Backtrace:

frame 0: Slim::Schema::Storage::throw_exception (/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 772)
frame 1: DBIx::Class::Storage::DBI::__ANON__ (/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 798)
frame 2: DBIx::Class::Storage::DBI::txn_begin (/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 596)
frame 3: (eval) (/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 592)
frame 4: DBIx::Class::Storage::DBI::txn_do (/usr/share/perl5/DBIx/Class/Schema.pm line 728)
frame 5: DBIx::Class::Schema::txn_do (/usr/share/perl5/Slim/Schema/Playlist.pm line 46)
frame 6: (eval) (/usr/share/perl5/Slim/Schema/Playlist.pm line 39)
frame 7: Slim::Schema::Playlist::setTracks (/usr/share/perl5/Slim/Player/Playlist.pm line 757)
frame 8: Slim::Player::Playlist::modifyPlaylistCallback (/usr/share/perl5/Slim/Control/Request.pm line 1645)
frame 9: (eval) (/usr/share/perl5/Slim/Control/Request.pm line 1645)
frame 10: Slim::Control::Request::notify (/usr/share/perl5/Slim/Control/Request.pm line 751)
frame 11: Slim::Control::Request::checkNotifications (/usr/sbin/slimserver line 469)
frame 12: main::idle (/usr/sbin/slimserver line 445)
frame 13: main::main (/usr/sbin/slimserver line 1069)

2007-07-18 22:22:46.5823 ERROR: Carp::Clan::__ANON__(): DBI Exception: DBD::mysql::db begin_work failed: Already in a transaction at /usr/share/perl5/Slim/Schema/Storage.pm line 74

2007-07-18 22:22:46.5824 ERROR: Backtrace follows:

2007-07-18 22:22:46.5826 Backtrace:

frame 0: Slim::Schema::Storage::throw_exception (/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 625)
frame 1: DBIx::Class::Storage::DBI::txn_do (/usr/share/perl5/DBIx/Class/Schema.pm line 728)
frame 2: DBIx::Class::Schema::txn_do (/usr/share/perl5/Slim/Schema/Playlist.pm line 46)
frame 3: (eval) (/usr/share/perl5/Slim/Schema/Playlist.pm line 39)
frame 4: Slim::Schema::Playlist::setTracks (/usr/share/perl5/Slim/Player/Playlist.pm line 757)
frame 5: Slim::Player::Playlist::modifyPlaylistCallback (/usr/share/perl5/Slim/Control/Request.pm line 1645)
frame 6: (eval) (/usr/share/perl5/Slim/Control/Request.pm line 1645)
frame 7: Slim::Control::Request::notify (/usr/share/perl5/Slim/Control/Request.pm line 751)
frame 8: Slim::Control::Request::checkNotifications (/usr/sbin/slimserver line 469)
frame 9: main::idle (/usr/sbin/slimserver line 445)
frame 10: main::main (/usr/sbin/slimserver line 1069)

2007-07-18 22:22:46.5827 ERROR: setTracks: Failed to add tracks to playlist: [Carp::Clan::__ANON__(): Carp::Clan::__ANON__(): DBI Exception: DBD::mysql::db begin_work failed: Already in a transaction at /usr/share/perl5/Slim/Schema/Storage.pm line 74


As far as I can tell however there are no ill effects on the server itself. Is anyone else getting this/similar errors?

chuckiebear
2007-07-19, 04:49
[QUOTE
As far as I can tell however there are no ill effects on the server itself. Is anyone else getting this/similar errors?[/QUOTE]

I'm getting exactly the same with 6.5.4 on Debian unstable but with addtional stuff:


2007-07-19 12:42:43 slimserver_safe started.
2007-07-19 12:42:51.9555 Deep recursion on subroutine "Slim::Schema::mk_classaccessor" at /usr/share/perl5/DBIx/Class.pm line 11.
2007-07-19 12:42:51.9557 Deep recursion on subroutine "DBIx::Class::mk_classdata" at /usr/share/perl5/Slim/Schema.pm line 97.
2007-07-19 12:43:27.3531 Select task failed: Can't call method "prepare_cached" on an undefined value at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1086.

Out of memory!

So no luck there. On my Linkstation I can run 6.5.4 but with dbix errors on a *rescan* - the initial full scan (after deleting /var/cache/slimserver to prompt a real full scan was successful)
2007-07-19 04:51:04.5215 ERROR: Backtrace follows:

2007-07-19 04:51:04.5233 Backtrace:

frame 0: Slim::Schema::throw_exception (/usr/share/perl5/DBIx/Class/Schema.pm line 639)
frame 1: DBIx::Class::Schema::txn_do (/usr/sbin/slimserver-scanner line 187)
frame 2: (eval) (/usr/sbin/slimserver-scanner line 187)
frame 3: main::main (/usr/sbin/slimserver-scanner line 306)

The Linkstation runs fine (if a little slowly) but I'd prefer it to be running on the more powerful box.

chuckiebear
2007-07-19, 05:09
So I commented out the addition of the line:

sub mk_classaccessor { shift->mk_classdata(@_); }

All seems to be working as normal now.

Ahh, just seen this & commented out and the Debian unstable box seems to be working again, just with the DBIx errors. lets see how it goes

chuckiebear
2007-07-19, 05:15
Using the browser to navigate to new music the log just comes up with 100's lines of:

2007-07-19 13:14:07.0042 bad lines function: Can't call method "prepare_cached" on an undefined value at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1086.

2007-07-19 13:14:08.0158 bad lines function: Can't call method "prepare_cached" on an undefined value at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1086.

2007-07-19 13:14:09.0043 bad lines function: Can't call method "prepare_cached" on an undefined value at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1086.

2007-07-19 13:14:10.0002 bad lines function: Can't call method "prepare_cached" on an undefined value at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1086.

2007-07-19 13:14:11.0001 bad lines function: Can't call method "prepare_cached" on an undefined value at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1086.

2007-07-19 13:14:12.0081 bad lines function: Can't call method "prepare_cached" on an undefined value at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1086.

2007-07-19 13:14:12.9948 bad lines function: Can't call method "prepare_cached" on an undefined value at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1086.

dimitris
2007-07-19, 17:34
The strange behavior continues... I was streaming KEXP (http://kexp-mp3-128k.cac.washington.edu:8000/listen.pls) and paused to answer a phone call. When I hit pause again, SlimServer stopped responding to the SB1 and started spinning the CPU at almost 100%. The log shows:



2007-07-19 15:50:19.0578 ERROR: setTracks: Failed to add tracks to playlist: [Carp::Clan::__ANON__(): Carp::Clan::__ANON__(): DBI Exception: DBD::mysql::db begin_work failed: Already in a transaction at /usr/share/perl5/Slim/Schema/Storage.pm line 74
]

2007-07-19 17:25:59 slimserver_safe stopped.
2007-07-19 17:26:02.4973 ERROR: forceCommit: Trying to commit transactions before DB is initialized!

2007-07-19 17:26:02.5190 ERROR: DBI Connection failed: DBI connect('hostname=127.0.0.1;port=9092;database=sli mserver:mysql_socket=/var/cache/slimserver/slimserver-mysql.sock','slimserver',...) failed: Can't connect to MySQL server on '127.0.0.1' (111) at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 765

2007-07-19 17:26:02.5192 ERROR: Backtrace follows:

2007-07-19 17:26:02.5194 Backtrace:

frame 0: Slim::Schema::Storage::throw_exception (/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 782)
frame 1: DBIx::Class::Storage::DBI::_connect (/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 722)
frame 2: DBIx::Class::Storage::DBI::_populate_dbh (/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 687)
frame 3: DBIx::Class::Storage::DBI::ensure_connected (/usr/share/perl5/Slim/Schema/Storage.pm line 28)
frame 4: (eval) (/usr/share/perl5/Slim/Schema/Storage.pm line 28)
frame 5: Slim::Schema::Storage::dbh (/usr/share/perl5/Slim/Schema.pm line 249)
frame 6: (eval) (/usr/share/perl5/Slim/Schema.pm line 249)
frame 7: Slim::Schema::disconnect (/usr/sbin/slimserver line 1035)
frame 8: main::cleanup (/usr/share/perl5/Slim/bootstrap.pm line 300)
frame 9: Slim::bootstrap::sigint (/usr/share/perl5/Slim/bootstrap.pm line 331)
frame 10: Slim::bootstrap::END (/usr/sbin/slimserver line 0)
frame 11: (eval) (/usr/sbin/slimserver line 0)


This is 6.5.3 on a Debian unstable IA32 box.

chuckiebear
2007-07-23, 04:36
The strange behavior continues...

Dimitris, have you got any further with this? I haven't...