[MDEV-24375] Semaphore wait has lasted > 600 seconds Created: 2020-12-09 Updated: 2023-04-06 Resolved: 2021-04-12 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.5.7, 10.5.8 |
| Fix Version/s: | 10.2.37, 10.3.28, 10.4.18, 10.5.9 |
| Type: | Bug | Priority: | Major |
| Reporter: | vbvbrj | Assignee: | Marko Mäkelä |
| Resolution: | Duplicate | Votes: | 10 |
| Labels: | innodb, need_feedback | ||
| Environment: |
Server version: 10.5.8-MariaDB-1:10.5.8+maria~focal-log |
||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
I import a schema with all table definition and data to mariadb. File size of the file iz about 150GB. At some point, when importing a 70GB table I receive the following information in log and import is disconnected.
The mariadb server continues working, but importing is stopped. |
| Comments |
| Comment by vbvbrj [ 2020-12-13 ] | ||||||||||||||||||||||
|
Tested! mysqld Ver 10.5.5-MariaDB-1:10.5.5+maria~focal-log for debian-linux-gnu on x86_64 (mariadb.org binary distribution) 10.5.5 does not have this bug. 10.5.7 and 10.5.8 does have this bug. | ||||||||||||||||||||||
| Comment by sjon [ 2020-12-15 ] | ||||||||||||||||||||||
|
I have experienced the same issue for a couple of weeks but been unable to consistently reproduce it. This is 10.5.8 on Archlinux (Unless my timestamps are off) I've even seen this issue on a gtid slave that, according to the bin & slave logs, wasn't doing anything at the timestamp this semaphore was supposedly created. What makes this issue worse is that mariadbd doesn't properly explode, it leaves a hanging process that needs to be killed manually before systemd is able to properly restart it. That process gets killed by the OOM Killer on my servers: InnoDB: ###### Starts InnoDB Monitor for 30 secs to print diagnostic info: and then 5 minutes later: Out of memory: Killed process 327619 (mariadbd) total-vm:3245288kB, anon-rss:2292320kB, file-rss:264kB, shmem-rss:0kB, UID:89 pgtables:5844kB oom_score_adj:0 | ||||||||||||||||||||||
| Comment by Jon Luo [ 2020-12-17 ] | ||||||||||||||||||||||
|
Hi, I have the same issue on 10.5.8, and also on 10.3.27 before (updated to 10.5.8 to see if it would fix it). Occurs every time I try to import a large table. Mine does crash cleanly and restarts properly. For me, it consistently crashes after around 8000 lines of my table are imported. I've resorted to uploading 8000 lines at a time... {{2020-12-17 3:01:41 0 [Warning] InnoDB: A long semaphore wait: | ||||||||||||||||||||||
| Comment by Sebastian Stamm [ 2020-12-17 ] | ||||||||||||||||||||||
|
Same here: InnoDB: ###### Starts InnoDB Monitor for 30 secs to print diagnostic info: | ||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2020-12-17 ] | ||||||||||||||||||||||
|
I suspect that this is simply is a duplicate of Could you download a recent development snapshot package at http://hasky.askmonty.org/archive/10.5/ and see if it fixes the problem? | ||||||||||||||||||||||
| Comment by vbvbrj [ 2020-12-18 ] | ||||||||||||||||||||||
|
The environment is a docker container. Is there a docker container version 10.5.9 for testing? | ||||||||||||||||||||||
| Comment by Mastre Pad [ 2021-01-25 ] | ||||||||||||||||||||||
|
The same problem, mariadb 10.5.8 from centos 7.9 repositories (not a docker container): The server is used for zabbix database (~150GB) | ||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2021-01-25 ] | ||||||||||||||||||||||
|
Sorry, I do not know how to make a Docker container out of the latest development snapshot. The 10.5.9 release could be out next week. | ||||||||||||||||||||||
| Comment by Kfir Itzhak [ 2021-02-14 ] | ||||||||||||||||||||||
|
I am also seeing this, but on 10.3.27 (from CentOS8 repository). I can't load this dump file, it always dies.
But here is the final one
| ||||||||||||||||||||||
| Comment by Kfir Itzhak [ 2021-02-14 ] | ||||||||||||||||||||||
|
I am also seeing this, but on 10.3.27 (from CentOS8 repository). I can't load this dump file, it always dies.
But here is the final one
| ||||||||||||||||||||||
| Comment by Mario Hubert [ 2021-02-14 ] | ||||||||||||||||||||||
|
For KFir itzhak ...
Try disabling auto recalc, restart your database, and load your data and see if this fixes the problem, | ||||||||||||||||||||||
| Comment by Kfir Itzhak [ 2021-02-14 ] | ||||||||||||||||||||||
|
@Mario Hubert I was able to find a workaround and it worked. With 10.3.17 everything is working perfectly. I don't see the warnings in the log anymore, and the 100GB dump loaded successfully. But yep i agree, something in the new versions is definitely broken. | ||||||||||||||||||||||
| Comment by Pablo Guzmán [ 2021-02-17 ] | ||||||||||||||||||||||
|
We recently upgraded from MariaDB 10.2.21 to 10.5.8 (yes, quite leap!) and we jumped straight into this bug which is now affecting our databases. This error appears randomly, related to big queries that are being executed on the server (Appeared once for a big alter, then again for a big INSERT INTO X SELECT FROM Y). When the error appears it can freeze the database server for a few minutes, effectively crashing our servers for those minutes. This is a major bug and it's scary that is has been unresolved for two months now. {{2021-02-16 22:15:19 0 [Note] InnoDB: A semaphore wait: To report this bug, see https://mariadb.com/kb/en/reporting-bugs We will try our best to scrape up some info that will hopefully help Server version: 10.5.8-MariaDB-1:10.5.8+maria~focal-log Thread pointer: 0x0 | ||||||||||||||||||||||
| Comment by Kfir Itzhak [ 2021-03-01 ] | ||||||||||||||||||||||
|
@Mario Hubert This seems to be related to | ||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2021-03-01 ] | ||||||||||||||||||||||
|
mastertheknife, there were two regressions in the previous releases that could explain this. | ||||||||||||||||||||||
| Comment by vbvbrj [ 2021-03-02 ] | ||||||||||||||||||||||
|
Thank you for inputs. Docker repository have version 10.5.9. While because of no space left on master database on the disk, the slave could not be synchronized as binlog files on master became incomplete. I will start from scratch to replicate to the slave and test the import. | ||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2021-03-10 ] | ||||||||||||||||||||||
|
mastertheknife, vbvbrj, pvguzman, does 10.5.9 work for you? | ||||||||||||||||||||||
| Comment by Bunjil [ 2021-03-10 ] | ||||||||||||||||||||||
|
Marko Mäkelä, I was trying to restore a dump (which has 1 TB table) and it couldn't restore it even upto %10 of table. It seems that 10.5.9 fixed the issue. Now it's %15 and still working without any errors or slowness. |