Repository navigation
Description
Steps to reproduce
- We created folders and shared them
- We uploaded about 400 GB of data and indexed all (it shows sizes, all is calculated)
- We try to share a new folder, the share option hangs/freezes the website
- Also existing folders and deeper folders/files are not showing anything when "shared" is clicked
Expected behaviour
Normal share options shown
Actual behaviour
Share does not expand and browser hangs, nothing is clickable anymore untill refresh or long wait time.
Server configuration
Operating system:
Debian 7 64 bit
Web server:
Apache2
Database:
MySQL
PHP version:
5.4.4
ownCloud version: (see ownCloud admin page)
7.0.1
Updated from an older ownCloud or fresh install:
Fresh install
List of activated apps:
Only file share, disabled all others
The content of config/config.php:
<?php
$CONFIG = array (
'instanceid' => 'abcd',
'passwordsalt' => '*** Removed for security reasons',
'trusted_domains' =>
array (
0 => 'cloud.domain.nl',
1 => 'cloud.domain.nl:5000', // (https 443 was allready used)
),
'datadirectory' => '/data/owncloud',
'dbtype' => 'mysql',
'version' => '7.0.1.1',
'dbname' => 'owncloud',
'dbhost' => 'localhost',
'dbtableprefix' => 'oc_',
'dbuser' => 'abcd',
'dbpassword' => '*** Removed for security reasons',
'installed' => true,
'forcessl' => true,
'mail_smtpmode' => 'smtp',
'mail_from_address' => 'cloud',
'mail_domain' => 'domain.nl',
'mail_smtphost' => 'localhost',
);Are you using external storage, if yes which one: local/smb/sftp/...
no
Are you using encryption: yes/no
no
Client configuration
Browser:
Any (firefox, ie, chrome, safari)
Operating system:
Any (iOS, Windows, Linux)
Logs
Web server error log
Allowed memory size of 2147483648 bytes exhausted (tried to allocate 72 bytes) at /var/www/owncloud/apps/files_sharing/lib/share/folder.php#41
ownCloud log (data/owncloud.log)
{"app":"PHP","message":"Undefined index: mimetype at \/var\/www\/owncloud\/lib\/private\/files\/fileinfo.php#97","level":3,"time":"2014-08-22T07:59:30+00:00"}
{"app":"PHP","message":"Undefined index: fileid at \/var\/www\/owncloud\/lib\/private\/files\/fileinfo.php#90","level":3,"time":"2014-08-22T07:59:30+00:00"}
{"app":"PHP","message":"Undefined index: mimetype at \/var\/www\/owncloud\/lib\/private\/files\/fileinfo.php#97","level":3,"time":"2014-08-22T07:59:50+00:00"}
{"app":"PHP","message":"Undefined index: fileid at \/var\/www\/owncloud\/lib\/private\/files\/fileinfo.php#90","level":3,"time":"2014-08-22T07:59:50+00:00"}
{"app":"PHP","message":"Allowed memory size of 2147483648 bytes exhausted (tried to allocate 72 bytes) at \/var\/www\/owncloud\/apps\/files_sharing\/lib\/share\/folder.php#41","level":3,"time":"2014-08-22T08:01:07+00:00"}
{"app":"PHP","message":"Allowed memory size of 2147483648 bytes exhausted (tried to allocate 72 bytes) at \/var\/www\/owncloud\/apps\/files_sharing\/lib\/share\/folder.php#41","level":3,"time":"2014-08-22T08:28:59+00:00"}
{"app":"PHP","message":"Allowed memory size of 2147483648 bytes exhausted (tried to allocate 72 bytes) at \/var\/www\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Statement.php#216","level":3,"time":"2014-08-22T08:30:41+00:00"}
{"app":"PHP","message":"Undefined index: ocsid at \/var\/www\/owncloud\/lib\/private\/app.php#835","level":3,"time":"2014-08-22T08:32:59+00:00"}
{"app":"PHP","message":"Undefined index: ocsid at \/var\/www\/owncloud\/lib\/private\/app.php#835","level":3,"time":"2014-08-22T08:33:10+00:00"}
Browser log
NetworkError: 500 Internal Server Error - https://cloud.domain.nl:5000/index.php/core/ajax/share.php?fetch=getItem&itemType=folder&itemSource=22649&checkReshare=true&checkShares=true
TypeError: data.reshare is undefined
...(data !== false && data.reshare !== false && data.reshare.uid_owner !== undefine...
Extra info
We already tried to re-index manually, but it gives timeout. We changed the php_timeout and now it did it full run but no result.
We also rebooted and tried with normal HTTP instead of HTTPS.
Edit by PVince81: added triple backquotes to logs for better readability
Activity
karlitschek commentedon Aug 22, 2014
@schiesbn
PVince81 commentedon Aug 22, 2014
If the browser hangs it's probably because of the synchronous ajax call inside of
showDropDown(), and maybe that call is taking forever. (and we should definitely get rid of synchronous ajax calls in the future!)Since you got an "out of memory error" it is likely that the "share.php" call in question is taking forever, or has an infinite loop causing it to eat up all available memory.
Now the tricky part is finding out where that error occurs and how to reproduce it.
Can you enable XDebug (to get stack traces) and set loglevel to 0 in config.php, then reproduce the error ? This should hopefully output more information in the log.
PVince81 commentedon Aug 22, 2014
Another question: did you upload the files through the web UI or sync client ? Are you accessing files inside of the "data" directory directly ? Did you manually create symlinks in the data directory ? (which are not supported)
Just trying to rule out a few ideas that are likely to cause infinite loops.
check-ict commentedon Aug 26, 2014
Please let me know how to enable XDebug. I have added it to php.ini and installed it, but I don't know how to get those stack traces. The logging to 0 doesn't give extra info.
When we started we created the first folders and shared them.
We have moved the data with rsync in those folders, changed owner (www-data:www-data) and indexed all. This worked before with about 200 GB data.
The data location is not a symlink, it's a config setting. There are no manual symlinks.
PVince81 commentedon Aug 26, 2014
If you enabled XDebug in php.ini (
xdebug.remote_enable = 1) you should see stack traces in the web server error log and possible also in owncloud.log.check-ict commentedon Aug 30, 2014
This is all I get in the error log:
Edit by PVince81: added triple backticks
check-ict commentedon Aug 30, 2014
I just upgraded to 7.0.2 but the problem still exists. The upgrade took like 1,5 hour so I was hoping for some improvement.
PVince81 commentedon Aug 30, 2014
Wow, do you have lots of shared files ? Lots of individually shared files/folders ?
It seems something is running out of memory, possibly in
getChildren()for some reason.Needs further research.
check-ict commentedon Sep 1, 2014
The data contains alot of files, but there are only 4 top-level shared directories. It's impossible to share new top-level folders on inside existing shares because the option is not working. We wanted to share a file with 3th party and discovered it's not working anymore since we uploaded the data.
Please let me know if you need more debug info.
check-ict commentedon Sep 6, 2014
Any news on this?
30 remaining items
schiessle commentedon Oct 7, 2014
@check-ict did you had the chance to test it? The patch still has some rough edges but I want to avoid to spend a lot of time with something which doesn't fix the issue at the end.
check-ict commentedon Oct 7, 2014
Hello,
Good news, it seems to be working!
Should "share link" give me a link? Because it doesn't give anything at the moment. The group/users work though.
schiessle commentedon Oct 7, 2014
Great!
Yes, this should give you a link. Maybe a regression from this fix, as said it is not really polished yet. Also some unit tests fail. But now that I know that I'm on the right track, I will finish it and also check the share link issue. Thanks for testing it!
schiessle commentedon Oct 9, 2014
@check-ict That's now the final PR #11380
Can you give it another try? Sharing a link works for me too.
check-ict commentedon Oct 9, 2014
I edited the files but the link still doesn't work.
{"app":"PHP","message":"Call to undefined method OC\Server::getSecureRandom() at /var/www/owncloud/lib/private/share/share.php#657","level":3,"time":"2014-10-09T22:22:54+00:00"}
schiessle commentedon Oct 10, 2014
OC\Server::getSecureRandom() only exists on master but not on stable7. You probably copied the whole share.php to your server instead of applying the changes only. This will be no problem as soon as I backported it to stable7.
schiessle commentedon Oct 10, 2014
fix merged and backported to stable7, will be released with OC7.0.3
enoch85 commentedon Nov 1, 2014
Is this bug fixed in 7.0.3? Got this recently in my log:
PVince81 commentedon Nov 3, 2014
@enoch85 please raise as a separate ticket.
I don't see any of the errors you're seeing in the original report, so it is very likely to be a different issue.
coh7eiqu8thaBu commentedon Feb 19, 2015
got the same bug.
lock commentedon Aug 2, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.