NEXTCLOUD : Error : SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock

Sur NEXTCLOUD j’ai l’erreur : SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock;

Mes versions :

  • NEXTCLOUD : 20.0.1 ( command : sudo -u www-data php /var/www/html/nextcloud/occ –version )
  • MARIADB : 10.3.25-MariaDB-0+deb10u1 Debian 10
  • PHP : 7.3.19-1~deb10u1
  • OS : Debian 10

Quand j’essaye de voir ou est le problème :

MariaDB [(none)]> SHOW ENGINE INNODB STATUS;
...
| InnoDB |      | 
=====================================
2020-11-17 09:19:30 0x7fa224b77700 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 15 seconds
-----------------
BACKGROUND THREAD
-----------------
srv_master_thread loops: 461 srv_active, 0 srv_shutdown, 600286 srv_idle
srv_master_thread log flush and writes: 600676
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 98430
OS WAIT ARRAY INFO: signal count 85332
RW-shared spins 64094, rounds 1791314, OS waits 59076
RW-excl spins 22498, rounds 84684, OS waits 850
RW-sx spins 1924, rounds 35426, OS waits 904
Spin rounds per wait: 27.95 RW-shared, 3.76 RW-excl, 18.41 RW-sx
------------------------
LATEST DETECTED DEADLOCK
------------------------
2020-11-14 16:45:09 0x7fa23828d700
*** (1) TRANSACTION:
TRANSACTION 506754, ACTIVE 0 sec starting index read
mysql tables in use 1, locked 1
LOCK WAIT 7 lock struct(s), heap size 1128, 7 row lock(s), undo log entries 3
MySQL thread id 33716, OS thread handle 140334704551680, query id 602553 localhost farias Updating
UPDATE `oc_file_locks` SET `lock` = `lock` - '1' WHERE (`key` IN ('files/f3c7b68359c596992199b90449d7ff8c', 'files/5a2eaa89d932ecbb1dfec1006109244b', 'files/b34c1fc8665aefe70b8e44d4ac09aa67', 'files/994269d0fc31eeda97e0469ed6ab8da3', 'files/d6a2d20758f30740cbecca7cc8b13233', 'files/8853c6e699dd4e7e2655f41918e5a1d2', 'files/3320d1d40cdf4b94707b61cda6ecae0b', 'files/2af4fbefe05ca8c38046394574650bed', 'files/c5f55069bcd203aaa95e4290aabd8c8b', 'files/5aa7bb013dd77e1cdc270e19760a6a23', 'files/d4be38ed80c9b1bf63e3bf45937fb8cd', 'files/ecaafc552486d9c983da23ce46dd72eb', 'files/bbeee26a3ecfeb7ea06dc35abfdff76b', 'files/69f5b0b8e324f92f590b6211eb6c96a1', 'files/5f57699c6ab4f6f04e2c1649ded34919', 'files/c122984832ebf9f0484fd06b33caf6ca', 'files/7c240806d390dc989d67aeb310ce09ac', 'files/d183dc061d795de42af22fbdac8d9ace', 'files/64149897c3515f6526f20690d6cdaa86', 'files/2cd2b02ce9f36f5a067cf8d8e205f34e', 'files/bac5d6b465c
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 39 page no 53 n bits 232 index lock_key_index of table `nextclouddb`.`oc_file_locks` trx id 506754 lock_mode X locks rec but not gap waiting
Record lock, heap no 25 PHYSICAL RECORD: n_fields 2; compact format; info bits 0
 0: len 30; hex 66696c65732f356132656161383964393332656362623164666563313030; asc files/5a2eaa89d932ecbb1dfec100; (total 38 bytes);
 1: len 8; hex 0000000000004b43; asc       KC;;

*** (2) TRANSACTION:
TRANSACTION 506747, ACTIVE 0 sec inserting
mysql tables in use 1, locked 1
16 lock struct(s), heap size 1128, 16 row lock(s), undo log entries 6
MySQL thread id 33717, OS thread handle 140334703630080, query id 602561 localhost farias Update
INSERT INTO `oc_file_locks` (`key`, `lock`, `ttl`) VALUES('files/3320d1d40cdf4b94707b61cda6ecae0b', '1', '1605372309')
*** (2) HOLDS THE LOCK(S):
RECORD LOCKS space id 39 page no 53 n bits 232 index lock_key_index of table `nextclouddb`.`oc_file_locks` trx id 506747 lock mode S
Record lock, heap no 25 PHYSICAL RECORD: n_fields 2; compact format; info bits 0
 0: len 30; hex 66696c65732f356132656161383964393332656362623164666563313030; asc files/5a2eaa89d932ecbb1dfec100; (total 38 bytes);
 1: len 8; hex 0000000000004b43; asc       KC;;

*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 39 page no 39 n bits 352 index lock_key_index of table `nextclouddb`.`oc_file_locks` trx id 506747 lock mode S waiting
Record lock, heap no 111 PHYSICAL RECORD: n_fields 2; compact format; info bits 0
 0: len 30; hex 66696c65732f333332306431643430636466346239343730376236316364; asc files/3320d1d40cdf4b94707b61cd; (total 38 bytes);
 1: len 8; hex 0000000000004b4b; asc       KK;;

*** WE ROLL BACK TRANSACTION (1)
------------
TRANSACTIONS
------------
Trx id counter 546878
Purge done for trx's n:o < 546878 undo n:o < 0 state: running but idle
History list length 0
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 421809682043144, not started
0 lock struct(s), heap size 1128, 0 row lock(s)
---TRANSACTION 421809682038928, not started
0 lock struct(s), heap size 1128, 0 row lock(s)
--------
FILE I/O
--------
I/O thread 0 state: waiting for completed aio requests (insert buffer thread)
I/O thread 1 state: waiting for completed aio requests (log thread)
I/O thread 2 state: waiting for completed aio requests (read thread)
I/O thread 3 state: waiting for completed aio requests (read thread)
I/O thread 4 state: waiting for completed aio requests (read thread)
I/O thread 5 state: waiting for completed aio requests (read thread)
I/O thread 6 state: waiting for completed aio requests (write thread)
I/O thread 7 state: waiting for completed aio requests (write thread)
I/O thread 8 state: waiting for completed aio requests (write thread)
I/O thread 9 state: waiting for completed aio requests (write thread)
Pending normal aio reads: [0, 0, 0, 0] , aio writes: [0, 0, 0, 0] ,
 ibuf aio reads:, log i/o's:, sync i/o's:
Pending flushes (fsync) log: 0; buffer pool: 0
2613 OS file reads, 488009 OS file writes, 304247 OS fsyncs
0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 9, seg size 11, 41 merges
merged operations:
 insert 43, delete mark 724, delete 8
discarded operations:
 insert 0, delete mark 0, delete 0
Hash table size 34679, node heap has 2 buffer(s)
Hash table size 34679, node heap has 5 buffer(s)
Hash table size 34679, node heap has 2 buffer(s)
Hash table size 34679, node heap has 2 buffer(s)
Hash table size 34679, node heap has 3 buffer(s)
Hash table size 34679, node heap has 8 buffer(s)
Hash table size 34679, node heap has 7 buffer(s)
Hash table size 34679, node heap has 10 buffer(s)
0.00 hash searches/s, 0.00 non-hash searches/s
---
LOG
---
Log sequence number 536481738
Log flushed up to   536481738
Pages flushed up to 536481738
Last checkpoint at  536481729
0 pending log flushes, 0 pending chkp writes
211673 log i/o's done, 0.00 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total large memory allocated 170655744
Dictionary memory allocated 615072
Buffer pool size   8192
Free buffers       4922
Database pages     2746
Old database pages 993
Modified db pages  0
Percent of dirty pages(LRU & free pages): 0.000
Max dirty pages percent: 75.000
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 3994, not young 1406
0.00 youngs/s, 0.00 non-youngs/s
Pages read 2351, created 395, written 247428
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
No buffer pool page gets since the last printout
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 2746, unzip_LRU len: 1013
I/O sum[42]:cur[0], unzip sum[0]:cur[0]
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
0 read views open inside InnoDB
Process ID=645, Main thread ID=140333945968384, state: sleeping
Number of rows inserted 14499, updated 74567, deleted 5768, read 9673725
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
Number of system rows inserted 0, updated 0, deleted 0, read 18326
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
============================

Je n’arrive pas à trouver le problème.

Misère.

 

Hold Up Le Documentaire : Tour d’horizon de la presse

Le mieux est de regarder cette vidéo :

Liste des articles de presse :

 

A suivre.

Hold Up le documentaire complotiste … quelle misère de voir ceci en France.

Jamais je n’ai vu autant de message indiquant qu’un documentaire était complotiste. L’heure est grave …

Je vous conseille donc ne ne pas relayer ce documentaire. Encore une fois c’est le cocktail : FN / UPR / Raoult / Reseaux sociaux (Sophie Marceau, Carla Bruni, …) / CNews / Qanon .

Misère.

https://twitter.com/Asclepios_YT/status/1327322771744022530

 

Comment ajouter un disque externe vierge à un serveur Débian ?

Etape 1 : Localisation du disque avec la command fdisk :

# fdisk -l
Disk /dev/sda: 238,5 GiB, 256060514304 bytes, 500118192 sectors
Disk model: SMI             
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B9D6E0E3-54C2-41BC-BBF8-3464FCE6A229

Device         Start       End   Sectors  Size Type
/dev/sda1       2048    999423    997376  487M EFI System
/dev/sda2     999424  98656255  97656832 46,6G Linux filesystem
/dev/sda3   98656256 469749759 371093504  177G Linux filesystem
/dev/sda4  469749760 500117503  30367744 14,5G Linux swap


Disk /dev/sdb: 111,8 GiB, 120034123776 bytes, 234441648 sectors
Disk model: KINGSTON SA400S3
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x7ac27f0a

Device     Boot Start       End   Sectors   Size Id Type
/dev/sdb1        2048 234441647 234439600 111,8G 83 Linux


Disk /dev/sdc: 931,5 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: Portable SSD T5 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33553920 bytes
Disklabel type: dos
Disk identifier: 0x7beb508f

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdc1        2048 1953522112 1953520065 931,5G  7 HPFS/NTFS/exFAT

# fdisk -l  /dev/sdc1
Disk /dev/sdc1: 931,5 GiB, 1000202273280 bytes, 1953520065 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33553920 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device      Boot      Start        End    Sectors  Size Id Type
/dev/sdc1p1      4294967295 8589934589 4294967295    2T ff BBT
/dev/sdc1p2      4294967295 8589934589 4294967295    2T ff BBT
/dev/sdc1p3      4294967295 8589934589 4294967295    2T ff BBT
/dev/sdc1p4      4294967295 6854241533 2559274239  1,2T ff BBT

La premiere commande localise mon nouveau disque, avec la seconde j’ai plus de détail.

Etape 2 : Formatage, pas question de laisser en mode Windows

# sudo mkfs.ext3 /dev/sdc1
mke2fs 1.44.5 (15-Dec-2018)
/dev/sdc1 contains a exfat file system labelled 'Samsung_T5'
Proceed anyway? (y,N) y
Creating filesystem with 244190008 4k blocks and 61054976 inodes
Filesystem UUID: 6db583fc-825f-4a0c-9ea5-dbb79bd6ae9f
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
	102400000, 214990848

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done 

Ou mieux en ext4 :

# sudo mkfs.ext4 /dev/sdc1
mke2fs 1.44.5 (15-Dec-2018)
/dev/sdc1 contains a ext3 file system
	created on Fri Nov 13 11:49:54 2020
Proceed anyway? (y,N) y
Creating filesystem with 244190008 4k blocks and 61054976 inodes
Filesystem UUID: bf1d9240-ba6d-4230-8e4e-dd20218231e8
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
	102400000, 214990848

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done  

Etape 3 : Le montage automatique :

# mkdir /media/usbdisk-1

Voir le uuid :

# ls -l /dev/disk/by-uuid/*
lrwxrwxrwx 1 root root 10 nov.  10 10:20 /dev/disk/by-uuid/1D2E-E63C -> ../../sda1
lrwxrwxrwx 1 root root 10 nov.  10 10:20 /dev/disk/by-uuid/5fa91220-4d17-485d-bb7d-3e41fc04e15b -> ../../sda2
lrwxrwxrwx 1 root root 10 nov.  10 10:20 /dev/disk/by-uuid/64b51c15-9706-4ac5-a369-774ce9539762 -> ../../sda3
lrwxrwxrwx 1 root root 10 nov.  13 15:05 /dev/disk/by-uuid/bf1d9240-ba6d-4230-8e4e-dd20218231e8 -> ../../sdc1
lrwxrwxrwx 1 root root 10 nov.  10 10:20 /dev/disk/by-uuid/c8478b72-fcaf-4dc7-87a7-5156cc19efab -> ../../sdb1
lrwxrwxrwx 1 root root 10 nov.  10 10:20 /dev/disk/by-uuid/d4f59815-be3d-437c-b204-ca794d170ce9 -> ../../sda4

Ajouter dans /etc/fstab :

UUID=bf1d9240-ba6d-4230-8e4e-dd20218231e8 /media/usbdisk-1 ext4 errors=remount-ro 0 1

Monter le disque ensuite :

# mount /media/usbdisk-1
# df -h
Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur
udev               3,9G       0  3,9G   0% /dev
tmpfs              783M     66M  718M   9% /run
/dev/sda2           46G    7,3G   37G  17% /
tmpfs              3,9G    8,0K  3,9G   1% /dev/shm
tmpfs              5,0M       0  5,0M   0% /run/lock
tmpfs              3,9G       0  3,9G   0% /sys/fs/cgroup
/dev/sdb1          110G     43G   62G  42% /mnt/backup
/dev/sda1          487M    5,2M  481M   2% /boot/efi
/dev/sda3          174G     30G  135G  19% /home
tmpfs              783M    4,0K  783M   1% /run/user/112
tmpfs              783M       0  783M   0% /run/user/1000
/dev/sdc1          916G     77M  870G   1% /media/usbdisk-1

C’est fini !