Skip to content

Log spammed by "File source not found for:" errors #6625

Closed

Description

@Djinnistorm

Hello, new to github so forgive me if I am doing this horribly wrong. Furthermore, I have found issues with a similar problem (such as issue #4733 ) that state that this issue was solved, but I can't seem to re-open a closed issue, so...here we are.

Background Info:

OS is CentOS 6.4
DB is sqlite
php version is 5.4.23
update.php: {"installed":"true","version":"6.0.0.14","versionstring":"6.0.0a","edition":""}
This was updated from a 5.0.14a

I am getting a log that is absolutely filled to the brim with the following:

{"app":"files_sharing","message":"File source not found for: \/Amber Charter School","level":3,"time":"2013-12-31T02:09:20+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School","level":3,"time":"2013-12-31T02:09:20+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School","level":3,"time":"2013-12-31T02:09:20+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School","level":3,"time":"2013-12-31T02:09:20+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School","level":3,"time":"2013-12-31T02:09:21+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School","level":3,"time":"2013-12-31T02:09:21+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School","level":3,"time":"2013-12-31T02:09:21+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School","level":3,"time":"2013-12-31T02:09:21+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School","level":3,"time":"2013-12-31T02:09:21+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School\/Phots 2nd Floor Comm Rm","level":3,"time":"2013-12-31T02:09:21+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School\/Phots 2nd Floor Comm Rm","level":3,"time":"2013-12-31T02:09:21+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School\/Phots 2nd Floor Comm Rm","level":3,"time":"2013-12-31T02:09:21+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School\/Phots 2nd Floor Comm Rm","level":3,"time":"2013-12-31T02:09:21+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School\/Phots 2nd Floor Comm Rm","level":3,"time":"2013-12-31T02:09:21+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School\/Phots 2nd Floor Comm Rm","level":3,"time":"2013-12-31T02:09:22+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School\/Phots 2nd Floor Comm Rm","level":3,"time":"2013-12-31T02:09:22+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School\/Phots 2nd Floor Comm Rm","level":3,"time":"2013-12-31T02:09:22+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School\/Phots 2nd Floor Comm Rm","level":3,"time":"2013-12-31T02:09:22+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School\/Phots 2nd Floor Comm Rm","level":3,"time":"2013-12-31T02:09:22+00:00"}

This folder is in a shared directory, so it has no specific entry in the oc_share table as far as I can tell. The file named in the messages does not exist, I'm guessing a user deleted it. The log messages always seem to come in these blocks of alternating 10. The lines slowly increment in time (ex: 18:32:12+00:00 going to 18:51:18+00:00 over ~8500 lines of logs) with sudden large jumps in the middle of blocks, like the following:

{"app":"files_sharing","message":"File source not found for: \/Amber Charter School\/Phots 2nd Floor Comm Rm","level":3,"time":"2013-12-30T12:29:31+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School\/Phots 2nd Floor Comm Rm","level":3,"time":"2013-12-30T12:29:31+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School\/Phots 2nd Floor Comm Rm","level":3,"time":"2013-12-30T12:29:31+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School\/Phots 2nd Floor Comm Rm","level":3,"time":"2013-12-30T12:29:31+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School\/Phots 2nd Floor Comm Rm","level":3,"time":"2013-12-30T18:32:12+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School\/Phots 2nd Floor Comm Rm","level":3,"time":"2013-12-30T18:32:12+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School\/Phots 2nd Floor Comm Rm","level":3,"time":"2013-12-30T18:32:12+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School\/Phots 2nd Floor Comm Rm","level":3,"time":"2013-12-30T18:32:12+00:00"}
{"app":"files_sharing","message":"File source not found for: \/Amber Charter School\/Phots 2nd Floor Comm Rm","level":3,"time":"2013-12-30T18:32:12+00:00"}

The first log for this particular file was on December 26th. By the 31st, over 290,000 lines of this had been entered into the log. Any ideas? Let me know if more info is needed (and maybe how to get said info, I'm a bit new to this).
Thanks!

Activity

  1. DeepDiver1975 commented on Jan 3, 2014

    @DeepDiver1975
    Contributor

    @Djinnistorm these log entries are telling us/you, that a file or folder which has been shared got removed - can you confirm this? THX

    @schiesbn we had pull requests for oc6 which should have fixed this - right? Not to sure ... THX

  2. Djinnistorm commented on Jan 3, 2014

    @Djinnistorm
    Author

    An Amber Charter School directory does exist, but I do not see the file in question, which I should (if it exists) since that directory is within a shared directory. I also tried using find . -name Comm in the data folder. This returned no results, so the file doesn't exist (unless I messed up somewhere).

  3. mcgege commented on Jan 5, 2014

    @mcgege

    Same / similar problems here: #6608, owncloud/client#1317
    --> always in shared folders

  4. PVince81 commented on Jan 7, 2014

    @PVince81
    Contributor

    @Djinnistorm are you using the encryption app ?

  5. Djinnistorm commented on Jan 7, 2014

    @Djinnistorm
    Author

    @PVince81 Yes, we are.

  6. viasys commented on Jan 14, 2014

    @viasys

    I'm having the same Issue too,

    Owncloud 6.0a
    Debian 6
    PHP 5.4.23-1
    encryption app disabled

    I think it might have to do something with the Sync-Client. An Idea might be, that the Sync-Client tries to upload a certain file but he fails for some reason, but he still tells the Server that the file is uploaded. Then another client gets the message that he is supposed to download that file but he cant find it.

    Another time i saw that message happening was when someone tried to create a folder in /shared via the Sync-Client but he had no permission to do so.

    Maybe this can Help.

  7. schiessle commented on Jan 14, 2014

    @schiessle
    Contributor

    @DeepDiver1975 Yes, we fixed this on several places until I couldn't reproduce it any more. But that's not a guarantee that we have found all cases where this could happen.

    All the places where I fixed it used the same pattern:

    • an app listen to the delete hook
    • once a file was deleted the file wants to do some final operation, e.g. clean up the versions. Therefore it asks OC Filesystem about the real location of the file because it could be a shared file. The Sharing API can't resolve it because the file no longer exists and creates the error message.

    My solution in this case:

    I implemented a pre-delete and a post-delete hook. The pre-delete hook does all the OC Filesystem operation to get the needed information as long as the file exists and stores it in an array. The post-delete hook took this information from the array and uses this information for his operations once the file was deleted successfully.

    This pattern makes it hard to find all places which could trigger this messages. Actually every app could trigger this errors if it doesn't take care not to call any file system operations once a file was deleted.

    Everybody who still see this error messages, can you please post a list of your enabled apps?

  8. schiessle commented on Jan 14, 2014

    @schiessle
    Contributor

    Maybe we should change this error message to a debug or Info message? Until now I only read about the error log spam problem but never about "real" problems triggered by it. Maybe we publish the message to aggressive? Opinions?

  9. DeepDiver1975 commented on Jan 14, 2014

    @DeepDiver1975
    Contributor

    @schiesbn I think I already stated this last time: I question the necessity of this message at all.

    As soon as the code detects that there is a file shared which no longer exists -> delete that share and continue.

  10. DeepDiver1975 commented on Jan 14, 2014

    @DeepDiver1975
    Contributor

    is a file shared which no longer exists

    to be read as: the referenced database entry is no longer there - no check to the filesystem

  11. schiessle commented on Jan 14, 2014

    @schiessle
    Contributor

    As soon as the code detects that there is a file shared which no longer exists -> delete that share and continue.

    We already delete all shares if a file gets deleted. The problem are the delete hooks. Apps listen to the hooks, then want to do some final stuff with the file or with some meta-data and ask the filesystem something like getOwner() or getFileInfo(), but if it is a post-delete hook the file no longer exists which triggers the error. This could also break the hook. So for debugging/developing purpose the message can be useful to tell you that what you are trying to do can't be done in a post-delete hook. But it probably doesn't qualify as a general error message.

    I will create a pull request to change this error message to a debug message.

  12. DeepDiver1975 commented on Jan 14, 2014

    @DeepDiver1975
    Contributor

    I will create a pull request to change this error message to a debug message.

    This will help to not pollute the log file but not heal the system - the entry in the share table remains.
    I see no reason in keeping that entry - why not do some house keeping and delete that invalid entry as soon as we detect it.

  13. schiessle commented on Jan 14, 2014

    @schiessle
    Contributor

    I see no reason in keeping that entry - why not do some house keeping and delete that invalid entry as soon as we detect it.

    The entry gets deleted. If the file delete operation is finished the entry will be gone. If not than it is a bug in the Updater which should be fixed there.

    The problem of this particular error message is that it get triggered during the delete operation where we are in a state where the file is already deleted, the share table is not yet cleaned-up and some app asks for the file. So the message is useful for the developer because he needs to know that for such operations he should use a pre-hook, not a post-hook. It can also be useful to detect a getSource() call with an invalid target. But it is more something for development/debugging and not for general usage.

    TL;DR no need to clean-up the share table at this point, the updater already takes care of it. The message shouldn't be displayed that prominent but it is useful for developing/debugging that's why I would not remove it completely... PR on the way ;-)

  14. viasys commented on Jan 14, 2014

    @viasys

    List of enabled apps:
    -Activity
    -Deleted files
    -Documents
    -First Run Wizard
    -Full Text Search
    -PDF Viewer
    -Share Files
    -Text Editor
    -Updater
    -Files move

  15. Djinnistorm commented on Jan 22, 2014

    @Djinnistorm
    Author

    Ok, got the admin info, so here's the enabled apps:
    -Calendar
    -Contacts
    -Deleted Files
    -Encryption
    -First Run Wizard
    -Full Text Search
    -PDF Viewer
    -Share Files
    -Text Editor
    -Updater
    -Versions
    -Video Viewer
    -FluXX Compensator (Y)

    Meanwhile, this is now happening to several other files, so the log is kind of unreadable.

  16. VicDeo commented on Feb 8, 2014

    @VicDeo
    Contributor

    @schiesbn @DeepDiver1975 PR is merged and pushed to stable6. Close?

  17. PVince81 commented on Mar 10, 2014

    @PVince81
    Contributor

    @Djinnistorm @mcgege @viasys can you confirm that this issue is gone in 6.0.2 ?

  18. viasys commented on Mar 11, 2014

    @viasys

    Yes, im not seeing this message anymore.

  19. locked as resolved and limited conversation to collaborators on Aug 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions