Bug 12311 - scanner can't be stopped
: scanner can't be stopped
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Scanner
: 7.4.0
: PC Other
: P1 critical (vote)
: 7.6.0
Assigned To: Michael Herger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-08 17:29 UTC by Michael Herger
Modified: 2011-05-27 06:20 UTC (History)
3 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Herger 2009-06-08 17:29:47 UTC
in order to abort a scan we now have to kill the process. The CLI command "abortscan" doesn't work any more.
Comment 1 Andy Grundman 2009-07-29 14:40:44 UTC
Moving all SQLite-related bugs to 8.0.
Comment 2 Andy Grundman 2011-01-12 12:08:27 UTC
SQLite bugs need to go back to 7.6 target.
Comment 3 Alan Young 2011-04-08 08:36:17 UTC
I fixed this yesterday. r32240
Comment 4 Jim McAtee 2011-04-08 13:03:44 UTC
Alan, are you also making sure the progress table in the DB is also being cleared after you abort the scan? I've seen a lot of scenarios in 7.6 where it's never cleared and it prevents further scans from being launched.
Comment 5 Alan Young 2011-04-08 23:53:06 UTC
Hmm, it worked with my initial testing but seems broken again now.
Comment 6 Jim McAtee 2011-04-14 18:23:50 UTC
Yeah, something is going on. If I abort a new & changed scan from the web UI it immediately shows the message 'The server has finished scanning your music collection.', but it appears to continue scanning.
Comment 7 Bradley D. Wall 2011-04-21 10:53:09 UTC
Cannot reproduce this on 7.6.  Will review with the team if need to close.  Once scanning, if the "abort" button is pressed, the scan is aborted.
Comment 8 Michael Herger 2011-05-19 22:25:58 UTC
Jim - I can't reproduce this either (testing in onebrowser). How do you see it continue? Are you testing on trunk or onebrowser? Nightly build or from the source? Windows or something else?
Comment 9 Jim McAtee 2011-05-19 23:10:26 UTC
Windows, onebrowser source from SVN, running as a Windows service.

To reproduce, for me anyway:

1. Start with a new server, music folder pointing to my 32k track library, located on a local drive.

2. Start the server. A full scan using the external scanner is automatically launched.

3. Abort the scan.

This kills the external scanner process, and the web UI's scanning progress says that the scan has finished, but the total time continues to tick.

4. Launch a 'new & changed' scan. I can verify that this launches the internal scanner, as there isn't a new Perl process launched.

5. Abort the scan.

Again the web scanning progress says "The server has finished scanning your music collection." (And the 'Abort' link is no longer present.) But the 'Scanning new files' pass continues to count up, the progress bar moves, the time for the pass continues to increase, the file being scanned is continuously updated, total time continues to increase, etc.

Browsing albums in web UI I can see the track and album count increasing.

Going back to the Basic Settings page, the rescan drop-down is _not_ grayed out.

If I stop and restart the server at this point (before the scan finishes), the new & changed scan does not appear to be run again, but the times for both 'Scanning new files' and Total continue to tick. Launch another 'new & changed' scan, abort it, and I get the same behavior - the scan continues to run.
Comment 10 Michael Herger 2011-05-19 23:19:09 UTC
> Windows, onebrowser source from SVN, running as a Windows service.

Can you reproduce the same behaviour with a regular build? We do have some code to deal with the different ways of running SBS on Windows. But your setup is even more exotic (running perl as a service) than running perl from the command line. I wouldn't be surprised if there was an issue related to this.

I'll verify the Windows build as a service once more.
Comment 11 Jim McAtee 2011-05-20 00:11:20 UTC
Running the nightly build 7.6.0 r32434 from 19-May-2011 as a Windows service, I see exactly the same behavior. I have all other SBS servers on the machine stopped, so SqueezeSvr.exe (plus SqueezeTray) is the only thing running.

I also managed to get this one into a state where it refused to run a clear & rescan, but it did run a new & changed scan. Just some more weirdness.
Comment 12 Michael Herger 2011-05-25 06:53:11 UTC
I think the remaining issue we're seeing isn't "scanner can't be stopped", but "server doesn't know scanner has been stopped". The scan process is indeed stopped, but the server doesn't update the progress information with this piece of information. Thus it keeps on counting up the time etc. That's not what the bug initially was reported for.
Comment 13 SVN Bot 2011-05-25 06:55:07 UTC
 == Auto-comment from SVN commit #32468 to the slim repo by mherger ==
 == http://svn.slimdevices.com/slim?view=revision&revision=32468 ==

Fixed Bug: 12311
Description: when aborting the scan, don't kill the scanner process, but rely on the ABORT flag. Then make sure the scanner cleans up behind.

Please note that when the scan is aborted, it might take a few seconds before the scanner actually stops running.
Comment 14 Bradley D. Wall 2011-05-25 10:09:57 UTC
Will retest with build 32468.  If original bug is confirmed fixed, will close.  If additional bug needs to be opened, it will be.
Comment 15 Jim McAtee 2011-05-25 10:37:21 UTC
(In reply to comment #12)
> I think the remaining issue we're seeing isn't "scanner can't be stopped", but
> "server doesn't know scanner has been stopped". The scan process is indeed
> stopped, but the server doesn't update the progress information with this piece
> of information. Thus it keeps on counting up the time etc. That's not what the
> bug initially was reported for.

I think you could be wrong. Why else would the *file and album counts* continue to increase, not only as indicated on the progress page, but also within the browse views? I understand how the timers work and why they continue to count up. I'll try the proposed changes.
Comment 16 Michael Herger 2011-05-26 04:36:41 UTC
Ok, I fixed the abortion of the external scanner (clean scan), but the update scan still can't be canceled.
Comment 17 SVN Bot 2011-05-27 05:52:48 UTC
 == Auto-comment from SVN commit #32479 to the slim repo by mherger ==
 == http://svn.slimdevices.com/slim?view=revision&revision=32479 ==

Fixed Bug: 12311
Description: fix abortion of scanner in main process
Comment 18 Michael Herger 2011-05-27 06:20:02 UTC
Please note that after hitting the Abort link it might still take a few seconds for all async process to be stopped.