Repository navigation
Exception: Doctrine\\DBAL\\Exception\\DriverException | cannot start web service #12228
Description
Activity
GitMate.io thinks possibly related issues are #7191 (Crash on start with An exception occurred while executing 'CREATE table oc_locks_w2g), #5625 (Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'INSERT INTO
oc_filecache), #8825 (PostgreSQL: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'INSERT INTO "oc_schedulingobjects"), #9462 (Exception during scan), and #6860 (appstoreFetcher Exception).I've taken a closer look at the logs using a JSON browser and there are three consecutive exceptions thrown:
order Exception Message in file oldest PDOExceptionSQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction/data/app/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105middle Doctrine\DBAL\Driver\PDOExceptionSQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction/data/app/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:107newest Doctrine\DBAL\Exception\DriverExceptionAn exception occurred while executing 'INSERT INTO `oc_filecache` (`mimepart`,`mimetype`,`mtime`,`size`,`etag`,`storage_mtime`,`permissions`,`parent`,`checksum`,`path_hash`,`path`,`name`,`storage`) SELECT ?,?,?,?,?,?,?,?,?,?,?,?,? FROM `oc_filecache` WHERE `storage` = ? AND `path_hash` = ? HAVING COUNT(*) = 0' with params ["7", "14", 1494090201, 655, "5bd7567c5e78c", 1494090201, 27, 29827, "", "883e7a025438168eebe9e9a6385f2c73", "mateusz\/komputerowe\/backupy\/ptaszor_z_windowsa\/MIOD-PITNY\/Data\/$OF\/76637\/24955 (2017_05_06 17_54_27 UTC).pyc", "24955 (2017_05_06 17_54_27 UTC).pyc", 5, 5, "883e7a025438168eebe9e9a6385f2c73"]: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction/data/app/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:115And then there is a summarizing CustomMessage:
Exception while scanning file "mateusz/komputerowe/backupy/ptaszor_z_windowsa/MIOD-PITNY/Data/$OF/76637/24955 (2017_05_06 17_54_27 UTC).pyc"which confirms my observation, that file scan caused the the crash.Any clue what can I do next ?
can you have a look in my version of adapter.php as written in #6160 an Test it on a testing machine?
Regards, DanielOk, so I finally had time to investigate, and indeed → your commit fixes the issue: https://github.com/obel1x/server/commit/2370e7b0bdbf1915c7914ba283547caff2787602
Thank you very much 🥇
As the linked PR was superseded by #12371 could you give this a try as well?
I'm giving it a shot
I'm giving it a shot
Ah this seems to be the deadlock that needs to be fixed in a different way. I'm already on it, but don't have a PR ready yet.
- added a commit that references this issue
on Nov 12, 2018 Fix for this is in #12411
- added a commit that references this issue
on Nov 12, 2018 - added 2 commits that reference this issue
on Nov 13, 2018
Let's say the the problem is something like this:
– erroneous parsing of a filepath
– therefore invalid file cache (my uneducated guess: but not necesarrily broken database)
What would be the approach then? I'd be happy to rename/remove those offending files with fancy filepaths, clean the file cache and rerun the scan.
Do you think it is a viable course to take? How to debug more.. Thanks,
–Mateusz
Steps to reproduce
Expected behaviour
regular Nextcloud start
Actual behaviour
Tell us what happens instead
Server configuration
Operating system:
Armbian 5.25 Debian 8 Jessie 4.14.70
Web server:
Apache 2.4.25, with HTTP2 enabled
Database:
MariaDB 10
PHP version:
PHP 7.2
Nextcloud version: (see Nextcloud admin page)
14.0.3.0
Updated from an older Nextcloud/ownCloud or fresh install:
Fresh
Where did you install Nextcloud from:
NextcloudPi flavour run as docker container
List of activated apps:
Nextcloud configuration:
App list:
config.php:
Are you using external storage, if yes which one: local/smb/sftp/...
– federated Nextcloud over internet
– FTP local storage
Are you using encryption: yes/no
no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no
Logs
Web server error log
Web server error log
Web server keep spitting JSONs like this:
few more of them here https://paste.ee/p/36Mch) the only difference is the filename in question
Nextcloud log (data/nextcloud.log)
Nextcloud log
The whole log is 32MiB. There is one very strange line which is 9MiB long… it includes some paths in it, which I enclose below. Seems like parsing of
#sign is dodgy.. idkfilename as in log this is strange. those `#` characters
actual filepath
BONUS offending command log
file content:
log
Every other
occcommand throws the same traceI'm very eager to perform any additional tests per request 🙄