[MDEV-26495] [ERROR] [FATAL] InnoDB: fdatasync() returned 13 Created: 2021-08-29 Updated: 2023-12-15 Resolved: 2023-12-15 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.5.11 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Colin GILLE | Assignee: | Daniel Black |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Kubernetes / mariadb official docker image 10.5.11 |
||
| Description |
|
I have had multiple mariadb hang in multiple container. The mariadb data directory is stored on an NFS share. I don't know why this error arrise, it doesn't seem to be related to mariadb itself as the system call is failing, but the error could be better handled as the mariadb server goes unresponsive. That would allow Kubernetes (or any other container / process manager) to restart the process. Here are the errors :
|
| Comments |
| Comment by Daniel Black [ 2021-08-30 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Its not listed in the return codes of https://man7.org/linux/man-pages/man2/fdatasync.2.html Normally permission errors are registered when the opening of a file occurs so something is going on that odd. I looked though the nfs kernel code and whatever is causing the EPERM is rather deep, or just communicated from the server side. You may be able to tune your way out of this. Pay attention to your NFS mount options, server options and the stats on NFS. Using something link nfsdist from bcc-tools (is a package, but source https://github.com/iovisor/bcc/blob/master/tools/nfsdist.py) will help get a better idea of the latency. Its missing a trace on the commit, so you can add this by editing the script:
You can also use bpftrace https://github.com/iovisor/bpftrace/blob/master/docs/reference_guide.md#2-kprobekretprobe-dynamic-tracing-kernel-level-arguments to find out which is causing it.
I think the above are all tracing the nfs client and the error could be also coming directly from the server. The above looks like it is crashing in an assertion on error, once it does get a response. For an autokill off option I suspect something outside of mariadb might be easier especially for syscalls like fdatasync that don't have a timeout value. If you restart mariadb on a storage that times out I'm not sure you've solved the problem either. I hope you can resolve this by tuning NFS in some way. I'd like to see what you discovered and how so it can help others too. | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2023-12-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Congelli501, do you have any update on this? | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Colin GILLE [ 2023-12-15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
I haven't seen this problem in the last 2 years with updated versions of Mariadb, I think we can close the issue. | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2023-12-15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks Congelli501. Glad it hasn't reoccurred, whatever the cause was. |