Skip to content

[1.7.0Beta 3] Sync multiple files with Antivirus fails #2284

Closed

Description

@ser72

Expected Behavior
Files to sync properly

Actual Behavior
Error on client

Issue
I made duplicates of a 150MB iso so that I had three copies of the same thing with different names. I moved them to my ownCloud folder and watched the client and web server. It uploaded the chunks for all three simultaneously as it should and when the first file finished, clam started on the server and the client stopped uploading the remaining chunks on the other two files. During this time the menu bar icon (on a mac) and the icon in the settings window showed the three dots under the cloud. After 30 seconds or so the client said gave an error message about a timeout on status.php (probably session locking waiting for clam to return). After clam finished its scan successfully my windows box started downloading the file and after a short delay the mac started uploading the remaining chunks of the other 2 files. The same process repeated when the second file completed but without the timeout error message this time.

Steps

  1. Enable Antivirus app on oC
  2. Create 3 150MB files and sync to oC server using 1.7.0Beta 3 client
  3. Files are uploaded concurrently
  4. Sync fails with errors (was never interrupted by user)

client-error

activity

Logs
s3 support/github-issues/mirall/2284

Activity

  1. guruz commented on Oct 8, 2014

    @guruz
    Contributor

    (Could we please get the proper error string if it is timeout? it is not not actually cancelled by user...)

  2. ser72 commented on Oct 8, 2014

    @ser72
    Author

    Tested originally with oC6. Test with 0C7.0.2Beta 2 also shows same issue. Incidentally, during that test, the following appeared:

    capture

    Note time left and progress bar

  3. scolebrook commented on Oct 8, 2014

    @scolebrook
    Contributor

    In my testing with 3 files I found that if the first file completes and the chunks reassembled before the other's complete uploading then they pause in the client while clam runs and resume when clam completes on the first file. The behavior repeats when the second file completes uploading.

    However if the files upload at roughly the same pace, then the 2nd and 3rd files will complete uploading while the first is reassembled. So long as they complete their upload before the file is handed to clam for scanning then no pause is observed in the client. However there is a timeout that's seen in the client. Once clam is running the three dots are visible under the cloud icon and a short time later a time out message is shown in the client.

    Once virus scanning is complete for all files the client returns to normal. Many users wouldn't even notice the issue because the system recovers and all uploads complete successfully.

    screen shot 2014-10-08 at 12 04 49
    screen shot 2014-10-08 at 12 07 26

  4. guruz commented on Oct 9, 2014

    @guruz
    Contributor

    As with #2260 the "Poll URL" feature could help with this. The server could (somehow, I'm no PHP guru) asynchronously finish up the file and the client could poll for the finished state.

  5. danimo commented on Oct 9, 2014

    @danimo
    Contributor

    We need the poll URL feature as the other alternative is modifying timeouts, and (as we have seen) this causes other problems. For the poll URL OTOH, we confidently know that it would solve the problem. /cc @craigpg

  6. PVince81 commented on Oct 9, 2014

    @PVince81

    From looking at the antivirus code, it runs on the post_write hook which seems to be explicitly triggered by the code that assembles the chunks into a part file, after the part file was assembled.
    Maybe something goes wrong at this stage or the antivirus app isn't expecting a part file.

  7. enoch85 commented on Oct 10, 2014

    @enoch85

    @ser72

    Tested originally with oC6. Test with 0C7.0.2Beta 2 also shows same issue. Incidentally, during that test, the following appeared:

    https://cloud.githubusercontent.com/assets/5174383/4561455/3a23a296-4efd-11e4-8516-5e26a7e1311a.PNG

    Note time left and progress bar

    Look at this issue: #2055

  8. gig13 commented on Nov 3, 2014

    @gig13

    @danimo @PVince81 @guruz
    Any updates? Do you need additional information?

  9. butonic commented on Nov 19, 2014

    @butonic

    cc @owncloud/support-triagers

  10. dragotin commented on Nov 27, 2014

    @dragotin
    Contributor

    @PVince81 I consider you are looking into this/the antivirus app ;-) Pls. reassign accordingly.

  11. PVince81 commented on Nov 27, 2014

    @PVince81

    @VicDeo is the maintainer of the antivirus app, but I suspect this issue might be more generic so I'll look into it.

  12. PVince81 commented on Nov 27, 2014

    @PVince81

    I tried with big files and also with lots of small files on 7.0.3 + sync client 1.7.0 and it all worked fine. Did not get any errors.

  13. dragotin commented on Nov 27, 2014

    @dragotin
    Contributor

    1.7.0 has a more relaxed handling of timeouts, actually it resets the timespan again if anything was heard from the server from any request. That might result in that effect.

    Closing hence.

  14. guruz commented on Nov 27, 2014

    @guruz
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions