Owncloud continues reading file after I cancel download


#1

Hello,

Operating system and version (eg, Ubuntu 17.04): Debian 9.5.0
Apache or nginx version (eg, Apache 2.4.25): 2.4.25
PHP version (eg, 7.1): 7.0.30

Seems like I have a bug in owncloud, I should say, I discovered it by trying to download a big file (20GB) from my local storage, and saw that once the download was cancelled, nextcloud continued reading it, just discovered it with a simple iotop:

This is happening locally but if I mount a NFS it also hits my RX ethernet bandwidth as it continues reading the file. Could it be any php config I am missing?

Does anyone have any idea on why is this happenning on a fresh installation?

Kind regards


#2

Hi,

It could be that your web server is not configured yet and you run in to a timout.

here is the documentation to this topic.

https://doc.owncloud.com/server/10.0/admin_manual/configuration/files/big_file_upload_configuration.html?highlight=big%20files#configuring-your-web-server


#3

How can a timeout solve this? I am not telling that the download is being cancelled itself.
Once I cancel the download from the web browser the server continues reading the file until it finishes reading it. example: If I download a 30GB file and stop it at 1GB of being downloaded the server will continue reading the 29GB of the file until it finishes


#4

Okay, this is weird. can you fill out the template to help us understand the problem better?

Steps to reproduce

Expected behaviour

Tell us what should happen

Actual behaviour

Tell us what happens instead

Server configuration

Operating system:

Web server:

Database:

PHP version:

ownCloud version: (see ownCloud admin page)

Updated from an older ownCloud or fresh install:

Where did you install ownCloud from:

Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.

The content of config/config.php:

Log in to the web-UI with an administrator account and click on
'admin' -> 'Generate Config Report' -> 'Download ownCloud config report'
This report includes the config.php settings, the list of activated apps
and other details in a well sanitized form.

or 

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your ownCloud installation folder

*ATTENTION:* Do not post your config.php file in public as is. Please use one of the above
methods whenever possible. Both, the generated reports from the web-ui and from occ config:list
consistently remove sensitive data. You still may want to review the report before sending.
If done manually then it is critical for your own privacy to dilligently
remove *all* host names, passwords, usernames, salts and other credentials before posting.
You should assume that attackers find such information and will use them against your systems.

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder.

Are you using external storage, if yes which one: local/smb/sftp/…

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/…

LDAP configuration (delete this part if not used)

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your ownCloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';


Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

Client configuration

Browser:

Operating system:

Logs

Web server error log

Insert your webserver log here

ownCloud log (data/owncloud.log)

Insert your ownCloud log here

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...

#5

Steps to reproduce

  1. Install fresh owncloud
    2 Upload a big file or map any unit with data inside the data file user folder
  2. Try download
  3. Cancell it at any point

Expected behaviour
When you cancel a download at any point, server should stop reading the file, first of all because if you cancel the download of a 100G file for example, only when 1GB is downloaded, there is no need for the server to read the 99G left, and if you have a NFS storage as a external device or FTP or whatever, apart from giving disk io loads you are giving the server also network interface load, which makes no sense

Actual behaviour
Once I cancelled a download at any point the server continues reading the files until it finishes

Server configuration
Operating system: Debian 9.5.0

Web server: Apache 2.4.25

Database: mariadb

PHP version: 7.0.30

ownCloud version: ownCloud 10.0.10 (stable)

Updated from an older ownCloud or fresh install: fresh install

Where did you install ownCloud from: official webpage

Signing status (ownCloud 9.0 and above): No errors have been found.

The content of config/config.php:

<?php
$CONFIG = array (
  'instanceid' => 'ocip5tsyo676',
  'passwordsalt' => 'I+Ihb1cQ4Bx2u8G0laVPec+SdMpgu5',
  'secret' => '+8SiVIJNubCvJp3HwM42iYg0MbRttXw9TswCTlTbBT8yjT1i',
  'trusted_domains' =>
  array (
    0 => '192.168.1.203',
  ),
  'datadirectory' => '/var/www/owncloud/data',
  'overwrite.cli.url' => 'http://192.168.1.203',
  'dbtype' => 'mysql',
  'version' => '10.0.10.4',
  'dbname' => 'owncloud',
  'dbhost' => '127.0.0.1',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'owncloud',
  'dbpassword' => '****',
  'logtimezone' => 'UTC',
  'installed' => true,
);

List of activated apps:

Enabled:
  - comments: 0.3.0
  - configreport: 0.1.1
  - dav: 0.4.0
  - federatedfilesharing: 0.3.1
  - federation: 0.1.0
  - files: 1.5.1
  - files_external: 0.7.1
  - files_sharing: 0.11.0
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - market: 0.2.5
  - notifications: 0.3.5
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - updatenotification: 0.2.1
Disabled:
  - encryption
  - external
  - user_external

Are you using external storage, if yes which one: no, but happens also with NFS and FTP, as I tested, but I will think that is happening with all network protocols

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration
Browser: Internet explorer, firefox and chrome

Operating system: Windows 10

Logs
Web server error log

[Wed Sep 26 00:48:58.295531 2018] [mpm_prefork:notice] [pid 15473] AH00163: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Wed Sep 26 00:48:58.295577 2018] [core:notice] [pid 15473] AH00094: Command line: '/usr/sbin/apache2'
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@$
[Wed Sep 26 19:33:35.147763 2018] [core:notice] [pid 499] AH00094: Command line: '/usr/sbin/apache2'
[Wed Sep 26 18:18:16.525702 2018] [mpm_prefork:notice] [pid 499] AH00169: caught SIGTERM, shutting down
[Wed Sep 26 18:18:16.639325 2018] [mpm_prefork:notice] [pid 1118] AH00163: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Wed Sep 26 18:18:16.639375 2018] [core:notice] [pid 1118] AH00094: Command line: '/usr/sbin/apache2'

