Skip to content
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

Drag and drop a folder into the web interface doesn't work (PostgreSQL deadlock?) #21537

Closed
silenius opened this issue Jun 23, 2020 · 4 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@silenius
Copy link

silenius commented Jun 23, 2020

Steps to reproduce

  1. Drag and drop a folder with subfolders and files into the web interface
  2. Wait some seconds

Expected behaviour

The folder and its subfolders/files should be uploaded

Actual behaviour

The folder and its subfolders/files aren't uploaded properly, tons of "An unknown error has occurred✖" messages + ... (see screenshot)

This is probably due to deadlocks on the PostgreSQL side.

Server configuration

Operating system: FreeBSD 12.1

Web server: nginx-1.18.0_15,2

Database: PostgreSQL 11.6 (through Pgbouncer)

PHP version: 7.3.19

Nextcloud version: 19.0.0

Updated from an older Nextcloud/ownCloud or fresh install: updated from 18.0.4

Where did you install Nextcloud from: it's installed from FreeBSD packages in a FreeBSD jail

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
root@nextcloud:/usr/local/www/nextcloud # su -m www -c "php occ app:list"
Enabled:
  - accessibility: 1.5.0
  - activity: 2.12.0
  - calendar: 2.0.3
  - circles: 0.19.2
  - cloud_federation_api: 1.2.0
  - comments: 1.9.0
  - contacts: 3.3.0
  - contactsinteraction: 1.0.0
  - dav: 1.15.0
  - deck: 1.0.3
  - drawio: 0.9.6
  - federatedfilesharing: 1.9.0
  - federation: 1.9.0
  - files: 1.14.0
  - files_markdown: 2.3.0
  - files_mindmap: 0.0.22
  - files_pdfviewer: 1.8.0
  - files_rightclick: 0.16.0
  - files_sharing: 1.11.0
  - files_trashbin: 1.9.0
  - files_versions: 1.12.0
  - files_videoplayer: 1.8.0
  - firstrunwizard: 2.8.0
  - forms: 1.1.1
  - groupfolders: 6.0.6
  - impersonate: 1.6.1
  - logreader: 2.4.0
  - lookup_server_connector: 1.7.0
  - mail: 1.4.0
  - nextcloud_announcements: 1.8.0
  - notes: 3.5.1
  - notifications: 2.7.0
  - oauth2: 1.7.0
  - password_policy: 1.9.1
  - photos: 1.1.0
  - polls: 1.4.3
  - privacy: 1.3.0
  - provisioning_api: 1.9.0
  - recommendations: 0.7.0
  - serverinfo: 1.9.0
  - settings: 1.1.0
  - sharebymail: 1.9.0
  - support: 1.2.1
  - survey_client: 1.7.0
  - systemtags: 1.9.0
  - tasks: 0.13.1
  - text: 3.0.1
  - theming: 1.10.0
  - twofactor_backupcodes: 1.8.0
  - unsplash: 1.1.6
  - updatenotification: 1.9.0
  - viewer: 1.3.0
  - workflowengine: 2.1.0
Disabled:
  - admin_audit
  - encryption
  - files_external
  - registration
  - user_ldap

Nextcloud configuration:

Config report
root@nextcloud:/usr/local/www/nextcloud # su -m www -c "php occ config:list system"
{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nextcloud.xxx.be"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/nextcloud.xxx.be",
        "dbtype": "pgsql",
        "version": "19.0.0.12",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtpport": "25",
        "loglevel": 2,
        "apps_paths": [
            {
                "path": "\/data\/nextcloud\/apps",
                "url": "\/apps",
                "writable": true
            },
            {
                "path": "\/usr\/local\/www\/nextcloud\/apps-pkg",
                "url": "\/apps-pkg",
                "writable": false
            }
        ],
        "theme": "",
        "mail_sendmailmode": "smtp",
        "updater.release.channel": "stable",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "redis": {
            "port": 6379,
            "host": "***REMOVED SENSITIVE VALUE***"
        },
        "filelocking.enabled": true
    }
}

