[MDEV-7218] ARIA, “File size bigger than expected” Created: 2014-11-26 Updated: 2018-10-30 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Aria |
| Affects Version/s: | 5.5.40 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Anthony Lieuallen | Assignee: | Elena Stepanova |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Gentoo Linux, x64 |
||
| Description |
|
On (only) my production server, whenever I wait a while and restart MariaDB, it completely crashes and burns, e.g.:
Endlessly. Indeed:
It's large. I don't use ARIA, at least not on purpose. Apparently it was built with "--with-aria-tmp-tables" and I see no way to control that (at least via Gentoo Ebuild). Each time this happens, I just sudo rm /var/lib/mysql/aria* and get on with my life. But sometimes it takes me a while to realize it's happened. And I'd prefer it just not happen. Given, as mentioned, this only happens on my production server, I'd prefer to do as little destructive/interfering diagnostics as possible. Could someone guide me through the best steps to get the right information to diagnose this? |
| Comments |
| Comment by Elena Stepanova [ 2014-11-26 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi, Are there any errors (or anything remotely interesting) in the log during the previous server "session", before the shutdown? Could you please paste that part, too? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Anthony Lieuallen [ 2014-11-26 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi. First, the log:
That's where the current log ends. I.E. no errors (or anything else in the log) over the course of 4 days. The ARIA file is currently:
About 200 megs, and
It's got a bunch of query logs in it? (I ran strings after a hexdump showed mostly text content. This is MediaWiki traffic semi-clearly.) Over the same period. So maybe it's only my prod server because it's the only one getting significant traffic to log. And if it matters, my.cnf:
(I run under daemontools, which among other things auto-rotates the log data that it receives via stdin.) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-11-26 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
What you pasted here as a result of 'strings /var/lib/mysql/aria_log_control' is in fact a slow query log. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Anthony Lieuallen [ 2014-11-26 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
No wrappers are involved, just "exec /usr/sbin/mysqld --user=mysql", in an environment that consumes stdout and routes it to the logger. I have disabled slow query logging (= 0) for now and I'll report back after it's run for a while to see what happens. In case of problems I'll also try setting particular paths. Perhaps http://bugs.mysql.com/bug.php?id=57690 is related? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-11-26 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Possibly it's somehow related, yes. We'll need to look into it, but I suppose the important thing now is to return your production to normal operation. There is also log-error = dev/stdout in the cnf, so if the error happens again, please (again) check the contents of the aria_log_control file (either the same way via strings, or just try to open it – if it's indeed overridden by slow/error log, then it might be a regular text file). Maybe with the absence of slow log it will get log-error contents. You can also check the intermediate result right away – aria_log_control should be really tiny, like 52 bytes or so. If it's different (and especially if it's growing), then there is still a problem. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Anthony Lieuallen [ 2014-11-29 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
So it's a few days later, and the control file is indeed now still 52 bytes. So I'm changing my config:
No dice, the control file is instantly growing. Ok, remove the links so that these logs will go to plain files. Now I can watch the log files grow, and the aria control file stays at 52 bytes. So apparently the bug is: when the slow query log is enabled and sent to stdout, it ends up in the aria control file instead. The error log will go to stdout correctly. (I've just set it to /dev/stdout in my.cnf again and restarted to confirm.) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-11-29 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Could you please clarify your last comment a bit? That ignored, I'll dig into /dev/stdout + control file issue as described in the last paragraph. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Anthony Lieuallen [ 2014-11-29 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yes they were symlinks (see first three lines), this was a trick from some MySQL bug or SO post (can't find it anymore) that I figured was worth giving a shot. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-11-29 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sorry, right, I missed those completely. Thanks. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-11-29 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Could you please paste the output of ls -l /dev/stdout* ? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Anthony Lieuallen [ 2014-11-29 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-11-29 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Interesting, thanks...
But it should not work... It does not seem directly related to the Aria control problem, just adds some more oddities to the whole thing. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2015-09-22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Michael Widenius [ 2018-10-30 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
aria_log_control should never be more than 100 bytes or so (on my machine it's 52 bytes). The aria_log_control table is opened at start and closed when server stops. It holds the current state of transaction id's for Aria What has apparently happened is that some thread/code has written to the wrong file descriptor. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2018-10-30 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
> Finding out what is in the aria_log_file could help us find where the bug is. Above indicates slow query log. |