owncloud / core

:cloud: ownCloud web server core (Files, DAV, etc.)
https://owncloud.com
GNU Affero General Public License v3.0
8.39k stars 2.05k forks source link

http 500 when creating multiple folders at the same time #38645

Open kulmann opened 3 years ago

kulmann commented 3 years ago

Steps to reproduce

  1. Create multiple folders at the same time

or

  1. run BACKEND_HOST=<your-oc10> SERVER_HOST=<your-oc10> yarn test:acceptance:oc10 tests/acceptance/features/webUIFilesSearch/search.feature:122 acceptance test with github.com/owncloud/web repo master on commit 54418112686b450406a6642941ea97828fc2bd01

Expected behaviour

Creating multiple folders at the same time should succeed

Actual behaviour

Creating the folders fails with a status 500

Server configuration

Operating system: macOS 11.2.3

Web server: nginx 1.19.8

Database: 10.5.8-MariaDB

PHP version: 7.3.27

ownCloud version: 10.7.1 prealpha (master on commit 7afc5d5bcec244af3d6ff4779382f1035d6c76c3)

Updated from an older ownCloud or fresh install: fresh install

Where did you install ownCloud from: github

Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.

The content of config/config.php:

$CONFIG = array (
  'passwordsalt' => 'Rh2DB4lf2YAiVb7aJ2vvZcW3yCnSpx',
  'secret' => 'DrCOJ2f974WH+YsIO4HhqOXiB97T8fKvLtzbZoJb4Js4xgeS',
  'trusted_domains' =>
  array (
    0 => 'host.docker.internal',
  ),
  'datadirectory' => '/Users/bene/Code/owncloud/core-phoenix/data',
  'overwrite.cli.url' => 'http://host.docker.internal/px1/',
  'dbtype' => 'mysql',
  'version' => '10.7.1.0',
  'dbname' => 'owncloud_px',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'owncloud',
  'dbpassword' => 'owncloud',
  'logtimezone' => 'UTC',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/Users/bene/Code/owncloud/core-phoenix/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/Users/bene/Code/owncloud/core-phoenix/apps-external',
      'url' => '/apps-external',
      'writable' => true,
    ),
  ),
  'installed' => true,
  'instanceid' => 'occd76j5mffr',
  'dav.enable.tech_preview' => true,
  'loglevel' => 0,
  'phoenix.baseUrl' => 'http://host.docker.internal:9100',
  'cors.allowed-domains' =>
  array (
    0 => 'http://host.docker.internal:9100',
    1 => 'http://localhost:9876',
    2 => 'http://localhost:8080',
  ),
  'license-key' => '***redacted***',
  'sharing.federation.allowHttpFallback' => true,
);

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder.

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

LDAP configuration (delete this part if not used)

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your ownCloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';

Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

Client configuration

Browser:

Operating system:

Logs

Web server error log

Insert your webserver log here

ownCloud log (data/owncloud.log)

{
  "reqId": "qEgihDrngs1YbBdIJtWK",
  "level": 4,
  "time": "2021-04-19T10:25:53+00:00",
  "remoteAddr": "127.0.0.1",
  "user": "Alice",
  "app": "webdav",
  "method": "MKCOL",
  "url": "/px1/remote.php/dav/files/Alice/simple-empty-folder",
  "message": "Exception: An exception occurred while executing 'INSERT INTO `oc_filecache` (`mimepart`, `mimetype`, `mtime`, `size`, `etag`, `storage_mtime`, `permissions`, `checksum`, `parent`, `path_hash`, `path`, `name`, `storage`) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [\"1\", \"2\", 1618827953, -1, \"607d5ab1a3a9a\", 1618827953, 31, \"\", 9, \"65e57c37d81483137b304a40a4af0a1e\", \"files\\/simple-empty-folder\", \"simple-empty-folder\", 3]:\n\nSQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\DeadlockException\",\"Message\":\"An exception occurred while executing 'INSERT INTO `oc_filecache` (`mimepart`, `mimetype`, `mtime`, `size`, `etag`, `storage_mtime`, `permissions`, `checksum`, `parent`, `path_hash`, `path`, `name`, `storage`) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [\\\"1\\\", \\\"2\\\", 1618827953, -1, \\\"607d5ab1a3a9a\\\", 1618827953, 31, \\\"\\\", 9, \\\"65e57c37d81483137b304a40a4af0a1e\\\", \\\"files\\\\\\/simple-empty-folder\\\", \\\"simple-empty-folder\\\", 3]:\\n\\nSQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction\",\"Code\":0,\"Trace\":\"#0 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/doctrine\\/dbal\\/lib\\/Doctrine\\/DBAL\\/DBALException.php(172): Doctrine\\\\DBAL\\\\Driver\\\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/doctrine\\/dbal\\/lib\\/Doctrine\\/DBAL\\/DBALException.php(151): Doctrine\\\\DBAL\\\\DBALException::wrapException(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'An exception oc...')\\n#2 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/doctrine\\/dbal\\/lib\\/Doctrine\\/DBAL\\/Connection.php(1087): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'INSERT INTO `oc...', Array)\\n#3 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/DB\\/Connection.php(207): Doctrine\\\\DBAL\\\\Connection->executeUpdate('INSERT INTO `oc...', Array, Array)\\n#4 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/doctrine\\/dbal\\/lib\\/Doctrine\\/DBAL\\/Query\\/QueryBuilder.php(210): OC\\\\DB\\\\Connection->executeUpdate('INSERT INTO `oc...', Array, Array)\\n#5 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/DB\\/QueryBuilder\\/QueryBuilder.php(141): Doctrine\\\\DBAL\\\\Query\\\\QueryBuilder->execute()\\n#6 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/DB\\/Adapter.php(198): OC\\\\DB\\\\QueryBuilder\\\\QueryBuilder->execute()\\n#7 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/DB\\/Connection.php(260): OC\\\\DB\\\\Adapter->upsert('*PREFIX*filecac...', Array, Array)\\n#8 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/Cache\\/Cache.php(296): OC\\\\DB\\\\Connection->upsert('*PREFIX*filecac...', Array, Array)\\n#9 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/Cache\\/Cache.php(249): OC\\\\Files\\\\Cache\\\\Cache->insert('files\\/simple-em...', Array)\\n#10 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/Cache\\/Scanner.php(284): OC\\\\Files\\\\Cache\\\\Cache->put('files\\/simple-em...', Array)\\n#11 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/Cache\\/Scanner.php(221): OC\\\\Files\\\\Cache\\\\Scanner->addToCache('files\\/simple-em...', Array, -1)\\n#12 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/Cache\\/Scanner.php(329): OC\\\\Files\\\\Cache\\\\Scanner->scanFile('files\\/simple-em...', 3, '9', false, false)\\n#13 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/Cache\\/Updater.php(124): OC\\\\Files\\\\Cache\\\\Scanner->scan('files\\/simple-em...', false, 3, false)\\n#14 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/View.php(333): OC\\\\Files\\\\Cache\\\\Updater->update('files\\/simple-em...', 1618827953)\\n#15 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/View.php(1238): OC\\\\Files\\\\View->writeUpdate(Object(OCA\\\\Files_Trashbin\\\\Storage), 'files\\/simple-em...')\\n#16 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/View.php(279): OC\\\\Files\\\\View->basicOperation('mkdir', '\\/simple-empty-f...', Array)\\n#17 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/public\\/Events\\/EventEmitterTrait.php(50): OC\\\\Files\\\\View->OC\\\\Files\\\\{closure}(*** sensitive parameters replaced ***)\\n#18 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/View.php(281): OC\\\\Files\\\\View->emittingCall(Object(Closure), Array, 'file', 'create')\\n#19 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/apps\\/dav\\/lib\\/Connector\\/Sabre\\/Directory.php(221): OC\\\\Files\\\\View->mkdir('\\/\\/simple-empty-...')\\n#20 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(1210): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Directory->createDirectory('simple-empty-fo...')\\n#21 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/CorePlugin.php(560): Sabre\\\\DAV\\\\Server->createCollection('files\\/Alice\\/sim...', Object(Sabre\\\\DAV\\\\MkCol))\\n#22 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/sabre\\/event\\/lib\\/WildcardEmitterTrait.php(89): Sabre\\\\DAV\\\\CorePlugin->httpMkcol(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#23 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(472): Sabre\\\\DAV\\\\Server->emit('method:MKCOL', Array)\\n#24 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(253): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#25 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/apps\\/dav\\/lib\\/Server.php(330): Sabre\\\\DAV\\\\Server->start()\\n#26 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/apps\\/dav\\/appinfo\\/v2\\/remote.php(31): OCA\\\\DAV\\\\Server->exec()\\n#27 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/remote.php(165): require_once('\\/Users\\/bene\\/Cod...')\\n#28 {main}\",\"File\":\"\\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/doctrine\\/dbal\\/lib\\/Doctrine\\/DBAL\\/Driver\\/AbstractMySQLDriver.php\",\"Line\":36}"
}
{
  "reqId": "qEgihDrngs1YbBdIJtWK",
  "level": 4,
  "time": "2021-04-19T10:25:53+00:00",
  "remoteAddr": "127.0.0.1",
  "user": "Alice",
  "app": "webdav",
  "method": "MKCOL",
  "url": "/px1/remote.php/dav/files/Alice/simple-empty-folder",
  "message": "Caused by: {\"Exception\":\"Doctrine\\\\DBAL\\\\Driver\\\\PDOException\",\"Message\":\"SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction\",\"Code\":\"40001\",\"Trace\":\"#0 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/doctrine\\/dbal\\/lib\\/Doctrine\\/DBAL\\/Connection.php(1073): Doctrine\\\\DBAL\\\\Driver\\\\PDOStatement->execute()\\n#1 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/DB\\/Connection.php(207): Doctrine\\\\DBAL\\\\Connection->executeUpdate('INSERT INTO `oc...', Array, Array)\\n#2 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/doctrine\\/dbal\\/lib\\/Doctrine\\/DBAL\\/Query\\/QueryBuilder.php(210): OC\\\\DB\\\\Connection->executeUpdate('INSERT INTO `oc...', Array, Array)\\n#3 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/DB\\/QueryBuilder\\/QueryBuilder.php(141): Doctrine\\\\DBAL\\\\Query\\\\QueryBuilder->execute()\\n#4 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/DB\\/Adapter.php(198): OC\\\\DB\\\\QueryBuilder\\\\QueryBuilder->execute()\\n#5 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/DB\\/Connection.php(260): OC\\\\DB\\\\Adapter->upsert('*PREFIX*filecac...', Array, Array)\\n#6 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/Cache\\/Cache.php(296): OC\\\\DB\\\\Connection->upsert('*PREFIX*filecac...', Array, Array)\\n#7 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/Cache\\/Cache.php(249): OC\\\\Files\\\\Cache\\\\Cache->insert('files\\/simple-em...', Array)\\n#8 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/Cache\\/Scanner.php(284): OC\\\\Files\\\\Cache\\\\Cache->put('files\\/simple-em...', Array)\\n#9 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/Cache\\/Scanner.php(221): OC\\\\Files\\\\Cache\\\\Scanner->addToCache('files\\/simple-em...', Array, -1)\\n#10 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/Cache\\/Scanner.php(329): OC\\\\Files\\\\Cache\\\\Scanner->scanFile('files\\/simple-em...', 3, '9', false, false)\\n#11 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/Cache\\/Updater.php(124): OC\\\\Files\\\\Cache\\\\Scanner->scan('files\\/simple-em...', false, 3, false)\\n#12 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/View.php(333): OC\\\\Files\\\\Cache\\\\Updater->update('files\\/simple-em...', 1618827953)\\n#13 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/View.php(1238): OC\\\\Files\\\\View->writeUpdate(Object(OCA\\\\Files_Trashbin\\\\Storage), 'files\\/simple-em...')\\n#14 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/View.php(279): OC\\\\Files\\\\View->basicOperation('mkdir', '\\/simple-empty-f...', Array)\\n#15 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/public\\/Events\\/EventEmitterTrait.php(50): OC\\\\Files\\\\View->OC\\\\Files\\\\{closure}(*** sensitive parameters replaced ***)\\n#16 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/View.php(281): OC\\\\Files\\\\View->emittingCall(Object(Closure), Array, 'file', 'create')\\n#17 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/apps\\/dav\\/lib\\/Connector\\/Sabre\\/Directory.php(221): OC\\\\Files\\\\View->mkdir('\\/\\/simple-empty-...')\\n#18 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(1210): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Directory->createDirectory('simple-empty-fo...')\\n#19 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/CorePlugin.php(560): Sabre\\\\DAV\\\\Server->createCollection('files\\/Alice\\/sim...', Object(Sabre\\\\DAV\\\\MkCol))\\n#20 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/sabre\\/event\\/lib\\/WildcardEmitterTrait.php(89): Sabre\\\\DAV\\\\CorePlugin->httpMkcol(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#21 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(472): Sabre\\\\DAV\\\\Server->emit('method:MKCOL', Array)\\n#22 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(253): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#23 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/apps\\/dav\\/lib\\/Server.php(330): Sabre\\\\DAV\\\\Server->start()\\n#24 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/apps\\/dav\\/appinfo\\/v2\\/remote.php(31): OCA\\\\DAV\\\\Server->exec()\\n#25 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/remote.php(165): require_once('\\/Users\\/bene\\/Cod...')\\n#26 {main}\",\"File\":\"\\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/doctrine\\/dbal\\/lib\\/Doctrine\\/DBAL\\/Driver\\/PDOStatement.php\",\"Line\":131}"
}
{
  "reqId": "qEgihDrngs1YbBdIJtWK",
  "level": 4,
  "time": "2021-04-19T10:25:53+00:00",
  "remoteAddr": "127.0.0.1",
  "user": "Alice",
  "app": "webdav",
  "method": "MKCOL",
  "url": "/px1/remote.php/dav/files/Alice/simple-empty-folder",
  "message": "Caused by: {\"Exception\":\"PDOException\",\"Message\":\"SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction\",\"Code\":\"40001\",\"Trace\":\"#0 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/doctrine\\/dbal\\/lib\\/Doctrine\\/DBAL\\/Driver\\/PDOStatement.php(129): PDOStatement->execute(NULL)\\n#1 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/doctrine\\/dbal\\/lib\\/Doctrine\\/DBAL\\/Connection.php(1073): Doctrine\\\\DBAL\\\\Driver\\\\PDOStatement->execute()\\n#2 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/DB\\/Connection.php(207): Doctrine\\\\DBAL\\\\Connection->executeUpdate('INSERT INTO `oc...', Array, Array)\\n#3 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/doctrine\\/dbal\\/lib\\/Doctrine\\/DBAL\\/Query\\/QueryBuilder.php(210): OC\\\\DB\\\\Connection->executeUpdate('INSERT INTO `oc...', Array, Array)\\n#4 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/DB\\/QueryBuilder\\/QueryBuilder.php(141): Doctrine\\\\DBAL\\\\Query\\\\QueryBuilder->execute()\\n#5 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/DB\\/Adapter.php(198): OC\\\\DB\\\\QueryBuilder\\\\QueryBuilder->execute()\\n#6 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/DB\\/Connection.php(260): OC\\\\DB\\\\Adapter->upsert('*PREFIX*filecac...', Array, Array)\\n#7 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/Cache\\/Cache.php(296): OC\\\\DB\\\\Connection->upsert('*PREFIX*filecac...', Array, Array)\\n#8 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/Cache\\/Cache.php(249): OC\\\\Files\\\\Cache\\\\Cache->insert('files\\/simple-em...', Array)\\n#9 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/Cache\\/Scanner.php(284): OC\\\\Files\\\\Cache\\\\Cache->put('files\\/simple-em...', Array)\\n#10 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/Cache\\/Scanner.php(221): OC\\\\Files\\\\Cache\\\\Scanner->addToCache('files\\/simple-em...', Array, -1)\\n#11 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/Cache\\/Scanner.php(329): OC\\\\Files\\\\Cache\\\\Scanner->scanFile('files\\/simple-em...', 3, '9', false, false)\\n#12 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/Cache\\/Updater.php(124): OC\\\\Files\\\\Cache\\\\Scanner->scan('files\\/simple-em...', false, 3, false)\\n#13 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/View.php(333): OC\\\\Files\\\\Cache\\\\Updater->update('files\\/simple-em...', 1618827953)\\n#14 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/View.php(1238): OC\\\\Files\\\\View->writeUpdate(Object(OCA\\\\Files_Trashbin\\\\Storage), 'files\\/simple-em...')\\n#15 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/View.php(279): OC\\\\Files\\\\View->basicOperation('mkdir', '\\/simple-empty-f...', Array)\\n#16 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/public\\/Events\\/EventEmitterTrait.php(50): OC\\\\Files\\\\View->OC\\\\Files\\\\{closure}(*** sensitive parameters replaced ***)\\n#17 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/private\\/Files\\/View.php(281): OC\\\\Files\\\\View->emittingCall(Object(Closure), Array, 'file', 'create')\\n#18 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/apps\\/dav\\/lib\\/Connector\\/Sabre\\/Directory.php(221): OC\\\\Files\\\\View->mkdir('\\/\\/simple-empty-...')\\n#19 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(1210): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Directory->createDirectory('simple-empty-fo...')\\n#20 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/CorePlugin.php(560): Sabre\\\\DAV\\\\Server->createCollection('files\\/Alice\\/sim...', Object(Sabre\\\\DAV\\\\MkCol))\\n#21 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/sabre\\/event\\/lib\\/WildcardEmitterTrait.php(89): Sabre\\\\DAV\\\\CorePlugin->httpMkcol(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#22 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(472): Sabre\\\\DAV\\\\Server->emit('method:MKCOL', Array)\\n#23 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(253): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#24 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/apps\\/dav\\/lib\\/Server.php(330): Sabre\\\\DAV\\\\Server->start()\\n#25 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/apps\\/dav\\/appinfo\\/v2\\/remote.php(31): OCA\\\\DAV\\\\Server->exec()\\n#26 \\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/remote.php(165): require_once('\\/Users\\/bene\\/Cod...')\\n#27 {main}\",\"File\":\"\\/Users\\/bene\\/Code\\/owncloud\\/core-phoenix\\/lib\\/composer\\/doctrine\\/dbal\\/lib\\/Doctrine\\/DBAL\\/Driver\\/PDOStatement.php\",\"Line\":129}"
}

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...
individual-it commented 3 years ago

what fixed the immediate issue in the tests was to make the folder creation async see https://github.com/owncloud/web/pull/4981/files I could not reproduce the issue on Ubuntu 20.04 with MariDB 10.3 nor with MySQL.

To reproduce it easier we could create a K6 load test to do a lot of MKCOL requests in parallel

more locking issues, maybe related:

micbar commented 3 years ago

@jvillafanez You did some improvements for the file locking. Could that be already fixed by these?

jvillafanez commented 3 years ago

You did some improvements for the file locking. Could that be already fixed by these?

Unrelated. This is a DB locking problem we need to investigate. Note that it's the DB the one complaining about a deadlock, not our php code.