You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[1.7.0Beta 3] Sync multiple files with Antivirus fails #2284
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
Enable Antivirus app on oC
Create 3 150MB files and sync to oC server using 1.7.0Beta 3 client
Files are uploaded concurrently
Sync fails with errors (was never interrupted by user)
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.
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.
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
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.
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.
Activity
guruz commentedon Oct 8, 2014
(Could we please get the proper error string if it is timeout? it is not not actually cancelled by user...)
ser72 commentedon Oct 8, 2014
Tested originally with oC6. Test with 0C7.0.2Beta 2 also shows same issue. Incidentally, during that test, the following appeared:
Note time left and progress bar
scolebrook commentedon Oct 8, 2014
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.
guruz commentedon Oct 9, 2014
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.
danimo commentedon Oct 9, 2014
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
PVince81 commentedon Oct 9, 2014
From looking at the antivirus code, it runs on the
post_writehook 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.
enoch85 commentedon Oct 10, 2014
@ser72
Look at this issue: #2055
gig13 commentedon Nov 3, 2014
@danimo @PVince81 @guruz
Any updates? Do you need additional information?
butonic commentedon Nov 19, 2014
cc @owncloud/support-triagers
dragotin commentedon Nov 27, 2014
@PVince81 I consider you are looking into this/the antivirus app ;-) Pls. reassign accordingly.
PVince81 commentedon Nov 27, 2014
@VicDeo is the maintainer of the antivirus app, but I suspect this issue might be more generic so I'll look into it.
PVince81 commentedon Nov 27, 2014
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.
dragotin commentedon Nov 27, 2014
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.
guruz commentedon Nov 27, 2014
Linking owncloud/core#12097