-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shared files, oC 9.1 adding "(2)" at the end #25718
Comments
Have you shared the folder to a group? Then it might be a duplicate to #24575 |
Yes, some of files/folders were shared folders to groups. Some of them were shared files/folders to individual person account. It affects all of them. I don't think it is duplicate to #24575, because shared folders are only renamed not duplicated. It could be related to this issue ofcourse, i don't know. |
Without the exact sharing scenario it will be impossible to tell. But I'm pretty confident that the fix for #24575 should cover most cases. The only exception is #25564 For #24575 a fix will be released with the upcoming 9.1.1. The fix is here #25534. I'm going to close this for now. If you are able to find out the exact sharing scenario, you can first check if it is covered in the scenario list here https://github.com/owncloud/core/pull/25534/files#diff-b4888b15e6a7d80fe706602129494bfbR713 If it isn't, please reopen and I'll add it there for testing. |
Hi ! I have exactly the same problem since 9.1.0 This is my oc_share table on phpmyadmin : And an other screen of a user : It's strange, the bug is only on ldap account, and not all ... (sorry for my bad english ...) `Enabled:
Server configuration |
Please describe the sharing scenario, who shares what with who. |
Hello, It's an LDAP user who shares a folder of its own owncloud another LDAP user or a local user. The user sees emits sharing the folder named correctly. More use could not be simpler to owncloud sharing system to avoid using public clouds. Thx for your help ;) |
Is it really just a simple case of "ldap_user1" shared folder with "ldap_user2" and when ldap_user2 views the file list it keeps adding a "(2)" ? I thought there was more complex sharing involved like group shares, reshares, etc. |
Exactly ! No teacher uses sharing group because we are not much use this Cloud. |
Okay, thanks for the info. I'll see if I can reproduce it locally with this scenario. |
My steps:
The folder properly appears as "test" for me. |
Thank you so much for your help. Another thing I noticed is that files_sharing a lot of mistakes when I made the command : And I have the same errors on my personal ownCloud with this command. |
@ccheveaux your are using the wrong code checker, this is only to validate whether an app's code is clean (yes, the code of files_sharing isn't clean yet...). Try going to the admin page instead it will verify code integrity. Or on the CLI, the command you wanted is |
@ccheveaux I see in your oc_share table that not all folders received a "(2)". Are the ones without "(2)" from non-LDAP users ? Would be good to analyze the difference between the working ones and broken ones. |
I also did the test to create shares with other users tests. My main problem is that I would find how to fix shares that have this bug. Ca become annoying, and I'm afraid that even with a clean reinstallation, when I will restore the database, the problem will come back ... |
Are the users without "(2)" users who haven't logged in since a long time ? Because the logic that triggers duplicate detection is done when the filesystem for the share recipient is setup. |
Since I've had the same problem as @ccheveaux with LDAP-Users on 9.1: The main problem is the data-corruption on the client side if the owncloud-client is active. The client propagates the rename to the connected computer regardless of any open files, leaving sometime the original folder (without " (2)") due to the open file and the renamed folder. A rename within the browser is only possible if the name is shorter then 512 chars. Sometimes this is not possible even after a few minutes due to the long " (2) (2) (2) (2) (2) ... (2) (2)" name. |
Those with no (2) are on the screenshot is a sharing "user_ldap->public" or "user_ldap-> user_ldap". I am currently doing a share with a teacher who is not connected for several weeks. Yesterday, after cleaning (2) 'oc_sharing', this folder is incremented very quickly. |
That could be an explanation indeed @elektro-wolle ! |
I've created a cronjob on the server, replacing the " (2)" in the name of the oc_share table and told the users to not use the desktop-client. This is not really a solution, I'm still waiting for 9.1.1 and currently evaluating other alternatives to owncloud. |
So if I understand you well cleaned by the cron table. |
Can you share me you're script to replacing the (2) please ? |
I don't think this is related to the desktop client. I'm looking at the code that usually adds "(2)" to see if there is something that could make it mis-detect a duplicate. |
It's just an cronjob calling mysql with the following statement: |
Now trying to recreate a similar setup like @ccheveaux by enabling the same third party apps in case it's one of them messing with the FS setup. |
No more luck today apparently. Tomorrow hopefully. @gregoryR please tell me what processes are running against the test system:
also how high is the TTL in the LDAP config of OC ? |
FINALLY, I got something. What I did:
Then in parallel:
Shortly after running cron + the users page thing, I got this stack trace from the LDAP refresh:
It is trying to add "(2)" for "/BDD-Capteurs" for user "tl0569f":
Now from what I see in the mounts list, this share is already mounted for that user:
so next step is to find out why the FS setup for user "tl0569f" is running twice through this code path instead of detecting that we already have it. In |
@PVince81 I'll try to answer questions in order
Just wait and Yes cron is running for www-data in test instance
Since #26355 crontab occasionally (one or two time a day, crontab runs every 15 minutes) output a Fatal Error
Sync client is running for user
Yes
When I run find in fs I only see the first two entries
In oc_filecache
I'm seeing just 90 files in tl0569f filesystem
but I remember that this user had loaded a lot of files in his account.
TTL is 600 |
So far all I know is that So far, looking at and later we set the value to say "we already processed this user": https://github.com/owncloud/core/blob/v9.1.1/lib/private/Files/Filesystem.php#L408 But in-between there are calls to the user manager to get the user: https://github.com/owncloud/core/blob/v9.1.1/lib/private/Files/Filesystem.php#L401 From what I observe in the stack trace posted previously, a call to Since at this stage we haven't yet set Still looking for proof of this, but will also look into ways to prevent this so we can test. |
Side note: starting with 9.2 the avatar manager will be decoupled from FS setup, so this kind of crazy issues shouldn't happen any more: #26124 (not backportable as it changes the FS structure) |
@ccheveaux @gregoryR could you guys try with this new patch: #26396 (https://github.com/owncloud/core/pull/26396.patch). This should solve the problem by preventing duplicate setup FS of users with LDAP. In my local test env the problem didn't appear any more after this change after several retries. |
Thanks. Now regardless whether this patch fixes this specific issue or not, I think it should be merged because it would prevent any other potential similar issues. |
Sorry @PVince81 i don't have test instance to try this patch :/ |
Based on all the information found so far, I managed to find steps to reproduce this issue: Steps:
Then repeat the last three steps several times. |
What I also noticed but may be an isolated problem. For several weeks my body production works again correctly, but if I remove your patch then (2) back. |
Any error messages ? Was it web UI or desktop client ? |
And desktop client can't connect. Following our patches and tests, I had a period or my ownCloud instance was enormously slow in terms of connection and access the files through Web UI. It became extremely chaotic so I completely reinstalled distribution and ownCloud, because just install ownCloud was not enough. After this and re-import the database, ownCloud was responsive but (2) was still present and active. Finally I delete and recreate the blocked user accounts and I noticed that it was those sharing much. Since I did not touch anything to await a future last days I would do during the school holidays. |
@ccheveaux was that on v9.1.0 or v9.1.1 ? Because on v9.1.0 there was a memory issue which could cause users to not be able to log in any more. |
closing as fixed through #26399 which willl be in 9.1.2. @ccheveaux if you have old logs about the users who couldn't login we could have a look in a separate issue. |
I have applied patch 26396 and did everything as before that caused the (2) (2) ... problem. The problem has not reappeared. It has been about 24 hours and I have been running various sync clients without issue. I did notice a strange thing with avatars. Even though I had avatars turned off in config.php, the system was still trying to update the database with avatar information. I think it was coming from the LDAP system and the mysql error was: The total blob data length (10067609) is greater than 10% of the total redo log size. It was trying to update a record in oc_cards. The query was large and it slowed down every ownCloud access for the user with the avatar. The solution was to turn avatars back on and upload a new avatar. That seemed to fix the avatar database problem. I turned avatars off again and applied patch 26396 and the main problem is gone. I am keeping avatars off as I read that the next version will change the way avatars are handled. Will patch 26396 be in the next release? |
Yes, in 9.1.2 but it had to be adjusted due to further code changes: #26399 Regarding the avatars + LDAP issue, can you make a new ticket ? I find it suspicious that LDAP tries to sync avatars even when disabled. |
Also thanks everyone here who helped debug the issue ! |
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. |
Steps to reproduce (I don't know how to reproduce it, I need to investigate more)
I found same issue here, but these steps to reproduce does not work:
#10736
Expected behaviour
oC should not rename shared files ...
Actual behaviour
oC adds "(2)" to all shared files (owner does not see renamed + "(2)" files
Server configuration
Ubuntu 14.04
Apache2
MySQL
PHP 5.6
oC 9.1
Updated from 9.04
Installed from official website manually
List of activated apps:
The content of config/config.php:
Are you using external storage, if yes which one: no
Are you using encryption: yes
Are you using an external user-backend, if yes which one: LDAP
Client configuration
Browser: Opera 39
Operating system: Windows 10
The text was updated successfully, but these errors were encountered: