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

encryption tests report "Duplicate entry" in owncloud log #168

Open
phil-davis opened this issue Dec 10, 2019 · 1 comment
Open

encryption tests report "Duplicate entry" in owncloud log #168

phil-davis opened this issue Dec 10, 2019 · 1 comment

Comments

@phil-davis
Copy link
Contributor

e.g. https://drone.owncloud.com/owncloud/encryption/1028/35/12

{"reqId":"Ol5sGEz6PPigObWBmffH","level":3,"time":"2019-12-10T04:44:02+00:00","remoteAddr":"172.23.0.8","user":"admin","app":"no app in context","method":"POST","url":"\/ocs\/v2.php\/cloud\/users","message":"Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\UniqueConstraintViolationException\",\"Message\":\"An exception occurred while executing 'INSERT INTO `oc_addressbooks` (`uri`, `displayname`, `description`, `principaluri`, `synctoken`) VALUES(?, ?, ?, ?, ?)' with params [\\\"system\\\", \\\"system\\\", \\\"System addressbook which holds all users of this instance\\\", \\\"principals\\\\\\\/system\\\\\\\/system\\\", 1]:\\n\\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'principals\\\/system\\\/system-system' for key 'addressbook_index'\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(169): Doctrine\\\\DBAL\\\\Driver\\\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(145): Doctrine\\\\DBAL\\\\DBALException::wrapException(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'An exception oc...')\\n#2 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(1065): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'INSERT INTO `oc...', Array)\\n#3 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/DB\\\/Connection.php(207): Doctrine\\\\DBAL\\\\Connection->executeUpdate('INSERT INTO `oc...', Array, Array)\\n#4 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Query\\\/QueryBuilder.php(203): OC\\\\DB\\\\Connection->executeUpdate('INSERT INTO `oc...', Array, Array)\\n#5 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/DB\\\/QueryBuilder\\\/QueryBuilder.php(141): Doctrine\\\\DBAL\\\\Query\\\\QueryBuilder->execute()\\n#6 \\\/var\\\/www\\\/owncloud\\\/server\\\/apps\\\/dav\\\/lib\\\/CardDAV\\\/CardDavBackend.php(359): OC\\\\DB\\\\QueryBuilder\\\\QueryBuilder->execute()\\n#7 \\\/var\\\/www\\\/owncloud\\\/server\\\/apps\\\/dav\\\/lib\\\/CardDAV\\\/SyncService.php(116): OCA\\\\DAV\\\\CardDAV\\\\CardDavBackend->createAddressBook('principals\\\/syst...', 'system', Array)\\n#8 \\\/var\\\/www\\\/owncloud\\\/server\\\/apps\\\/dav\\\/lib\\\/CardDAV\\\/SyncService.php(256): OCA\\\\DAV\\\\CardDAV\\\\SyncService->ensureSystemAddressBookExists('principals\\\/syst...', 'system', Array)\\n#9 \\\/var\\\/www\\\/owncloud\\\/server\\\/apps\\\/dav\\\/lib\\\/CardDAV\\\/SyncService.php(216): OCA\\\\DAV\\\\CardDAV\\\\SyncService->getLocalSystemAddressBook()\\n#10 \\\/var\\\/www\\\/owncloud\\\/server\\\/apps\\\/dav\\\/lib\\\/HookManager.php(92): OCA\\\\DAV\\\\CardDAV\\\\SyncService->updateUser(Object(OC\\\\User\\\\User))\\n#11 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/legacy\\\/hook.php(103): OCA\\\\DAV\\\\HookManager->postCreateUser(Array)\\n#12 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Server.php(336): OC_Hook::emit('OC_User', 'post_createUser', Array)\\n#13 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Hooks\\\/EmitterTrait.php(99): OC\\\\Server->OC\\\\{closure}(Object(OC\\\\User\\\\User), '123456')\\n#14 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Hooks\\\/PublicEmitter.php(33): OC\\\\Hooks\\\\BasicEmitter->emit('\\\\\\\\OC\\\\\\\\User', 'postCreateUser', Array)\\n#15 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/User\\\/Manager.php(407): OC\\\\Hooks\\\\PublicEmitter->emit('\\\\\\\\OC\\\\\\\\User', 'postCreateUser', Array)\\n#16 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/public\\\/Events\\\/EventEmitterTrait.php(50): OC\\\\User\\\\Manager->OC\\\\User\\\\{closure}(Array)\\n#17 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/User\\\/Manager.php(409): OC\\\\User\\\\Manager->emittingCall(Object(Closure), Array, 'user', 'create')\\n#18 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/User\\\/Manager.php(383): OC\\\\User\\\\Manager->createUserFromBackend('sharee1', '123456', Object(OC\\\\User\\\\Database))\\n#19 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/public\\\/Events\\\/EventEmitterTrait.php(50): OC\\\\User\\\\Manager->OC\\\\User\\\\{closure}(Array)\\n#20 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/User\\\/Manager.php(389): OC\\\\User\\\\Manager->emittingCall(Object(Closure), Array, 'user', 'create')\\n#21 \\\/var\\\/www\\\/owncloud\\\/server\\\/apps\\\/provisioning_api\\\/lib\\\/Users.php(159): OC\\\\User\\\\Manager->createUser('sharee1', '123456')\\n#22 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/legacy\\\/api.php(179): OCA\\\\Provisioning_API\\\\Users->addUser(Array)\\n#23 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Route\\\/Router.php(342): OC_API::call(Array)\\n#24 \\\/var\\\/www\\\/owncloud\\\/server\\\/ocs\\\/v1.php(63): OC\\\\Route\\\\Router->match('\\\/ocs\\\/cloud\\\/user...')\\n#25 \\\/var\\\/www\\\/owncloud\\\/server\\\/ocs\\\/v2.php(23): require_once('\\\/var\\\/www\\\/ownclo...')\\n#26 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/AbstractMySQLDriver.php\",\"Line\":55}"}
An exception occurred while executing 'INSERT INTO `oc_addressbooks` 
(`uri`, `displayname`, `description`, `principaluri`, `synctoken`) VALUES(?, ?, ?, ?, ?)' with params 
[\\\"system\\\", \\\"system\\\", \\\"System addressbook which holds all users of this instance\\\", \\\"principals\\\\\\\/system\\\\\\\/system\\\", 1]:\\n\\nSQLSTATE[23000]: 
Integrity constraint violation: 1062 
Duplicate entry 'principals\\\/system\\\/system-system' for key 'addressbook_index'\

Investigate - check if it happens in other app tests runs like in user_ldap or files_primary_s3.

@haribhandari07
Copy link
Contributor

haribhandari07 commented Jan 7, 2020

This issue doesn't seem to occur in the current nightly build for the encryption app.

I couldn't find this "duplicate entry" log in the user_ldap app as well.

files_primary_s3 has this issue in both latest as well as master tests https://drone.owncloud.com/owncloud/files_primary_s3/1419/124/13
1

IMO this kind of exception should be handled and the duplicate entry log should not be displayed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants