Menu

#309 'sql_get_int_field' error on scan completion

v1.0 (example)
open
nobody
None
5
2017-08-11
2017-08-08
No

With a very large number of scanned files, the scanning process always completes with:

[2017/08/08 11:45:19] playlist.c:125: warn: Parsing playlists...
[2017/08/08 11:45:22] sql.c:117: warn: sql_get_int_field: step failed: SQL logic error or missing database
SELECT count(*) from DETAILS where MIME glob 'a*'
[2017/08/08 11:50:16] playlist.c:259: warn: Finished parsing playlists.

... which might be a timeout waiting for the database to enumerate all of the new insertions?

(I notice that the code where this occurs deals with the SQLITE_DONE and SQLITE_ROW cases, but generates the above warning (which will prevent any result from being used) for any other response... is there an -EAGAIN -like sqlite return code?)

Discussion

  • Stuart Shelton

    Stuart Shelton - 2017-08-08

    This is still the case in v1.2.0, but goes back at least as far as 1.1.4, if not before...

     
  • Justin Maggard

    Justin Maggard - 2017-08-09

    The only place I can find that does that query is when the presentation URL is accessed. So I don't see how that could be related to scanning.

    Do you see any effects, besides the warning message?

     
  • Stuart Shelton

    Stuart Shelton - 2017-08-09

    Ah, okay - the only reason I assumed it was scanning-related is that, as above, the only time I've seen it is on server startup with a large number of scanned files between the 'Parsing playlists' and 'Finished parsing playlists' log-entries.
    I noticed this when trying to get RM working with a Samsung TV (issue #311), and was wondering if it was related.
    Other than this, I've not seen any effect - but I've not been stressing the product features. Obviously, the operation triggering this database operation will be failed - but what the knock-on affects might be, I couldn't say...

     
  • Shrimpkin

    Shrimpkin - 2017-08-11

    minidlna forks a child process (if compiled) for the scan. The warning looks to happen when the presentation page is accessed while the scan is processing the playlists. The playlist code does quite a bit of db i/o. Curious if sql_get_int_field() is getting any busy or locked return codes before bailing.

     

Log in to post a comment.

Auth0 Logo