Are you using external storage, if yes which one: no

Are you using encryption: no

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

Client configuration

Browser: Firefox

Operating system: FreeBSD 12.1

Logs

Web server error log

Web server error log
020/06/23 12:23:08 [error] 54117#101110: *11252 upstream timed out (60: Operation timed out) while reading response header from upstream, client: 10.209.1.252, server: nextcloud.xxx.be, request: "MKCOL /remote.php/dav/files/jcigar/Personal%20Stuff/test/010_BBPF%20AnnualWorkplans/2018 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "nextcloud.xxx.be"
2020/06/23 12:23:09 [error] 54117#101110: *11246 upstream timed out (60: Operation timed out) while reading response header from upstream, client: 10.209.1.252, server: nextcloud.xxx.be, request: "PUT /remote.php/webdav/Personal%20Stuff/test/010_BBPF%20AnnualWorkplans/2017/WP%20Annex%20I%20(List%20of%202017%20Deliverables).xlsx HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "nextcloud.xxx.be"
2020/06/23 12:24:17 [error] 54115#101160: *11533 upstream timed out (60: Operation timed out) while reading response header from upstream, client: 10.209.1.252, server: nextcloud.xxx.be, request: "PROPFIND /remote.php/dav/files/jcigar/Personal%20Stuff/test/017_BBPF%20Partnership%3A%20Joint%20initiatives HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "nextcloud.xxx.be"
2020/06/23 12:24:18 [error] 54117#101110: *11550 upstream timed out (60: Operation timed out) while reading response header from upstream, client: 10.209.1.252, server: nextcloud.xxx.be, request: "MKCOL /remote.php/dav/files/jcigar/Personal%20Stuff/test/020_Self%20reflection%20document HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "nextcloud.xxx.be"

Nextcloud log (data/nextcloud.log)

