Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Junior Member
    Join Date
    Sep 2010
    Posts
    12

    Segmentation fault at Slim::Utils::Prefs::init() on LMS 7.7.2 amd64-freebsd

    Hi,

    I've managed (not without harm) to install LMS 7.7.2 in a jail on my FreeNAS.

    All modules are loaded.

    The server tries to launch, but there is a segmentation fault.

    I've moved step by step a debug log in slimserver.pl to see where the segfault happens, and it does at Slim::Utils::Prefs::init();

    So i went to Prefs.pm, and saw that the segfault seems to happen at the use of $prefs


    Any help would be appreciated!
    I had to install/compile LMS on myself because it's not available for my system...

  2. #2
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    18,931

    Segmentation fault at

    Do you have a server.log snippet where it happens?

    --

    Michael

  3. #3
    Junior Member
    Join Date
    Sep 2010
    Posts
    12
    Nope, i don't see anything in the server.log, here it is :
    Code:
    [12-07-16 12:09:15.6534] main::init (354) Starting Logitech Media Server (v7.7.2, r33893, Wed Mar 14 06:43:12 MDT 2012) perl 5.014002
    And here is the startup log (in several parts) if it can help :
    Code:
    ZeJail# ./slimserver.pl --d_startup
    Got @INC containing:
    /usr/local/logitechmediaserver
    /usr/local/lib/perl5/5.14.2/BSDPAN
    /usr/local/lib/perl5/site_perl/5.14.2/mach
    /usr/local/lib/perl5/site_perl/5.14.2
    /usr/local/lib/perl5/5.14.2/mach
    /usr/local/lib/perl5/5.14.2
    .
    
    Extended @INC to contain:
    /usr/local/logitechmediaserver/CPAN/arch/5.14/amd64-freebsd
    /usr/local/logitechmediaserver/CPAN/arch/5.14/amd64-freebsd/auto
    /usr/local/logitechmediaserver/CPAN/arch/5.14.2/amd64-freebsd
    /usr/local/logitechmediaserver/CPAN/arch/5.14.2/amd64-freebsd/auto
    /usr/local/logitechmediaserver/CPAN/arch/5.14/amd64-freebsd
    /usr/local/logitechmediaserver/CPAN/arch/5.14/amd64-freebsd/auto
    /usr/local/logitechmediaserver/CPAN/arch/amd64-freebsd
    /usr/local/logitechmediaserver/lib
    /usr/local/logitechmediaserver/CPAN
    /usr/local/logitechmediaserver
    /usr/local/logitechmediaserver
    /usr/local/lib/perl5/5.14.2/BSDPAN
    /usr/local/lib/perl5/site_perl/5.14.2/mach
    /usr/local/lib/perl5/site_perl/5.14.2
    /usr/local/lib/perl5/5.14.2/mach
    /usr/local/lib/perl5/5.14.2
    .
    
    Loaded module: [version] ok!
    Loaded module: [Time::HiRes] ok!
    Loaded module: [DBI] ok!
    Loaded module: [EV] ok!
    Loaded module: [XML::Parser::Expat] ok!
    Loaded module: [HTML::Parser] ok!
    Loaded module: [JSON::XS] ok!
    Loaded module: [Digest::SHA1] ok!
    Loaded module: [YAML::XS] ok!
    Loaded module: [Sub::Name] ok!
    The following modules are loaded after the first attempt:
            re.pm => /usr/local/lib/perl5/5.14.2/mach/re.pm
            attributes.pm => /usr/local/lib/perl5/5.14.2/mach/attributes.pm
            HTML/Parser.pm => /usr/local/logitechmediaserver/CPAN/HTML/Parser.pm
            File/Spec/Functions.pm => /usr/local/lib/perl5/5.14.2/mach/File/Spec/Functions.pm
            List/Util.pm => /usr/local/lib/perl5/5.14.2/mach/List/Util.pm
            POSIX.pm => /usr/local/lib/perl5/5.14.2/mach/POSIX.pm
            Getopt/Long.pm => /usr/local/lib/perl5/5.14.2/Getopt/Long.pm
            Tie/Hash.pm => /usr/local/lib/perl5/5.14.2/Tie/Hash.pm
            Cwd.pm => /usr/local/lib/perl5/5.14.2/mach/Cwd.pm
            warnings.pm => /usr/local/lib/perl5/5.14.2/warnings.pm
            YAML/XS.pm => /usr/local/logitechmediaserver/CPAN/YAML/XS.pm
            Slim/Utils/OSDetect.pm => /usr/local/logitechmediaserver/Slim/Utils/OSDetect.pm
            BSDPAN/Override.pm => /usr/local/lib/perl5/5.14.2/BSDPAN/BSDPAN/Override.pm
            B.pm => /usr/local/lib/perl5/5.14.2/mach/B.pm
            Digest/base.pm => /usr/local/logitechmediaserver/CPAN/Digest/base.pm
            Fcntl.pm => /usr/local/lib/perl5/5.14.2/mach/Fcntl.pm
            BSDPAN.pm => /usr/local/lib/perl5/5.14.2/BSDPAN/BSDPAN.pm
            Symbol.pm => /usr/local/lib/perl5/5.14.2/Symbol.pm
            Sub/Name.pm => /usr/local/logitechmediaserver/CPAN/Sub/Name.pm
            Scalar/Util.pm => /usr/local/lib/perl5/5.14.2/mach/Scalar/Util.pm
            UNIVERSAL.pm => /usr/local/lib/perl5/5.14.2/UNIVERSAL.pm
            Exporter.pm => /usr/local/lib/perl5/5.14.2/Exporter.pm
            Slim/Utils/OS.pm => /usr/local/logitechmediaserver/Slim/Utils/OS.pm
            version/vpp.pm => /usr/local/logitechmediaserver/CPAN/version/vpp.pm
            File/Spec.pm => /usr/local/lib/perl5/5.14.2/mach/File/Spec.pm
            JSON/XS.pm => /usr/local/logitechmediaserver/CPAN/JSON/XS.pm
            File/Path.pm => /usr/local/lib/perl5/5.14.2/File/Path.pm
            FindBin.pm => /usr/local/lib/perl5/5.14.2/FindBin.pm
            locale.pm => /usr/local/lib/perl5/5.14.2/locale.pm
            warnings/register.pm => /usr/local/lib/perl5/5.14.2/warnings/register.pm
            XSLoader.pm => /usr/local/lib/perl5/5.14.2/XSLoader.pm
            Slim/bootstrap.pm => /usr/local/logitechmediaserver/Slim/bootstrap.pm
            Digest/SHA1.pm => /usr/local/logitechmediaserver/CPAN/Digest/SHA1.pm
            Time/HiRes.pm => /usr/local/lib/perl5/5.14.2/mach/Time/HiRes.pm
            XML/Parser/Expat.pm => /usr/local/logitechmediaserver/CPAN/XML/Parser/Expat.pm
            version.pm => /usr/local/logitechmediaserver/CPAN/version.pm
            B/Deparse.pm => /usr/local/lib/perl5/5.14.2/B/Deparse.pm
            DBI.pm => /usr/local/logitechmediaserver/CPAN/DBI.pm
            Config_git.pl => /usr/local/lib/perl5/5.14.2/mach/Config_git.pl
            base.pm => /usr/local/lib/perl5/5.14.2/base.pm
            Config.pm => /usr/local/lib/perl5/5.14.2/mach/Config.pm
            File/Basename.pm => /usr/local/lib/perl5/5.14.2/File/Basename.pm
            EV.pm => /usr/local/logitechmediaserver/CPAN/EV.pm
            Carp.pm => /usr/local/lib/perl5/5.14.2/Carp.pm
            YAML/XS/LibYAML.pm => /usr/local/logitechmediaserver/CPAN/YAML/XS/LibYAML.pm
            common/sense.pm => /usr/local/logitechmediaserver/CPAN/common/sense.pm
            Exporter/Heavy.pm => /usr/local/lib/perl5/5.14.2/Exporter/Heavy.pm
            File/Spec/Unix.pm => /usr/local/lib/perl5/5.14.2/mach/File/Spec/Unix.pm
            vars.pm => /usr/local/lib/perl5/5.14.2/vars.pm
            strict.pm => /usr/local/lib/perl5/5.14.2/strict.pm
            constant.pm => /usr/local/lib/perl5/5.14.2/constant.pm
            /usr/local/lib/perl5/5.14.2/mach/auto/POSIX/autosplit.ix => /usr/local/lib/perl5/5.14.2/mach/auto/POSIX/autosplit.ix
            Config_heavy.pl => /usr/local/lib/perl5/5.14.2/mach/Config_heavy.pl
            overload.pm => /usr/local/lib/perl5/5.14.2/overload.pm
            AutoLoader.pm => /usr/local/lib/perl5/5.14.2/AutoLoader.pm
            HTML/Entities.pm => /usr/local/logitechmediaserver/CPAN/HTML/Entities.pm
            lib.pm => /usr/local/lib/perl5/5.14.2/mach/lib.pm
            Slim/Utils/OS/Unix.pm => /usr/local/logitechmediaserver/Slim/Utils/OS/Unix.pm
            DynaLoader.pm => /usr/local/lib/perl5/5.14.2/mach/DynaLoader.pm
            /usr/local/lib/perl5/5.14.2/mach/auto/POSIX/load_imports.al => /usr/local/lib/perl5/5.14.2/mach/auto/POSIX/load_imports.al

  4. #4
    Junior Member
    Join Date
    Sep 2010
    Posts
    12
    Code:
    The following modules are loaded after the second attempt:
            re.pm => /usr/local/lib/perl5/5.14.2/mach/re.pm
            attributes.pm => /usr/local/lib/perl5/5.14.2/mach/attributes.pm
            HTML/Parser.pm => /usr/local/logitechmediaserver/CPAN/HTML/Parser.pm
            File/Spec/Functions.pm => /usr/local/lib/perl5/5.14.2/mach/File/Spec/Functions.pm
            List/Util.pm => /usr/local/lib/perl5/5.14.2/mach/List/Util.pm
            POSIX.pm => /usr/local/lib/perl5/5.14.2/mach/POSIX.pm
            Getopt/Long.pm => /usr/local/lib/perl5/5.14.2/Getopt/Long.pm
            Tie/Hash.pm => /usr/local/lib/perl5/5.14.2/Tie/Hash.pm
            Cwd.pm => /usr/local/lib/perl5/5.14.2/mach/Cwd.pm
            warnings.pm => /usr/local/lib/perl5/5.14.2/warnings.pm
            YAML/XS.pm => /usr/local/logitechmediaserver/CPAN/YAML/XS.pm
            Slim/Utils/OSDetect.pm => /usr/local/logitechmediaserver/Slim/Utils/OSDetect.pm
            BSDPAN/Override.pm => /usr/local/lib/perl5/5.14.2/BSDPAN/BSDPAN/Override.pm
            B.pm => /usr/local/lib/perl5/5.14.2/mach/B.pm
            Digest/base.pm => /usr/local/logitechmediaserver/CPAN/Digest/base.pm
            Fcntl.pm => /usr/local/lib/perl5/5.14.2/mach/Fcntl.pm
            BSDPAN.pm => /usr/local/lib/perl5/5.14.2/BSDPAN/BSDPAN.pm
            Symbol.pm => /usr/local/lib/perl5/5.14.2/Symbol.pm
            Sub/Name.pm => /usr/local/logitechmediaserver/CPAN/Sub/Name.pm
            Scalar/Util.pm => /usr/local/lib/perl5/5.14.2/mach/Scalar/Util.pm
            UNIVERSAL.pm => /usr/local/lib/perl5/5.14.2/UNIVERSAL.pm
            Exporter.pm => /usr/local/lib/perl5/5.14.2/Exporter.pm
            Slim/Utils/OS.pm => /usr/local/logitechmediaserver/Slim/Utils/OS.pm
            version/vpp.pm => /usr/local/logitechmediaserver/CPAN/version/vpp.pm
            File/Spec.pm => /usr/local/lib/perl5/5.14.2/mach/File/Spec.pm
            JSON/XS.pm => /usr/local/logitechmediaserver/CPAN/JSON/XS.pm
            File/Path.pm => /usr/local/lib/perl5/5.14.2/File/Path.pm
            FindBin.pm => /usr/local/lib/perl5/5.14.2/FindBin.pm
            locale.pm => /usr/local/lib/perl5/5.14.2/locale.pm
            warnings/register.pm => /usr/local/lib/perl5/5.14.2/warnings/register.pm
            XSLoader.pm => /usr/local/lib/perl5/5.14.2/XSLoader.pm
            Slim/bootstrap.pm => /usr/local/logitechmediaserver/Slim/bootstrap.pm
            Digest/SHA1.pm => /usr/local/logitechmediaserver/CPAN/Digest/SHA1.pm
            Time/HiRes.pm => /usr/local/lib/perl5/5.14.2/mach/Time/HiRes.pm
            XML/Parser/Expat.pm => /usr/local/logitechmediaserver/CPAN/XML/Parser/Expat.pm
            version.pm => /usr/local/logitechmediaserver/CPAN/version.pm
            B/Deparse.pm => /usr/local/lib/perl5/5.14.2/B/Deparse.pm
            DBI.pm => /usr/local/logitechmediaserver/CPAN/DBI.pm
            Config_git.pl => /usr/local/lib/perl5/5.14.2/mach/Config_git.pl
            base.pm => /usr/local/lib/perl5/5.14.2/base.pm
            Config.pm => /usr/local/lib/perl5/5.14.2/mach/Config.pm
            File/Basename.pm => /usr/local/lib/perl5/5.14.2/File/Basename.pm
            EV.pm => /usr/local/logitechmediaserver/CPAN/EV.pm
            Carp.pm => /usr/local/lib/perl5/5.14.2/Carp.pm
            YAML/XS/LibYAML.pm => /usr/local/logitechmediaserver/CPAN/YAML/XS/LibYAML.pm
            common/sense.pm => /usr/local/logitechmediaserver/CPAN/common/sense.pm
            Exporter/Heavy.pm => /usr/local/lib/perl5/5.14.2/Exporter/Heavy.pm
            File/Spec/Unix.pm => /usr/local/lib/perl5/5.14.2/mach/File/Spec/Unix.pm
            vars.pm => /usr/local/lib/perl5/5.14.2/vars.pm
            strict.pm => /usr/local/lib/perl5/5.14.2/strict.pm
            constant.pm => /usr/local/lib/perl5/5.14.2/constant.pm
            /usr/local/lib/perl5/5.14.2/mach/auto/POSIX/autosplit.ix => /usr/local/lib/perl5/5.14.2/mach/auto/POSIX/autosplit.ix
            Config_heavy.pl => /usr/local/lib/perl5/5.14.2/mach/Config_heavy.pl
            overload.pm => /usr/local/lib/perl5/5.14.2/overload.pm
            AutoLoader.pm => /usr/local/lib/perl5/5.14.2/AutoLoader.pm
            HTML/Entities.pm => /usr/local/logitechmediaserver/CPAN/HTML/Entities.pm
            lib.pm => /usr/local/lib/perl5/5.14.2/mach/lib.pm
            Slim/Utils/OS/Unix.pm => /usr/local/logitechmediaserver/Slim/Utils/OS/Unix.pm
            DynaLoader.pm => /usr/local/lib/perl5/5.14.2/mach/DynaLoader.pm
            /usr/local/lib/perl5/5.14.2/mach/auto/POSIX/load_imports.al => /usr/local/lib/perl5/5.14.2/mach/auto/POSIX/load_imports.al
    
    Your locale was detected as C, you may have problems with non-Latin filenames.  Consider changing your LANG variable to the correct locale, i.e. en_US.utf8
    [12-07-16 12:14:31.4393] main::init (354) Starting Logitech Media Server (v7.7.2, r33893, Wed Mar 14 06:43:12 MDT 2012) perl 5.014002
    Segmentation fault
    Any more logs I can put my hands on?

    Is there a way to know what's Prefs is doing exactly? I don't know the Perl language at all...

    Thanks for the help

  5. #5
    Junior Member
    Join Date
    Sep 2010
    Posts
    12
    Hi,
    Some details about where the segfault takes place (by the way it's the same with LMS 7.8 nigthly)

    At launch, slimserver.pl calls Slim::Utils::Prefs::init();, which calls :
    Code:
    		$prefs->migrate(1, sub {
    			unless (-d $path) { mkdir $path; }
    			unless (-d $path) { logError("can't create new preferences directory at $path"); }
    
    			for my $pref (keys %defaults) {
    				my $old = Slim::Utils::Prefs::OldPrefs->get($pref);
    
    				# bug 7237: don't migrate dbsource if we're upgrading from SS6.3
    				next if $pref eq 'dbsource' && $old && $old =~ /SQLite/i;
    
    				$prefs->set($pref, $old) if !$prefs->exists($pref) && defined $old;
    			}
    
    			1;
    		});
    $prefs->migrate() being in Slim::Utils::Prefs::Namespace

    And in the sub migrate, i've put some printf debug lines :
    Code:
    sub migrate {
    	my $class    = shift;
    	my $version  = shift;
    	my $callback = shift;
    
    	if ($version > $class->{'prefs'}->{'_version'} && ref $callback eq 'CODE') {
    
    		if ($callback->($class)) {
    
    			main::INFOLOG && $log->info("migrated prefs for $class->{'namespace'} to version $version");
    
    			$class->{'prefs'}->{'_version'} = $version;
    
    		} else {
    
    			$log->warn("failed to migrate prefs for $class->{'namespace'} to version $version");
    		}
    
    printf("************* debug 01 *************\n");
    		$class->save;
    printf("************* debug 02 *************\n");
    	}
    }
    When i launch slimserver.pl, I see "debug 01", not "debug 02" ("Segmentation Fault" instead)
    So the instruction save() seems to be the problem

    That's as far as I can go in investigation, since I have no knowledge at all of Perl

    Please someone help!

  6. #6
    Junior Member
    Join Date
    Sep 2010
    Posts
    12
    Ouf, it's OK now, it's launching (well almost).

    I rebuilt every CPAN modules with the builme.sh and now it's OK.

    The save instruction lead me to the use of the EV module which wasn't surely properly compiled.

    Fiou, now it seems i need to add a squeezeboxserver user to make it start!

  7. #7
    Junior Member
    Join Date
    Jul 2012
    Posts
    4

    Curious

    Hi,

    As I am trying to get this to work in a similar environment (FreeBSD 8.3 AMD64, Perl 5.14) I am curious how you got past the:

    DBD::SQLite object version 1.37 does not match bootstrap parameter 1.34_01 at /usr/local/lib/perl5/5.14.2/mach/DynaLoader.pm line 213.
    Compilation failed in require at /usr/local/squeezeboxserver/Slim/Utils/DbCache.pm line 11.
    BEGIN failed--compilation aborted at /usr/local/squeezeboxserver/Slim/Utils/DbCache.pm line 11.
    Compilation failed in require at /usr/local/squeezeboxserver/Slim/Utils/Cache.pm line 49.
    BEGIN failed--compilation aborted at /usr/local/squeezeboxserver/Slim/Utils/Cache.pm line 49.
    Compilation failed in require at /usr/local/squeezeboxserver/Slim/Utils/Scanner.pm line 42.
    BEGIN failed--compilation aborted at /usr/local/squeezeboxserver/Slim/Utils/Scanner.pm line 42.
    Compilation failed in require at /usr/local/squeezeboxserver/Slim/Control/Commands.pm line 39.
    BEGIN failed--compilation aborted at /usr/local/squeezeboxserver/Slim/Control/Commands.pm line 39.
    Compilation failed in require at /usr/local/squeezeboxserver/Slim/Control/Request.pm line 434.
    BEGIN failed--compilation aborted at /usr/local/squeezeboxserver/Slim/Control/Request.pm line 434.
    Compilation failed in require at /usr/local/squeezeboxserver/Slim/Player/Client.pm line 32.
    Compilation failed in require at /usr/local/squeezeboxserver/Slim/Utils/Alarm.pm line 48.
    BEGIN failed--compilation aborted at /usr/local/squeezeboxserver/Slim/Utils/Alarm.pm line 48.
    Compilation failed in require at /usr/local/squeezeboxserver/Slim/Buttons/Alarm.pm line 12.
    BEGIN failed--compilation aborted at /usr/local/squeezeboxserver/Slim/Buttons/Alarm.pm line 12.
    Compilation failed in require at /usr/local/squeezeboxserver/Slim/Buttons/Common.pm line 41.
    BEGIN failed--compilation aborted at /usr/local/squeezeboxserver/Slim/Buttons/Common.pm line 41.
    Compilation failed in require at ./slimserver.pl line 186.
    BEGIN failed--compilation aborted at ./slimserver.pl line 186.


    Thankful for any tip

    / Jimmy

  8. #8
    Junior Member
    Join Date
    Sep 2010
    Posts
    12
    Your DBD/SQLite.so is version 1.37 (i assume you built it from ports)
    LMS wants version 1.34_01 (specified in CPAN/DBD/SQLite.pm)

    2 choices :
    - you modify the version in CPAN/DBD/SQLite.pm (i don't know if LMS is going to like a newer version)
    - you buil DBD::SQLite 1.34_01 from http://svn.slimdevices.com/repos/sli...k/vendor/CPAN/

    Actually to avoid any problem i rebuilt every CPAN module from http://svn.slimdevices.com/repos/sli...k/vendor/CPAN/
    Just download everything, put it in a dir, make sure you have a new gcc (4.2.1 is too old, it will fail... the one in the ports is good, 4.6.3), and launch buildme.sh
    This way LMS will have the exact versions it needs!

  9. #9
    Junior Member
    Join Date
    Jul 2012
    Posts
    4

    New problems

    Thanks,

    I tried copying the version from the "system" CPAN to LMS's and it made the error go away (for now at least).

    Now I'm getting the Media::Scan problem. I've tried running the buildme.sh script, and I've gotten all to compile with some hacks. But then I don't know what to do. I'm getting:

    Can't locate loadable object for module Media::Scan in @INC (@INC contains: /usr/local/squeezeboxserver.new/CPAN/arch/5.14/amd64-freebsd-thread-multi....

    I've tried copying the built binaries to one of the local folders in @INC but that doesn't do much. When I read about the buildme script it sounds like it should output files to an arch folder in the build folder, but I don't get one!? So now I'm lost again. I just want my newly baught Squeezebox Radio to work. The Squeezebox Touch works with the older firmware and seems to play nicely with the the squeezeboxserver in the ports but for some reason I can't downgrade the Radio, which might have solved the problem for me.

    Sorry to nag you about this, but I haven't found anyone coming closer to an answer than you have.

  10. #10
    Junior Member
    Join Date
    Sep 2010
    Posts
    12
    Indeed, once buildme.sh is finished (if not interrupted by an error), you hsould find a build/arch/5.XX/yourOS/auto dir, which contains CPAN modules freshly built for your system.
    You should find Media/Scan.so
    Maybe it's in some other place... search it in the whole build dir (find ./build -name Scan.so)

    Put the so's in you LMS dir in CPAN/arch/5.XX/yourOS/auto, slimserver should find it and be happy!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •