{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/26155","repository_url":"https://api.github.com/repos/owncloud/core","labels_url":"https://api.github.com/repos/owncloud/core/issues/26155/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/26155/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/26155/events","html_url":"https://github.com/owncloud/core/issues/26155","id":177819336,"number":26155,"title":"[SMB External Storage] Some big files being corrupted when downloaded","user":{"login":"MrJackJonesIII","id":1665937,"avatar_url":"https://avatars.githubusercontent.com/u/1665937?v=3","gravatar_id":"","url":"https://api.github.com/users/MrJackJonesIII","html_url":"https://github.com/MrJackJonesIII","followers_url":"https://api.github.com/users/MrJackJonesIII/followers","following_url":"https://api.github.com/users/MrJackJonesIII/following{/other_user}","gists_url":"https://api.github.com/users/MrJackJonesIII/gists{/gist_id}","starred_url":"https://api.github.com/users/MrJackJonesIII/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrJackJonesIII/subscriptions","organizations_url":"https://api.github.com/users/MrJackJonesIII/orgs","repos_url":"https://api.github.com/users/MrJackJonesIII/repos","events_url":"https://api.github.com/users/MrJackJonesIII/events{/privacy}","received_events_url":"https://api.github.com/users/MrJackJonesIII/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/core/labels/app:files_external","name":"app:files_external","color":"02d7e1"},{"url":"https://api.github.com/repos/owncloud/core/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/owncloud/core/milestones/93","html_url":"https://github.com/owncloud/core/milestones/9.1.2","labels_url":"https://api.github.com/repos/owncloud/core/milestones/93/labels","id":1896102,"number":93,"title":"9.1.2","description":null,"creator":{"login":"PVince81","id":277525,"avatar_url":"https://avatars.githubusercontent.com/u/277525?v=3","gravatar_id":"","url":"https://api.github.com/users/PVince81","html_url":"https://github.com/PVince81","followers_url":"https://api.github.com/users/PVince81/followers","following_url":"https://api.github.com/users/PVince81/following{/other_user}","gists_url":"https://api.github.com/users/PVince81/gists{/gist_id}","starred_url":"https://api.github.com/users/PVince81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PVince81/subscriptions","organizations_url":"https://api.github.com/users/PVince81/orgs","repos_url":"https://api.github.com/users/PVince81/repos","events_url":"https://api.github.com/users/PVince81/events{/privacy}","received_events_url":"https://api.github.com/users/PVince81/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":12,"state":"open","created_at":"2016-07-21T09:53:56Z","updated_at":"2016-09-20T09:46:51Z","due_on":"2016-09-20T04:00:00Z","closed_at":null},"comments":11,"created_at":"2016-09-19T15:38:14Z","updated_at":"2016-09-20T15:20:13Z","closed_at":null,"body":"### Steps to reproduce\r\n1. Add an external smb share (Movies) to a windows machine in the oc webinterface\r\n2. It should be a share with lots of big files, mine is 3,5TB of movies, 1445 Folders with 11288 Files, structure is /Movies/A/A_Movie/A_Movie.mkv\r\n3. Let occ scan the files\r\n4. Go to oc webinterface, browse to /Movies/A/. The folder /A_Movie will show the correct size (say 5G) and that it's been scanned a few minutes ago. \r\n5. Enter the folder. The movie file will show a way t.oo small size (say 300M). \r\n6. Download the file. It will only be 300M. \r\n7. Start playing it. It will start running but just a portion of actual length.\r\n8. In the web interface navigate back to the level with the movie folders /Movies/A/. now the folder /A_Movie will show the smaller size (300M) and that it's been scanned a few month ago. \r\n\r\n### Expected behaviour\r\nThe files should be downloaded without being corrupted.\r\n\r\n### Actual behaviour\r\nsee above\r\n\r\nImportant notice:\r\nYou'll see some BadMethodCallException errors in the logs. I got rid of these by applying the patch from https://github.com/owncloud/core/issues/25506\r\n\r\nlibsmbclient-php is installed\r\n\r\n\r\n\r\n### Server configuration\r\n**Operating system**: Raspian Jessy\r\n\r\n**Web server:** Apache\r\n\r\n**Database:** MySQL\r\n\r\n**PHP version:** 7\r\n\r\n**ownCloud version:** 9.1\r\n\r\n**Updated from an older ownCloud or fresh install:** updated\r\n\r\n**Where did you install ownCloud from:** repo\r\n\r\n**Signing status (ownCloud 9.0 and above):** all good\r\n\r\n\r\n**List of activated apps:**\r\n\r\nEnabled:\r\n  - activity: 2.3.2\r\n  - calendar: 1.3.3\r\n  - comments: 0.3.0\r\n  - contacts: 1.3.1.0\r\n  - dav: 0.2.5\r\n  - federatedfilesharing: 0.3.0\r\n  - federation: 0.1.0\r\n  - files: 1.5.1\r\n  - files_external: 0.6.0\r\n  - files_pdfviewer: 0.8.1\r\n  - files_sharing: 0.10.0\r\n  - files_texteditor: 2.1\r\n  - files_trashbin: 0.9.0\r\n  - files_versions: 1.3.0\r\n  - firstrunwizard: 1.1\r\n  - gallery: 15.0.0\r\n  - notifications: 0.3.0\r\n  - provisioning_api: 0.5.0\r\n  - systemtags: 0.3.0\r\n  - tasks: 0.9.3\r\n  - templateeditor: 0.1\r\n  - updatenotification: 0.2.1\r\nDisabled:\r\n  - encryption\r\n  - external\r\n  - files_antivirus\r\n  - files_videoplayer\r\n  - user_external\r\n  - user_ldap\r\n\r\n**The content of config/config.php:**\r\n\r\n{\r\n    \"system\": {\r\n        \"updatechecker\": false,\r\n        \"instanceid\": \"ocfodyqednuy\",\r\n        \"passwordsalt\": \"***REMOVED SENSITIVE VALUE***\",\r\n        \"secret\": \"***REMOVED SENSITIVE VALUE***\",\r\n        \"trusted_domains\": [\r\n            \"192.168.77.13\",\r\n            \"owncloud.mydomain.de\",\r\n            \"cloud.mydomain.de\",\r\n            \"owncloud\",\r\n            \"mmrp01\"\r\n        ],\r\n        \"datadirectory\": \"\\/data\\/owncloud\",\r\n        \"overwrite.cli.url\": \"http:\\/\\/owncloud.mydomain\\/owncloud\",\r\n        \"dbtype\": \"mysql\",\r\n        \"version\": \"9.1.0.15\",\r\n        \"dbname\": \"owncloud\",\r\n        \"dbhost\": \"localhost\",\r\n        \"dbtableprefix\": \"oc_\",\r\n        \"dbuser\": \"***REMOVED SENSITIVE VALUE***\",\r\n        \"dbpassword\": \"***REMOVED SENSITIVE VALUE***\",\r\n        \"logtimezone\": \"UTC\",\r\n        \"installed\": true,\r\n        \"memcache.local\": \"\\\\OC\\\\Memcache\\\\APCu\"\r\n    }\r\n}\r\n\r\n```\r\n\r\n**Are you using external storage, if yes which one:** smb\r\n\r\n**Are you using encryption:** no\r\n\r\n**Are you using an external user-backend, if yes which one:** No\r\n\r\n### Client configuration\r\nTested with Firefox and Chrome\r\n\r\n**Operating system:** Windows 8 and 10\r\n\r\n### Logs\r\n#### Web server error log\r\n[Mon Sep 19 16:15:44.548251 2016] [mpm_prefork:notice] [pid 7025] AH00163: Apache/2.4.23 (Raspbian) OpenSSL/1.0.2h configured -- resuming normal operations\r\n[Mon Sep 19 16:15:44.548485 2016] [core:notice] [pid 7025] AH00094: Command line: '/usr/sbin/apache2'\r\n[Mon Sep 19 16:34:02.978567 2016] [:error] [pid 7036] [client 188.199.177.1:54217] PHP Warning:  smbclient_state_errno(): supplied resource is not a valid smbclient state resource in /var/www/owncloud/apps/files$\r\n[Mon Sep 19 16:34:02.979364 2016] [:error] [pid 7036] [client 188.199.177.1:54217] PHP Fatal error:  Uncaught Error: Access to undeclared static property: OC\\\\Files\\\\Filesystem::$normalizedPathCache in /var/www/$\r\n\r\n\r\n#### ownCloud log (data/owncloud.log)\r\n{\"reqId\":\"eZE47O80FMbnq7np6InQ\",\"remoteAddr\":\"\",\"app\":\"files\",\"message\":\"Exception: {\\\"Exception\\\":\\\"BadMethodCallException\\\",\\\"Message\\\":\\\"Not in batch\\\",\\\"Code\\\":0,\\\"Trace\\\":\\\"#0 \\\\\\/var\\\\\\/www\\\\\\/owncloud\\\\\\/lib\\\\\\/private\\\\\\/Files\\\\\\/Utils\\\\\\/Scanner.php(143): OC\\\\\\\\Files\\\\\\\\Cache\\\\\\\\Propagator->commitBatch()\\\\n#1 \\\\\\/var\\\\\\/www\\\\\\/owncloud\\\\\\/apps\\\\\\/files\\\\\\/lib\\\\\\/BackgroundJob\\\\\\/ScanFiles.php(87): OC\\\\\\\\Files\\\\\\\\Utils\\\\\\\\Scanner->backgroundScan('')\\\\n#2 \\\\\\/var\\\\\\/www\\\\\\/owncloud\\\\\\/apps\\\\\\/files\\\\\\/lib\\\\\\/BackgroundJob\\\\\\/ScanFiles.php(111): OCA\\\\\\\\Files\\\\\\\\BackgroundJob\\\\\\\\ScanFiles->runScanner(Object(OC\\\\\\\\User\\\\\\\\User))\\\\n#3 \\\\\\/var\\\\\\/www\\\\\\/owncloud\\\\\\/lib\\\\\\/private\\\\\\/BackgroundJob\\\\\\/Job.php(52): OCA\\\\\\\\Files\\\\\\\\BackgroundJob\\\\\\\\ScanFiles->run(NULL)\\\\n#4 \\\\\\/var\\\\\\/www\\\\\\/owncloud\\\\\\/lib\\\\\\/private\\\\\\/BackgroundJob\\\\\\/TimedJob.php(53): OC\\\\\\\\BackgroundJob\\\\\\\\Job->execute(Object(OC\\\\\\\\BackgroundJob\\\\\\\\JobList), Object(OC\\\\\\\\Log))\\\\n#5 \\\\\\/var\\\\\\/www\\\\\\/owncloud\\\\\\/cron.php(122): OC\\\\\\\\BackgroundJob\\\\\\\\TimedJob->execute(Object(OC\\\\\\\\BackgroundJob\\\\\\\\JobList), Object(OC\\\\\\\\Log))\\\\n#6 {main}\\\",\\\"File\\\":\\\"\\\\\\/var\\\\\\/www\\\\\\/owncloud\\\\\\/lib\\\\\\/private\\\\\\/Files\\\\\\/Cache\\\\\\/Propagator.php\\\",\\\"Line\\\":145}\",\"level\":3,\"time\":\"2016-09-19T14:15:02+00:00\",\"method\":\"--\",\"url\":\"--\",\"user\":\"--\"}\r\n{\"reqId\":\"eZE47O80FMbnq7np6InQ\",\"remoteAddr\":\"\",\"app\":\"files\",\"message\":\"Exception: {\\\"Exception\\\":\\\"BadMethodCallException\\\",\\\"Message\\\":\\\"Not in batch\\\",\\\"Code\\\":0,\\\"Trace\\\":\\\"#0 \\\\\\/var\\\\\\/www\\\\\\/owncloud\\\\\\/lib\\\\\\/private\\\\\\/Files\\\\\\/Utils\\\\\\/Scanner.php(143): OC\\\\\\\\Files\\\\\\\\Cache\\\\\\\\Propagator->commitBatch()\\\\n#1 \\\\\\/var\\\\\\/www\\\\\\/owncloud\\\\\\/apps\\\\\\/files\\\\\\/lib\\\\\\/BackgroundJob\\\\\\/ScanFiles.php(87): OC\\\\\\\\Files\\\\\\\\Utils\\\\\\\\Scanner->backgroundScan('')\\\\n#2 \\\\\\/var\\\\\\/www\\\\\\/owncloud\\\\\\/apps\\\\\\/files\\\\\\/lib\\\\\\/BackgroundJob\\\\\\/ScanFiles.php(111): OCA\\\\\\\\Files\\\\\\\\BackgroundJob\\\\\\\\ScanFiles->runScanner(Object(OC\\\\\\\\User\\\\\\\\User))\\\\n#3 \\\\\\/var\\\\\\/www\\\\\\/owncloud\\\\\\/lib\\\\\\/private\\\\\\/BackgroundJob\\\\\\/Job.php(52): OCA\\\\\\\\Files\\\\\\\\BackgroundJob\\\\\\\\ScanFiles->run(NULL)\\\\n#4 \\\\\\/var\\\\\\/www\\\\\\/owncloud\\\\\\/lib\\\\\\/private\\\\\\/BackgroundJob\\\\\\/TimedJob.php(53): OC\\\\\\\\BackgroundJob\\\\\\\\Job->execute(Object(OC\\\\\\\\BackgroundJob\\\\\\\\JobList), Object(OC\\\\\\\\Log))\\\\n#5 \\\\\\/var\\\\\\/www\\\\\\/owncloud\\\\\\/cron.php(122): OC\\\\\\\\BackgroundJob\\\\\\\\TimedJob->execute(Object(OC\\\\\\\\BackgroundJob\\\\\\\\JobList), Object(OC\\\\\\\\Log))\\\\n#6 {main}\\\",\\\"File\\\":\\\"\\\\\\/var\\\\\\/www\\\\\\/owncloud\\\\\\/lib\\\\\\/private\\\\\\/Files\\\\\\/Cache\\\\\\/Propagator.php\\\",\\\"Line\\\":145}\",\"level\":3,\"time\":\"2016-09-19T14:15:03+00:00\",\"method\":\"--\",\"url\":\"--\",\"user\":\"--\"}\r\n{\"reqId\":\"IX1ZGjcjwviefO1fVEfv\",\"remoteAddr\":\"188.199.177.1\",\"app\":\"PHP\",\"message\":\"Uncaught Error: Access to undeclared static property: OC\\\\Files\\\\Filesystem::$normalizedPathCache in \\/var\\/www\\/owncloud\\/lib\\/private\\/Files\\/Filesystem.php:772\\nStack trace:\\n#0 \\/var\\/www\\/owncloud\\/lib\\/private\\/Files\\/View.php(2032): OC\\\\Files\\\\Filesystem::normalizePath('\\/michael\\/files\\/...')\\n#1 \\/var\\/www\\/owncloud\\/lib\\/private\\/Files\\/View.php(1150): OC\\\\Files\\\\View->unlockFile('\\/Filme\\/A\\/Americ...', 1)\\n#2 [internal function]: OC\\\\Files\\\\View->OC\\\\Files\\\\{closure}()\\n#3 \\/var\\/www\\/owncloud\\/apps\\/files_external\\/3rdparty\\/icewind\\/streams\\/src\\/CallbackWrapper.php(109): call_user_func(Object(Closure))\\n#4 [internal function]: Icewind\\\\Streams\\\\CallbackWrapper->stream_close()\\n#5 {main}\\n  thrown at \\/var\\/www\\/owncloud\\/lib\\/private\\/Files\\/Filesystem.php#772\",\"level\":3,\"time\":\"2016-09-19T14:35:54+00:00\",\"method\":\"PROPFIND\",\"url\":\"\\/remote.php\\/webdav\\/\",\"user\":\"michael\"}\r\n{\"reqId\":\"wwDw28jAf4wNWnYAT6Bn\",\"remoteAddr\":\"881.991.771.1\",\"app\":\"core\",\"message\":\"Trusted domain error. \\\"881.991.771.1\\\" tried to access using \\\"79.200.198.76\\\" as host.\",\"level\":2,\"time\":\"2016-09-19T15:14:42+00:00\",\"method\":\"GET\",\"url\":\"\\/\",\"user\":\"--\"}\r\n\r\nSome more info:\r\n- Windows server where the share with the files reside is WHS 2011 with a DriveBender drive pool.\r\n- OC is running on Raspberry Pi\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/248334350","html_url":"https://github.com/owncloud/core/issues/26155#issuecomment-248334350","issue_url":"https://api.github.com/repos/owncloud/core/issues/26155","id":248334350,"user":{"login":"jvillafanez","id":1477829,"avatar_url":"https://avatars.githubusercontent.com/u/1477829?v=3","gravatar_id":"","url":"https://api.github.com/users/jvillafanez","html_url":"https://github.com/jvillafanez","followers_url":"https://api.github.com/users/jvillafanez/followers","following_url":"https://api.github.com/users/jvillafanez/following{/other_user}","gists_url":"https://api.github.com/users/jvillafanez/gists{/gist_id}","starred_url":"https://api.github.com/users/jvillafanez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvillafanez/subscriptions","organizations_url":"https://api.github.com/users/jvillafanez/orgs","repos_url":"https://api.github.com/users/jvillafanez/repos","events_url":"https://api.github.com/users/jvillafanez/events{/privacy}","received_events_url":"https://api.github.com/users/jvillafanez/received_events","type":"User","site_admin":false},"created_at":"2016-09-20T15:20:13Z","updated_at":"2016-09-20T15:20:13Z","body":"More information to understand the trace a bit: http://stackoverflow.com/questions/13049828/fin-vs-rst-in-tcp-connections\r\n\r\nSo 10.0.2.15 is the first to close the connection and I guess 79.200.198.76 just follows. So, who is who? I guess 10.0.2.15 is the windows machine. If this is the case, does windows close the connection before finishing sending all the file?\r\n\r\nYou can also filter by protocol to only show SMB or SMB2 traffic. Maybe there is more meaningful information there."}}
{"actor":{"display_login":"jvillafanez"}}