Nextcloud log
(...)
{"reqId":"w21qdDPfNEKihlBtHGsi","level":3,"time":"2020-06-23T10:24:18+00:00","remoteAddr":"10.209.1.252","user":"jcigar","app":"no app in context","method":"PUT","url":"/remote.php/webdav/Personal%20Stuff/test/018_BBPF%20Promotion%20Material/Roll-up%20Platform%202018.pdf","message":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"Expected filesize of 333224 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 122880 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/apps-pkg/dav/lib/Connector/Sabre/Directory.php","line":154,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[null]},{"file":"/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1104,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["Roll-up Platform 2018.pdf",null]},{"file":"/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":527,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["Personal Stuff/test/018_BBPF Promotion Material/Roll-up Platform 2018.pdf",null,null]},{"file":"/usr/local/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":474,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PUT",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":251,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":319,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/apps-pkg/dav/appinfo/v1/webdav.php","line":82,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/remote.php","line":167,"args":["/usr/local/www/nextcloud/apps-pkg/dav/appinfo/v1/webdav.php"],"function":"require_once"}],"File":"/usr/local/www/nextcloud/apps-pkg/dav/lib/Connector/Sabre/File.php","Line":238,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:77.0) Gecko/20100101 Firefox/77.0","version":"19.0.0.12"}
{"reqId":"w21qdDPfNEKihlBtHGsi","level":4,"time":"2020-06-23T10:24:18+00:00","remoteAddr":"10.209.1.252","user":"jcigar","app":"webdav","method":"PUT","url":"/remote.php/webdav/Personal%20Stuff/test/018_BBPF%20Promotion%20Material/Roll-up%20Platform%202018.pdf","message":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"Expected filesize of 333224 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 122880 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/apps-pkg/dav/lib/Connector/Sabre/Directory.php","line":154,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[null]},{"file":"/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1104,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["Roll-up Platform 2018.pdf",null]},{"file":"/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":527,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["Personal Stuff/test/018_BBPF Promotion Material/Roll-up Platform 2018.pdf",null,null]},{"file":"/usr/local/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":474,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PUT",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":251,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":319,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/apps-pkg/dav/appinfo/v1/webdav.php","line":82,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/remote.php","line":167,"args":["/usr/local/www/nextcloud/apps-pkg/dav/appinfo/v1/webdav.php"],"function":"require_once"}],"File":"/usr/local/www/nextcloud/apps-pkg/dav/lib/Connector/Sabre/File.php","Line":238,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:77.0) Gecko/20100101 Firefox/77.0","version":"19.0.0.12"}
{"reqId":"w21qdDPfNEKihlBtHGsi","level":3,"time":"2020-06-23T10:24:18+00:00","remoteAddr":"10.209.1.252","user":"jcigar","app":"PHP","method":"PUT","url":"/remote.php/webdav/Personal%20Stuff/test/018_BBPF%20Promotion%20Material/Roll-up%20Platform%202018.pdf","message":"Cannot modify header information - headers already sent by (output started at /usr/local/www/nextcloud/3rdparty/sabre/http/lib/Sapi.php:132) at /usr/local/www/nextcloud/apps-pkg/dav/lib/Connector/Sabre/File.php#680","userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:77.0) Gecko/20100101 Firefox/77.0","version":"19.0.0.12"}
{"reqId":"w21qdDPfNEKihlBtHGsi","level":3,"time":"2020-06-23T10:24:18+00:00","remoteAddr":"10.209.1.252","user":"jcigar","app":"PHP","method":"PUT","url":"/remote.php/webdav/Personal%20Stuff/test/018_BBPF%20Promotion%20Material/Roll-up%20Platform%202018.pdf","message":"Cannot modify header information - headers already sent by (output started at /usr/local/www/nextcloud/3rdparty/sabre/http/lib/Sapi.php:132) at /usr/local/www/nextcloud/apps-pkg/dav/lib/Connector/Sabre/File.php#680","userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:77.0) Gecko/20100101 Firefox/77.0","version":"19.0.0.12"}
{"reqId":"w21qdDPfNEKihlBtHGsi","level":3,"time":"2020-06-23T10:24:18+00:00","remoteAddr":"10.209.1.252","user":"jcigar","app":"PHP","method":"PUT","url":"/remote.php/webdav/Personal%20Stuff/test/018_BBPF%20Promotion%20Material/Roll-up%20Platform%202018.pdf","message":"Cannot modify header information - headers already sent by (output started at /usr/local/www/nextcloud/3rdparty/sabre/http/lib/Sapi.php:132) at /usr/local/www/nextcloud/apps-pkg/dav/lib/Connector/Sabre/File.php#680","userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:77.0) Gecko/20100101 Firefox/77.0","version":"19.0.0.12"}
{"reqId":"K7zs6hXCnftvcqWzqR0q","level":3,"time":"2020-06-23T10:24:18+00:00","remoteAddr":"10.209.1.252","user":"jcigar","app":"PHP","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"Version warning: Imagick was compiled against ImageMagick version 1690 but version 1691 is loaded. Imagick will run but may behave surprisingly at Unknown#0","userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:77.0) Gecko/20100101 Firefox/77.0","version":"19.0.0.12"}
{"reqId":"6HKJZ0lMn4mfQRpscXPh","level":3,"time":"2020-06-23T10:30:01+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Version warning: Imagick was compiled against ImageMagick version 1690 but version 1691 is loaded. Imagick will run but may behave surprisingly at Unknown#0","userAgent":"--","version":"19.0.0.12"}
{"reqId":"eIRZwwSNantL3YzffHz5","level":3,"time":"2020-06-23T10:34:19+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Version warning: Imagick was compiled against ImageMagick version 1690 but version 1691 is loaded. Imagick will run but may behave surprisingly at Unknown#0","userAgent":"--","version":"19.0.0.12"}
{"reqId":"cGOzWB1FoCgHlWH1l3et","level":3,"time":"2020-06-23T10:35:24+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Version warning: Imagick was compiled against ImageMagick version 1690 but version 1691 is loaded. Imagick will run but may behave surprisingly at Unknown#0","userAgent":"--","version":"19.0.0.12"}
(...)
@silenius silenius added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jun 23, 2020
@silenius
Copy link
Author

Firefox_Screenshot_2020-06-23T10-25-09 558Z

@silenius silenius changed the title Drag and drop a folder in the web interface doesn't work (PostgreSQL deadlock?) Drag and drop a folder into the web interface doesn't work (PostgreSQL deadlock?) Jun 23, 2020
@mweinelt
Copy link

mweinelt commented Aug 13, 2020

I'm seeing a similar issue on 19.0.1, with PostgreSQL 11.7 and Redis 5.0.7 (for memcache.local and memcache.locking).

Multiple deadlock warnings appared when I tried to upload a folder with ~180 images.

An exception occurred while executing 'UPDATE "oc_filecache" SET "mtime" = GREATEST("mtime", ?), "etag" = ? WHERE ("storage" = ?) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de'))' with params [1597328944, "5f354e312a8db", 2]: SQLSTATE[40P01]: Deadlock detected: 7 ERROR: deadlock detected DETAIL: Process 1231 waits for ShareLock on transaction 26944; blocked by process 1228. Process 1228 waits for ShareLock on transaction 26952; blocked by process 1231. HINT: See server log for query details. CONTEXT: while updating tuple (65,42) in relation "oc_filecache"✖ 

The postgresql log shows the following:


2020-08-13 14:29:06.176 GMT [1231] ERROR:  deadlock detected
2020-08-13 14:29:06.176 GMT [1231] DETAIL:  Process 1231 waits for ShareLock on transaction 26944; blocked by process 1228.
        Process 1228 waits for ShareLock on transaction 26952; blocked by process 1231.
        Process 1231: UPDATE "oc_filecache" SET "mtime" = GREATEST("mtime", $1), "etag" = $2 WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de'))
        Process 1228: UPDATE "oc_filecache" SET "size" = GREATEST($1, "size" + $2) WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de')) AND ("size" > '-1')
2020-08-13 14:29:06.176 GMT [1231] HINT:  See server log for query details.
2020-08-13 14:29:06.176 GMT [1231] CONTEXT:  while updating tuple (65,42) in relation "oc_filecache"
2020-08-13 14:29:06.176 GMT [1231] STATEMENT:  UPDATE "oc_filecache" SET "mtime" = GREATEST("mtime", $1), "etag" = $2 WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de'))
2020-08-13 14:29:07.396 GMT [1236] ERROR:  deadlock detected
2020-08-13 14:29:07.396 GMT [1236] DETAIL:  Process 1236 waits for ShareLock on transaction 26954; blocked by process 1230.
        Process 1230 waits for ShareLock on transaction 26966; blocked by process 1236.
        Process 1236: UPDATE "oc_filecache" SET "size" = GREATEST($1, "size" + $2) WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de')) AND ("size" > '-1')
        Process 1230: UPDATE "oc_filecache" SET "mtime" = GREATEST("mtime", $1), "etag" = $2 WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de'))
2020-08-13 14:29:07.396 GMT [1236] HINT:  See server log for query details.
2020-08-13 14:29:07.396 GMT [1236] CONTEXT:  while rechecking updated tuple (66,19) in relation "oc_filecache"
2020-08-13 14:29:07.396 GMT [1236] STATEMENT:  UPDATE "oc_filecache" SET "size" = GREATEST($1, "size" + $2) WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de')) AND ("size" > '-1')
2020-08-13 14:29:08.434 GMT [1235] ERROR:  deadlock detected
2020-08-13 14:29:08.434 GMT [1235] DETAIL:  Process 1235 waits for ShareLock on transaction 26965; blocked by process 1227.
        Process 1227 waits for ShareLock on transaction 26955; blocked by process 1232.
        Process 1232 waits for ExclusiveLock on tuple (66,27) of relation 16464 of database 16384; blocked by process 1235.
        Process 1235: UPDATE "oc_filecache" SET "size" = GREATEST($1, "size" + $2) WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de')) AND ("size" > '-1')
        Process 1227: UPDATE "oc_filecache" SET "size" = GREATEST($1, "size" + $2) WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de')) AND ("size" > '-1')
        Process 1232: UPDATE "oc_filecache" SET "mtime" = GREATEST("mtime", $1), "etag" = $2 WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de'))
2020-08-13 14:29:08.434 GMT [1235] HINT:  See server log for query details.
2020-08-13 14:29:08.434 GMT [1235] CONTEXT:  while locking tuple (66,27) in relation "oc_filecache"
2020-08-13 14:29:08.434 GMT [1235] STATEMENT:  UPDATE "oc_filecache" SET "size" = GREATEST($1, "size" + $2) WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de')) AND ("size" > '-1')
2020-08-13 14:29:08.435 GMT [1227] ERROR:  deadlock detected
2020-08-13 14:29:08.435 GMT [1227] DETAIL:  Process 1227 waits for ShareLock on transaction 26955; blocked by process 1232.
        Process 1232 waits for ShareLock on transaction 26965; blocked by process 1227.
        Process 1227: UPDATE "oc_filecache" SET "size" = GREATEST($1, "size" + $2) WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de')) AND ("size" > '-1')
        Process 1232: UPDATE "oc_filecache" SET "mtime" = GREATEST("mtime", $1), "etag" = $2 WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de'))
2020-08-13 14:29:08.435 GMT [1227] HINT:  See server log for query details.
2020-08-13 14:29:08.435 GMT [1227] CONTEXT:  while rechecking updated tuple (66,23) in relation "oc_filecache"
2020-08-13 14:29:08.435 GMT [1227] STATEMENT:  UPDATE "oc_filecache" SET "size" = GREATEST($1, "size" + $2) WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de')) AND ("size" > '-1')
2020-08-13 14:29:09.474 GMT [1233] ERROR:  deadlock detected
2020-08-13 14:29:09.474 GMT [1233] DETAIL:  Process 1233 waits for ShareLock on transaction 26985; blocked by process 1230.
        Process 1230 waits for ShareLock on transaction 26959; blocked by process 1233.
        Process 1233: UPDATE "oc_filecache" SET "mtime" = GREATEST("mtime", $1), "etag" = $2 WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de'))
        Process 1230: UPDATE "oc_filecache" SET "size" = GREATEST($1, "size" + $2) WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de')) AND ("size" > '-1')
2020-08-13 14:29:09.474 GMT [1233] HINT:  See server log for query details.
2020-08-13 14:29:09.474 GMT [1233] CONTEXT:  while rechecking updated tuple (66,32) in relation "oc_filecache"
2020-08-13 14:29:09.474 GMT [1233] STATEMENT:  UPDATE "oc_filecache" SET "mtime" = GREATEST("mtime", $1), "etag" = $2 WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de'))
2020-08-13 14:29:10.525 GMT [1232] ERROR:  deadlock detected
2020-08-13 14:29:10.525 GMT [1232] DETAIL:  Process 1232 waits for ShareLock on transaction 26956; blocked by process 1234.
        Process 1234 waits for ShareLock on transaction 26995; blocked by process 1232.
        Process 1232: UPDATE "oc_filecache" SET "size" = GREATEST($1, "size" + $2) WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de')) AND ("size" > '-1')
        Process 1234: UPDATE "oc_filecache" SET "mtime" = GREATEST("mtime", $1), "etag" = $2 WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de'))
2020-08-13 14:29:10.525 GMT [1232] HINT:  See server log for query details.
2020-08-13 14:29:10.525 GMT [1232] CONTEXT:  while rechecking updated tuple (66,37) in relation "oc_filecache"
2020-08-13 14:29:10.525 GMT [1232] STATEMENT:  UPDATE "oc_filecache" SET "size" = GREATEST($1, "size" + $2) WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de')) AND ("size" > '-1')
2020-08-13 14:29:11.648 GMT [1238] ERROR:  deadlock detected
2020-08-13 14:29:11.648 GMT [1238] DETAIL:  Process 1238 waits for ShareLock on transaction 27004; blocked by process 1230.
        Process 1230 waits for ShareLock on transaction 27006; blocked by process 1238.
        Process 1238: UPDATE "oc_filecache" SET "size" = GREATEST($1, "size" + $2) WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de')) AND ("size" > '-1')
        Process 1230: UPDATE "oc_filecache" SET "mtime" = GREATEST("mtime", $1), "etag" = $2 WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de'))
2020-08-13 14:29:11.648 GMT [1238] HINT:  See server log for query details.
2020-08-13 14:29:11.648 GMT [1238] CONTEXT:  while rechecking updated tuple (67,36) in relation "oc_filecache"
2020-08-13 14:29:11.648 GMT [1238] STATEMENT:  UPDATE "oc_filecache" SET "size" = GREATEST($1, "size" + $2) WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de')) AND ("size" > '-1')
2020-08-13 14:29:12.670 GMT [1246] ERROR:  deadlock detected
2020-08-13 14:29:12.670 GMT [1246] DETAIL:  Process 1246 waits for ShareLock on transaction 27005; blocked by process 1240.
        Process 1240 waits for ShareLock on transaction 27007; blocked by process 1246.
        Process 1246: UPDATE "oc_filecache" SET "mtime" = GREATEST("mtime", $1), "etag" = $2 WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de'))
        Process 1240: UPDATE "oc_filecache" SET "mtime" = GREATEST("mtime", $1), "etag" = $2 WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de'))
2020-08-13 14:29:12.670 GMT [1246] HINT:  See server log for query details.
2020-08-13 14:29:12.670 GMT [1246] CONTEXT:  while rechecking updated tuple (68,3) in relation "oc_filecache"
2020-08-13 14:29:12.670 GMT [1246] STATEMENT:  UPDATE "oc_filecache" SET "mtime" = GREATEST("mtime", $1), "etag" = $2 WHERE ("storage" = $3) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', 'd41d8cd98f00b204e9800998ecf8427e', '29ff0edf73a32cb03e437d88fd049245', 'e46cc72327dfc3ccaf32f0a167e6c6d1', '9ad6a85e187dde07e8f46336a3e678de'))
2020-08-13 14:33:27.906 GMT [3135] ERROR:  duplicate key value violates unique constraint "fs_storage_path_hash"
2020-08-13 14:33:27.906 GMT [3135] DETAIL:  Key (storage, path_hash)=(2, 89e9d67d75d4418b42e4bed21ec9b648) already exists.
2020-08-13 14:33:27.906 GMT [3135] STATEMENT:  INSERT INTO "oc_filecache" ("mimepart", "mimetype", "mtime", "size", "etag", "storage_mtime", "permissions", "name", "parent", "checksum", "path_hash", "path", "storage") VALUES($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13)

@silenius
Copy link
Author

this is still an issue with 20.0.0

@szaimen
Copy link
Contributor

szaimen commented Jun 17, 2021

As I cannot reproduce the original issue anymore, I will close this ticket. If this is still happening please make sure to upgrade to the latest version. After that, feel free to reopen. The latest version can be seen by checking https://nextcloud.com/install/#install-clients and https://nextcloud.com/install/#instructions-server respectively.

@szaimen szaimen closed this as completed Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug
Projects
None yet
Development

No branches or pull requests

4 participants