Warning: If you attempt to replicate this it may kill your MySQL installation.
If i include the following text within a tooltip text when creating a field in an entity:
https://
then it breaks MySQL. The first message is an error 500 saying failed to rebuild database. Then any action after returns a 500 at the top of the screen. MySQL gets stuck in a restart loop where it stays alive for about 60 seconds before crashing. I have tested and can replicate this when creating a new varchar field within the Contact entity that included https:// in the tooltip. On a failed system I was able to get into the MySQL logs and it looked like MySQL was crashing shortly after startup when it was trying to run a procedure that accessed the Contacts table.
Here is a snip from the Espo log file after the issue has occurred:
[2022-07-06 21:31:08] WARNING: E_WARNING: PDO::query(): MySQL server has gone away {"code":2,"message":"PDO::query(): MySQL server has gone away","file":"/var/www/html/applicatio
n/Espo/ORM/SqlExecutor.php","line":70} []
[2022-07-06 21:31:08] WARNING: E_WARNING: PDO::query(): Error reading result set's header {"code":2,"message":"PDO::query(): Error reading result set's header","file":"/var/www/h
tml/application/Espo/ORM/SqlExecutor.php","line":70} []
[2022-07-06 21:31:08] ERROR: (HY000) SQLSTATE[HY000]: General error: 2006 MySQL server has gone away; GET /Activities/action/popupNotifications; line: 70, file: /var/www/html/app
lication/Espo/ORM/SqlExecutor.php [] []
[2022-07-06 21:31:08] ERROR: (2006) SQLSTATE[HY000] [2006] MySQL server has gone away; GET /Notification/action/notReadCount; line: 122, file: /var/www/html/application/Espo/ORM/
PDO/DefaultPDOProvider.php [] []
The only solution I could find was to restore a backup of the database, as SQL would not stay alive long enough to do anything in SQL apart from restore a backup.
I have attached an image of creating an entity with tooltiip text that causes the issue.
Espo v7.0.8
PHP 7.3.33
MySQL Version 8.0.29
If i include the following text within a tooltip text when creating a field in an entity:
https://
then it breaks MySQL. The first message is an error 500 saying failed to rebuild database. Then any action after returns a 500 at the top of the screen. MySQL gets stuck in a restart loop where it stays alive for about 60 seconds before crashing. I have tested and can replicate this when creating a new varchar field within the Contact entity that included https:// in the tooltip. On a failed system I was able to get into the MySQL logs and it looked like MySQL was crashing shortly after startup when it was trying to run a procedure that accessed the Contacts table.
Here is a snip from the Espo log file after the issue has occurred:
[2022-07-06 21:31:08] WARNING: E_WARNING: PDO::query(): MySQL server has gone away {"code":2,"message":"PDO::query(): MySQL server has gone away","file":"/var/www/html/applicatio
n/Espo/ORM/SqlExecutor.php","line":70} []
[2022-07-06 21:31:08] WARNING: E_WARNING: PDO::query(): Error reading result set's header {"code":2,"message":"PDO::query(): Error reading result set's header","file":"/var/www/h
tml/application/Espo/ORM/SqlExecutor.php","line":70} []
[2022-07-06 21:31:08] ERROR: (HY000) SQLSTATE[HY000]: General error: 2006 MySQL server has gone away; GET /Activities/action/popupNotifications; line: 70, file: /var/www/html/app
lication/Espo/ORM/SqlExecutor.php [] []
[2022-07-06 21:31:08] ERROR: (2006) SQLSTATE[HY000] [2006] MySQL server has gone away; GET /Notification/action/notReadCount; line: 122, file: /var/www/html/application/Espo/ORM/
PDO/DefaultPDOProvider.php [] []
The only solution I could find was to restore a backup of the database, as SQL would not stay alive long enough to do anything in SQL apart from restore a backup.
I have attached an image of creating an entity with tooltiip text that causes the issue.
Espo v7.0.8
PHP 7.3.33
MySQL Version 8.0.29
Comment