-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MySQL's ib_logfile1 cannot be created properly #13329
Comments
The version, that worked properly was probably |
Maybe fallout from #12724, as a wild guess? You could adjust the tunable mentioned in there - I think it's the case that |
And it still the same. |
My three guesses were either the aforementioned thing, they're checking the filesize too soon after creating the file in some exciting fashion (ZFS will, IIUC, actually tell you it's 0 bytes until it winds up flushed out, which can surprise the hell out of things which expect otherwise despite not having forced it to sync), or some as-yet-unknown bug in either Percona or ZFS. You could try fiddling with innodb_use_native_aio in Percona, and if that works, then we have somewhere specific to focus on; otherwise, I'll see about testing it when I get a chance, though I personally am likely to be busy the next couple days. edit: All the results I find from searching that error are from running MySQL versions in containers - is this on baremetal, in a VM, or a container? |
I attached the strace output of |
The above appears to be a different error from the one you mentioned before:
edit to add: I am also now suspicious it is fallout from/related to the thing I mentioned before, once again, because:
|
Now I am a bit confused. So I deleted the mysql datadir.
strace files: |
Also tried with this setting:
It can be changed online, right? |
Sure, changing it online should do the right thing - it certainly did in testing the fix before. |
I also tested it with |
Having gone digging, this really seems like the case in #12745, but that should really be dealt with correctly in 2.1.3 and 2.1.4 (though, notably, not in 2.1.2). So are you absolutely sure both userland and kernel module are 2.1.4 when you're testing? (e.g. "what two lines does e: no, actually, that commit is listed in 2.1.2 too, I just can't use ^F apparently, so even then it should be applying... edit 2: yup, I sure am running 2.1.4 in this Ubuntu 20.04 VM, and it sure is failing like this... |
So no double checking and more confirmation needed? |
Not particularly, no, probably until someone comes up with a good solution. Excitingly, it reproduces on git master (0dd34a1). CC @behlendorf since he wrote the original fix, I'm not sure I'll have time to look into this myself in the next couple days, and "MySQL on ZFS isn't working sometimes" seems bad - tl;dr it seems like doing |
thanks so much for your efforts! |
A couple of data points.
e: Uh-oh, my bisect doesn't have either of the ones from #11900 in the possible culprits, but it does have 4372e96 ... e2: I see something I overlooked in 4372e96, I'll be testing a change after I double-check that this patch is the cause. (It's adding e3: No, I see a better fix, I think... - and it is that patch. |
Okay, I'm about to turn into a pumpkin for most of the day at least, but this corrects the problem at a glance, though it hasn't been run through the test suite yet or had a test added for this failure mode... |
Maybe I missed it in the above conversation, but this seems to be a simple reproducer and easy checker. Working:
Incorrect:
|
You will find something very much like that in the new test case in the
linked PR.
…On Mon, Apr 18, 2022, 2:24 PM Andreas Hasenack ***@***.***> wrote:
Maybe I missed it in the above conversation, but this seems to be a simple
reproducer and easy checker.
Working:
***@***.***:~# touch foo.img
***@***.***:~# fallocate -z -l 10M foo.img
***@***.***:~# l foo.img
-rw-r--r-- 1 root root 10M abr 18 15:12 foo.img
Incorrect:
***@***.***:~# touch foo.img
***@***.***:~# fallocate -z -l 10M foo.img
***@***.***:~# ll foo.img
-rw-r--r-- 1 root root 0 Apr 18 18:06 foo.img
—
Reply to this email directly, view it on GitHub
<#13329 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABUI7KE2DITTVE2NWYOLSDVFWSD3ANCNFSM5TO5X5SQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes #13329 Closes #13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes #13329 Closes #13338
Bug: openzfs/zfs#13329 Signed-off-by: Sam James <sam@gentoo.org>
@rincebrain Do you have any information on the release date? |
We don't expect to tag 2.1.5 for a month or so. However, it may be cherry-picked in to the Ubuntu release sooner, #13338 (comment). |
What's the release policy, when do you release a new version? Unfortunately, I still need to stay on Bionic for a while. @jonathonf my understanding is that you do not cherry pick commits, just automatically build packages upon github releases. Is that correct? |
I just hit this issue. As a temporary workaround until 2.1.5 drops, I made a sparse zvol, partitioned it and formatted it as ext4. MySQL works properly in this configuration. |
@stevenj can you give me some guide for your temp fix? I would need that too. Installing this didnt helped me: https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/4831 |
@obazda20 please delete ./#innodb_redo/#ib_redo0 if it is smaller than 65536 bytes. afterwards restart mysql, then it will throw another error, you should now truncate it to 48M and restart mysql again. This worked for me without data loss. |
This worked for me:
|
With ZFS 1.2.5, you only need to truncate it back to size once, and it should work on subsequent restarts
Check that you are actually running ZFS 2.1.5. Updating it alone isn't enough I believe, you have to reboot the system too. ❯ zfs version
zfs-2.1.5-pve1
zfs-kmod-2.1.5-pve1 |
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do have differing semantics in some ways - in particular, one requires KEEP_SIZE, and the other does not. Also added a zero-range test to catch this, corrected a flaw that made the punch-hole test succeed vacuously, and a typo in file_write. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13329 Closes openzfs#13338
Bug: openzfs/zfs#13329 Signed-off-by: Sam James <sam@gentoo.org>
System information
Describe the problem you're observing
I'm not sure, if it's caused by ZFS, though its probability is quite high.
If I start Percona MySQL Server 8.0 backed with ZFS, I get the following error:
Describe how to reproduce the problem
Create a dataset with recent ZFS version, get it mounted to /var/lib/mysql and initialize a database instance on it (eg.
apt install percona-server-server
). Version 5.7 works properly.I tested Percona only, did not test classic MySQL.
I am pretty sure, it worked with a previous version from York's repository, just don't know, which was that, because I restarted that machine with the recent version.
MySQL works well if the database is created somewhere else, eg. on xfs or ext4 and migrated to ZFS.
The text was updated successfully, but these errors were encountered: