Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 48
  1. #11
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,479

    Upgraded from 7.9.1 => 7.9.4:Logitech Media Server died. Restarting.

    > The following modules are loaded after the second attempt:
    > .....
    > Segmentation fault


    Ok, you seem to feel comfortable on the command line. What we see here
    is that you get pretty far in the bootstrap process. The above line
    comes from:

    https://github.com/Logitech/slimserv...tstrap.pm#L179

    Could you please add a bunch of "print" statements after this, to see
    where it exits? Eg. before each of the following "if" statements and
    right at the end of the "loadModules" section. Then re-run to see how
    far we get in there.

    The file should be in /usr/share/squeezeboxserver/Slim/bootstrap.pm or similar.

    --

    Michael
    Last edited by mherger; 2020-11-21 at 01:29.

  2. #12
    Senior Member
    Join Date
    Feb 2010
    Posts
    315
    Thanks, Michael. It segfaults in https://github.com/Logitech/slimserv...tstrap.pm#L257
    Code:
            $SIG{'PIPE'} = 'IGNORE';

  3. #13
    Senior Member
    Join Date
    Feb 2010
    Posts
    315
    Oops! That wasn't the line that was crashing! Since I was printing to stdout, the output was buffered and not necessarily printed before the crash. Changing my print statement to print STDERR shows that I get all the way to the end of loadModules. I will push forward to find the actual segfaulting line.

  4. #14
    Senior Member
    Join Date
    Feb 2010
    Posts
    315
    Hmm, it successfully gets to the end of the BEGIN block that calls loadModule, do you have any ideas where to print next?

    In case it's useful, here's a gdb stacktrace of the segv, but there is no symbol table info, so I can't do anything like "info locals"
    Code:
    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread -144542032 (LWP 10363)]
    0x000000ff in ?? ()
    (gdb) t
    [Current thread is 2 (Thread -144542032 (LWP 10363))]
    (gdb) backtrace
    #0  0x000000ff in ?? ()
    #1  0x080bdaa1 in Perl_pp_entersub ()
    #2  0x080bc379 in Perl_runops_standard ()
    #3  0x080626be in Perl_magicname ()
    #4  0x080632ee in Perl_call_sv ()
    #5  0x0806360e in Perl_call_list ()
    #6  0x08097bef in Perl_newATTRSUB ()
    #7  0x08087d7d in Perl_yyparse ()
    #8  0x080ebd7e in Perl_pp_range ()
    #9  0x080edabb in Perl_pp_require ()
    #10 0x080bc379 in Perl_runops_standard ()
    #11 0x080626be in Perl_magicname ()
    #12 0x080632ee in Perl_call_sv ()
    #13 0x0806360e in Perl_call_list ()
    #14 0x08097bef in Perl_newATTRSUB ()
    #15 0x080960fb in Perl_utilize ()
    #16 0x08087413 in Perl_yyparse ()
    #17 0x080ebd7e in Perl_pp_range ()
    #18 0x080edabb in Perl_pp_require ()
    #19 0x080bc379 in Perl_runops_standard ()
    #20 0x080626be in Perl_magicname ()
    #21 0x080632ee in Perl_call_sv ()
    #22 0x0806360e in Perl_call_list ()
    #23 0x08097bef in Perl_newATTRSUB ()
    #24 0x080960fb in Perl_utilize ()
    #25 0x08087413 in Perl_yyparse ()
    #26 0x080ebd7e in Perl_pp_range ()
    #27 0x080edabb in Perl_pp_require ()
    #28 0x080bc379 in Perl_runops_standard ()
    #29 0x080626be in Perl_magicname ()
    #30 0x080632ee in Perl_call_sv ()
    #31 0x0806360e in Perl_call_list ()
    #32 0x08097bef in Perl_newATTRSUB ()
    #33 0x080960fb in Perl_utilize ()
    #34 0x08087413 in Perl_yyparse ()
    #35 0x08066381 in perl_free ()
    #36 0x080671cc in perl_parse ()
    #37 0x0805ff72 in main ()
    Any suggestions?

  5. #15
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,479

    Upgraded from 7.9.1 => 7.9.4:Logitech Media Server died. Restarting.

    > Hmm, it successfully gets to the end of the BEGIN block that calls
    > loadModule, do you have any ideas where to print next?


    That's good to know! This means most likely it's not a binary causing
    the problem (which I would not have understood anyway, as we didn't
    touch them).

    Next up would be that large list of "use" statements. First the external
    modules, then all the Slim:: ones. Try to figure out whether you get
    past all of them. If not, on which one it crashes.

    If you get past them, step into the init() function. We do not reach
    line 395 or similar where we log "Starting Logitech Media Server...".
    The failure must be before that. Or that very statement (it has slightly
    changed).

    At first I was wondering why only the x86 ReadyNAS build would fail, but
    eg. not the ARM version. But it seems ARM is using Perl 5.10. x86 is on
    5.8. So there might be an issue with that old Perl version. Some
    statement I changed which is not compatible with Perl 5.8.

    --

    Michael

  6. #16
    Senior Member
    Join Date
    Feb 2010
    Posts
    315
    Edit: Figured out how to debug startup code in the perl debugger by putting $DB::single in a BEGIN block, and I can now step through.

    It is dying in the "use Slim::Utils::Misc;" statement.

    I have to run to dinner, but I will step through Slim::Utils::Misc::CODE when I get back
    Last edited by mps; 2020-11-22 at 18:30. Reason: Solved on problem. On to the next.

  7. #17
    Senior Member
    Join Date
    Feb 2010
    Posts
    315
    OK. It crashes in /usr/share/squeezeboxserver/lib/Audio/Scan.pm in the line

    Code:
                    eval { XSLoader::load('Audio::Scan', $_); };
    This is in a loop where it segfaults on the third time through, with $_ = '0.95'.

    Was there any change to the version of Audio::Scan used by slimserver?

    Thanks again for all your help,

    Mike
    Last edited by mps; 2020-11-22 at 20:18.

  8. #18
    Senior Member
    Join Date
    Feb 2010
    Posts
    315
    Hi Michael,
    OK. This fixes it, but seems insane.

    In /usr/share/squeezeboxserver/lib/Audio/Scan.pm
    Code:
    BEGIN {
    #     foreach ('0.99', '0.93', '0.95', '0.94') {    # Get rid of this line
           foreach ('0.95') {                               # And replace it with this one
                    eval { XSLoader::load('Audio::Scan', $_); };
                    if (!$@) {
                            $VERSION = $_;
                            last;
                    }
            }
    }
    My best guess is some stale state in XSLoader from the first two failed loop iterations (they return a version number mismatch, which is eaten by the eval). I've also verified that the Scan.so version is 0.95.

    Still, I've triple-checked that change allows LMS to come up and play music. I'm going to try running a scan next. (Edit: Ran fine. Everything seems to work at least as well as w/7.9.1)

    Thanks,
    Mike
    Last edited by mps; 2020-11-22 at 22:26.

  9. #19
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,479

    Upgraded from 7.9.1 => 7.9.4:Logitech Media Server died. Restarting.

    > OK. This fixes it, but seems insane.

    It's not! You've actually found an issue I had "fixed" a first time more
    than six years ago. See the commit message here:

    https://github.com/Logitech/slimserv...e3607382f3d892

    I'll see what I can do. Will probably just do what I did with more
    recent version: stick the Pure Perl part of the module inside the
    platform specific folder.

    --

    Michael

  10. #20
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,479

    Upgraded from 7.9.1 => 7.9.4:Logitech Media Server died. Restarting.

    EDIT: forget the following. Just download LMS 8.0.1 instead: http://downloads.slimdevices.com/nightly/?ver=8.0

    THE FOLLOWING IS OUTDATED (and only necessary if your LMS is outdated, too )

    Ok, could you please try the following: download

    https://raw.githubusercontent.com/an.../Audio/Scan.pm

    and save it in

    /usr/share/squeezeboxserver/CPAN/arch/5.8/i386-linux-thread-multi/Audio/

    You'll have to create the Audio folder, as it won't be there. If that's
    starting fine, and you're brave, you can remove lib/Audio/Scan.pm.

    --

    Michael
    Last edited by mherger; 2020-11-23 at 05:25.

Posting Permissions

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