svn-1586 crashes after a scan

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1435
    gbdennis
    Participant

    Hi, just upgraded to svn-1586 (for good reason, so don’t want go back to the previous rel).

    After a scan, firefly server stops. Not sure what’s going on and not sure what I should be seeing (i.e. don’t know where to look for logs)
    but /raid/sys/songs.db does get written to (26mb file.
    however when the server is restarted it gets wiped.
    For the record, I’m running firefly on Thecus N2100 ver 2.1.0.5

    I know from looking at the forum that others have seen similar probs, not sure what the exact fix is though.

    Cheers!

    #10952
    gbdennis
    Participant

    ok.. got the logs going and my issue looks similar to sydneyguy’s (but not quite the same)

    on scan completion…

    Registering rendezvous names
    2007-05-29 19:40:43 (00000400): Serving 0 songs. Startup complete in 1 seconds
    2007-05-29 19:42:27 (00000400): Rescanning database
    2007-05-29 19:46:57 (00006403): Thread 23: Entering ws_returnerror (302: Moved)
    2007-05-29 19:50:55 (00000400): Rendezvous socket closed (daap server crashed?) Aborting.
    2007-05-29 19:50:55: Aborting

    #10953
    rpedde
    Participant

    @gbdennis wrote:

    ok.. got the logs going and my issue looks similar to sydneyguy’s (but not quite the same)

    on scan completion…

    Registering rendezvous names
    2007-05-29 19:40:43 (00000400): Serving 0 songs. Startup complete in 1 seconds
    2007-05-29 19:42:27 (00000400): Rescanning database
    2007-05-29 19:46:57 (00006403): Thread 23: Entering ws_returnerror (302: Moved)
    2007-05-29 19:50:55 (00000400): Rendezvous socket closed (daap server crashed?) Aborting.
    2007-05-29 19:50:55: Aborting

    Run this with a -d9 and you’ll probably get more info. Perhaps a song that it tries to scan and crashes while doing so.

    — Ron

    #10954
    gbdennis
    Participant

    indeed it wass – I actually ran it at debug 9 last night, but it stopped on the same song this morning too, so.. bye bye Bowie

    Thanks alot Ron, great work.

    #10955
    rpedde
    Participant

    @gbdennis wrote:

    indeed it wass – I actually ran it at debug 9 last night, but it stopped on the same song this morning too, so.. bye bye Bowie

    Thanks alot Ron, great work.

    If you still have the file, I’d really like to see it… if you could email it to [email protected], I could fix the underlying bug. 🙂

    Not sure if it’s my bad, or a libid3tag problem, but I’d sure like to see it.

    — Ron

    #10956
    scot
    Participant

    On OpenBSD 4.1-current using mt-daapd-svn-1586 the first scan would work properly. Any additional scans, full, simple or automatic would cause the scanning thread to spin endlessly consuming an entire processor and doing a lot of nothing.

    Running with “-d 7 -D scan” revealed that the recursion was not working, the scanner was spinning on the last track in the first directory it reached.

    In my case […]/iTunes Music/Air/Virgin Suicides/13 Suicide Underground.mp3 would get processed endlessly.

    I quickly found scan_path() in mp3-scanner.c and tossed in a mess of debugging code to see what was happening. When I changed the following lines it started to work. I’ve had 5 full scans on this code without the issue showing back up. I’m not sure which of the two changes fixed it, the NULL check should be exactly the same as what you had, but I’ve seen that kind of thing get eaten by gcc’s optimizer before.

    I’ll re-launch with -d 9 and see if anything is getting logged.


    err=readdir_r(current_dir,(struct dirent *)de,&pde);
    if(err != 0) {
    DPRINTF(E_DBG,L_SCAN,"Error on readdir_r: %sn",strerror(errno));
    err=errno;
    closedir(current_dir);
    free(extensions);
    errno=err;
    return -1;
    }

    if (pde == NULL) break;

    Edit: it throws a “Error on readdir_r: No such file or directory” at the end of each directory with -d 9, but it works.

    In the following check, wouldn’t it be better to check for the . file first and .AppleDouble/Desktop second? If you are ignoring all . files, the cheaper test will speed things up…


    if(S_ISDIR(sb.st_mode)) { /* follow dir */
    if(conf_get_int("scanning","ignore_appledouble",1) &&
    ((strcasecmp(pde->d_name,".AppleDouble") == 0) ||
    (strcasecmp(pde->d_name,".AppleDesktop") == 0))) {
    DPRINTF(E_DBG,L_SCAN,"Skipping appledouble foldern");
    } else if(conf_get_int("scanning","ignore_dotfiles",0) &&
    pde->d_name[0] == '.') {
    DPRINTF(E_DBG,L_SCAN,"Skipping dotfilen");
    } else {
    DPRINTF(E_WARN,L_SCAN,"Found %s.. recursingn",pde->d_name);
    scan_path(mp3_path);
    }

    Logging would be less informative, but if you are ignore all . files… who cares if it’s .AppleDouble or not?

    #10957
    rpedde
    Participant

    @scot wrote:

    On OpenBSD 4.1-current using mt-daapd-svn-1586 the first scan would work properly. Any additional scans, full, simple or automatic would cause the scanning thread to spin endlessly consuming an entire processor and doing a lot of nothing.

    I just put up an obsd box, so I’ll verify and commit this. Thanks.

    — Ron

    #10958
    scot
    Participant

    @rpedde wrote:

    @scot wrote:

    On OpenBSD 4.1-current using mt-daapd-svn-1586 the first scan would work properly. Any additional scans, full, simple or automatic would cause the scanning thread to spin endlessly consuming an entire processor and doing a lot of nothing.

    I just put up an obsd box, so I’ll verify and commit this. Thanks.

    — Ron

    I’m running on AMD64 with the bsd.mp kernel. If you need access to this box for testing/verification, let me know. You’ve got my email address.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Nightlies Feedback’ is closed to new topics and replies.