ownCloud log (data/owncloud.log)
$
{“reqId”:“br1pOK0xotM3ImhuRIRx”,“level”:2,“time”:“2018-09-26T19:02:37+00:00”,“remoteAddr”:“118.126.101.167”,“user”:"–",“app”:“core”,“method”:“GET”,“url”:"/phpAdmin/index.php",“message”:“Trusted d$
{“reqId”:“GkyhGqTgyO2DboryZFfU”,“level”:2,“time”:“2018-09-26T19:02:38+00:00”,“remoteAddr”:“118.126.101.167”,“user”:”–",“app”:“core”,“method”:“GET”,“url”:"/phpmyadmin0/index.php",“message”:“Truste$
{“reqId”:“EEHC47rrL1IUCGIqSlhX”,“level”:2,“time”:“2018-09-26T19:02:39+00:00”,“remoteAddr”:“118.126.101.167”,“user”:”–",“app”:“core”,“method”:“GET”,“url”:"/phpmyadmin1/index.php",“message”:“Truste$
{“reqId”:“JdpKQeDNjxiUm9K5S4w8”,“level”:2,“time”:“2018-09-26T19:02:39+00:00”,“remoteAddr”:“118.126.101.167”,“user”:”–",“app”:“core”,“method”:“GET”,“url”:"/phpmyadmin2/index.php",“message”:“Truste$
{“reqId”:“TluzoLV7X0py12tA03oF”,“level”:2,“time”:“2018-09-26T19:02:40+00:00”,“remoteAddr”:“118.126.101.167”,“user”:”–",“app”:“core”,“method”:“GET”,“url”:"/myadmin/index.php",“message”:“Trusted do$
{“reqId”:“yl9XlunCSe7M3s601jRS”,“level”:2,“time”:“2018-09-26T19:02:40+00:00”,“remoteAddr”:“118.126.101.167”,“user”:”–",“app”:“core”,“method”:“GET”,“url”:"/myadmin2/index.php",“message”:“Trusted d$
{“reqId”:“Myy6BxOHM2W6r5GKfCl3”,“level”:2,“time”:“2018-09-26T19:02:44+00:00”,“remoteAddr”:“118.126.101.167”,“user”:”–",“app”:“core”,“method”:“GET”,“url”:"/phpMyadmin_bak/index.php",“message”:“Tru$
{“reqId”:“JN5kJsJEAGx8nfpVjB5m”,“level”:2,“time”:“2018-09-26T19:02:45+00:00”,“remoteAddr”:“118.126.101.167”,“user”:”–",“app”:“core”,“method”:“GET”,“url”:"/www/phpMyAdmin/index.php",“message”:“Tr$
{“reqId”:“AfMf7ZNznrt6lOONXWuE”,“level”:2,“time”:“2018-09-26T19:02:46+00:00”,“remoteAddr”:“118.126.101.167”,“user”:”–",“app”:“core”,“method”:“GET”,“url”:"/tools/phpMyAdmin/index.php",“message”:"$
{“reqId”:“HfZCpGsmUxKmHHPwpObZ”,“level”:2,“time”:“2018-09-26T19:02:48+00:00”,“remoteAddr”:“118.126.101.167”,“user”:"–",“app”:“core”,“method”:“GET”,“url”:"/phpmyadmin-old/index.php",“message”:“Tru$
{“reqId”:“JMUXJLVtNiU1ccNNugwr”,“level”:2,“time”:“2018-09-26T19:02:49+00:00”,“remoteAddr”:“118.126.101.167”,“user”:”–",“app”:“core”,“method”:“GET”,“url”:"/phpMyAdminold/index.php",“message”:“Trus$
{“reqId”:“AIqZaf7fwKV1lVoGUJen”,“level”:2,“time”:“2018-09-26T19:02:52+00:00”,“remoteAddr”:“118.126.101.167”,“user”:”–",“app”:“core”,“method”:“GET”,“url”:"/pma-old/index.php",“message”:“Trusted do$
{“reqId”:“pKg0fqL1cHbWXvm6rq3W”,“level”:2,“time”:“2018-09-26T19:02:53+00:00”,“remoteAddr”:“118.126.101.167”,“user”:”–",“app”:“core”,“method”:“GET”,“url”:"/claroline/phpMyAdmin/index.php",“messag$
{“reqId”:“mxOpazntyBiOhNETtZKD”,“level”:2,“time”:“2018-09-26T19:02:53+00:00”,“remoteAddr”:“118.126.101.167”,“user”:”–",“app”:“core”,“method”:“GET”,“url”:"/typo3/phpmyadmin/index.php",“message”:"$
{“reqId”:“eoBU2Y5n03TE6HYF0u36”,“level”:2,“time”:“2018-09-26T19:02:54+00:00”,“remoteAddr”:“118.126.101.167”,“user”:"–",“app”:“core”,“method”:“GET”,“url”:"/phpma/index.php",“message”:“Trusted doma$
{“reqId”:“ZUjklUm8wevQwo5hau8u”,“level”:2,“time”:“2018-09-26T19:02:56+00:00”,“remoteAddr”:“118.126.101.167”,“user”:”–",“app”:“core”,“method”:“GET”,“url”:"/phpMyAdmin/phpMyAdmin/index.php",“messa$
{“reqId”:“2vNqjyLZuqlTow8yNWMA”,“level”:2,“time”:“2018-09-26T19:02:57+00:00”,“remoteAddr”:“118.126.101.167”,“user”:”–",“app”:“core”,“method”:“GET”,“url”:"/v/index.php",“message”:“Trusted domain e$
{“reqId”:“EHRFh9ny8UHzaElHJPVO”,“level”:2,“time”:“2018-09-26T19:02:57+00:00”,“remoteAddr”:“118.126.101.167”,“user”:”–",“app”:“core”,“method”:“GET”,“url”:"/phpmyadm1n/index.php",“message”:“Trusted$
{“reqId”:“42rVPkpA24ZlKUEXAdwD”,“level”:2,“time”:“2018-09-26T19:49:31+00:00”,“remoteAddr”:“177.84.40.208”,“user”:”–",“app”:“core”,“method”:“GET”,“url”:"/",“message”:“Trusted domain error. “177.84$
{“reqId”:“T8FOitqDw5NeYq3saKYo”,“level”:2,“time”:“2018-09-26T20:18:51+00:00”,“remoteAddr”:“95.180.176.226”,“user”:”–”,“app”:“core”,“method”:“GET”,“url”:"/",“message”:“Trusted domain error. “95.18$
{“reqId”:“jcgUXssKpxgJciEN1ueh”,“level”:2,“time”:“2018-09-26T20:59:03+00:00”,“remoteAddr”:“81.163.122.1”,“user”:”–”,“app”:“core”,“method”:“GET”,“url”:"/",“message”:"Trusted domain error. "81.163.$

Browser log

Any ideas? Hope it helps

Kind regards


#6

Hello,

Any help?

Kind regards,


#7

Hello,

Any help?

Kind regards,


#8

Hey,

i’m not sure if there is that much help other users can offer here :confused:

From my experience such reports are better placed in a bug tracker of a software rather then in user based support forums.


#9

Do you know where is that for owncloud?


#10

Hey,

there is a help section on the main owncloud.org pointing to various resources where to get help with ownCloud. One of those are mentioning “bug” which is redirecting to a github.com bug tracker.

The one you’re looking for is probably https://github.com/owncloud/core. I did a short search https://github.com/owncloud/core/search?q=cancel+download&type=Issues there and it seems some one has already picked up your issue there: