{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/20555","labels_url":"https://api.github.com/repos/owncloud/core/issues/20555/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/20555/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/20555/events","html_url":"https://github.com/owncloud/core/issues/20555","id":117323032,"number":20555,"title":"\"Deadlock found when trying to get lock\" in file locking","user":{"login":"LukasReschke","id":878997,"avatar_url":"https://avatars.githubusercontent.com/u/878997?v=3","gravatar_id":"","url":"https://api.github.com/users/LukasReschke","html_url":"https://github.com/LukasReschke","followers_url":"https://api.github.com/users/LukasReschke/followers","following_url":"https://api.github.com/users/LukasReschke/following{/other_user}","gists_url":"https://api.github.com/users/LukasReschke/gists{/gist_id}","starred_url":"https://api.github.com/users/LukasReschke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LukasReschke/subscriptions","organizations_url":"https://api.github.com/users/LukasReschke/orgs","repos_url":"https://api.github.com/users/LukasReschke/repos","events_url":"https://api.github.com/users/LukasReschke/events{/privacy}","received_events_url":"https://api.github.com/users/LukasReschke/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/core/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/owncloud/core/labels/feature:locking","name":"feature:locking","color":"d4c5f9"},{"url":"https://api.github.com/repos/owncloud/core/labels/sev1-critical","name":"sev1-critical","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"icewind1991","id":1283854,"avatar_url":"https://avatars.githubusercontent.com/u/1283854?v=3","gravatar_id":"","url":"https://api.github.com/users/icewind1991","html_url":"https://github.com/icewind1991","followers_url":"https://api.github.com/users/icewind1991/followers","following_url":"https://api.github.com/users/icewind1991/following{/other_user}","gists_url":"https://api.github.com/users/icewind1991/gists{/gist_id}","starred_url":"https://api.github.com/users/icewind1991/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icewind1991/subscriptions","organizations_url":"https://api.github.com/users/icewind1991/orgs","repos_url":"https://api.github.com/users/icewind1991/repos","events_url":"https://api.github.com/users/icewind1991/events{/privacy}","received_events_url":"https://api.github.com/users/icewind1991/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/owncloud/core/milestones/63","html_url":"https://github.com/owncloud/core/milestones/8.2.2-next-maintenance","labels_url":"https://api.github.com/repos/owncloud/core/milestones/63/labels","id":1367142,"number":63,"title":"8.2.2-next-maintenance","description":null,"creator":{"login":"MorrisJobke","id":245432,"avatar_url":"https://avatars.githubusercontent.com/u/245432?v=3","gravatar_id":"","url":"https://api.github.com/users/MorrisJobke","html_url":"https://github.com/MorrisJobke","followers_url":"https://api.github.com/users/MorrisJobke/followers","following_url":"https://api.github.com/users/MorrisJobke/following{/other_user}","gists_url":"https://api.github.com/users/MorrisJobke/gists{/gist_id}","starred_url":"https://api.github.com/users/MorrisJobke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MorrisJobke/subscriptions","organizations_url":"https://api.github.com/users/MorrisJobke/orgs","repos_url":"https://api.github.com/users/MorrisJobke/repos","events_url":"https://api.github.com/users/MorrisJobke/events{/privacy}","received_events_url":"https://api.github.com/users/MorrisJobke/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":0,"state":"open","created_at":"2015-10-20T21:23:16Z","updated_at":"2015-11-17T10:15:17Z","due_on":null,"closed_at":null},"comments":17,"created_at":"2015-11-17T10:15:17Z","updated_at":"2015-11-17T12:24:59Z","closed_at":null,"body":"We have a ton of following entries, they appear dozens to hundreds of times per second:\r\n\r\n```\r\n{\"reqId\":\"96M5ZtaObvQI\\/q+FUTeB\",\"remoteAddr\":\"93.202.76.110\",\"app\":\"core\",\"message\":\"Exception while scanning file \\\"msrex\\/files_versions\\/owncloud\\/support\\/XXXX\\/XXXX/XXXX9\\\": An exception occurred while executing 'INSERT INTO `oc_file_locks` (`key`,`lock`,`ttl`) SELECT ?,?,? FROM `oc_file_locks` WHERE `key` = ? HAVING COUNT(*) = 0' with params [\\\"files\\\\\\/7a4d0ec119d9e99086554694bf6fa2bc\\\", 1, 1447758814, \\\"files\\\\\\/7a4d0ec119d9e99086554694bf6fa2bc\\\"]:\\n\\nSQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction\",\"level\":0,\"time\":\"2015-11-17T10:13:34+00:00\",\"method\":\"GET\",\"url\":\"\\/owncloud\\/index.php\\/apps\\/files\\/ajax\\/scan.php?force=false&dir=&requesttoken=TOKEN\"}\r\n```\r\n\r\n@cmonteroluque @karlitschek @PVince81 FYI - this is what is killing S3 right now. I'd vote for priority on this once.\r\ncc @icewind1991 THX!\r\ncc @danimo "},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/157356167","html_url":"https://github.com/owncloud/core/issues/20555#issuecomment-157356167","issue_url":"https://api.github.com/repos/owncloud/core/issues/20555","id":157356167,"user":{"login":"nickvergessen","id":213943,"avatar_url":"https://avatars.githubusercontent.com/u/213943?v=3","gravatar_id":"","url":"https://api.github.com/users/nickvergessen","html_url":"https://github.com/nickvergessen","followers_url":"https://api.github.com/users/nickvergessen/followers","following_url":"https://api.github.com/users/nickvergessen/following{/other_user}","gists_url":"https://api.github.com/users/nickvergessen/gists{/gist_id}","starred_url":"https://api.github.com/users/nickvergessen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickvergessen/subscriptions","organizations_url":"https://api.github.com/users/nickvergessen/orgs","repos_url":"https://api.github.com/users/nickvergessen/repos","events_url":"https://api.github.com/users/nickvergessen/events{/privacy}","received_events_url":"https://api.github.com/users/nickvergessen/received_events","type":"User","site_admin":false},"created_at":"2015-11-17T12:24:59Z","updated_at":"2015-11-17T12:24:59Z","body":"As per [MySQL docs](https://dev.mysql.com/doc/refman/5.6/en/set-transaction.html):\r\n\r\n> A global change to transaction characteristics requires the SUPER privilege. Any session is free to change its session characteristics (even in the middle of a transaction), or the characteristics for its next transaction. \r\n\r\nSame for MariaDB:\r\n\r\n> A change to the global default isolation level requires the SUPER privilege. Any session is free to change its session isolation level (even in the middle of a transaction), or the isolation level for its next transaction.\r\n\r\nThis is the same from mysql 5.7 down to 5.0, so not sure why our call which sets it for the session doesn't work:\r\nhttps://github.com/owncloud/3rdparty/blob/69768901fe25ad2aa71b23bbe7dbee2f8a07c13f/doctrine/dbal/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php#L916-L919"}}