[MDEV-30572] main.large_pages 'innodb' fails on architecture hppa: InnoDB: Operating system error number 14 in a file operation Created: 2023-02-05 Updated: 2023-10-19 Resolved: 2023-09-19 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | 10.11 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Otto Kekäläinen | Assignee: | Daniel Black |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
The official Debian builds of MariaDB 1:10.11.1-2 failed on Debian builders arch hppa with at https://buildd.debian.org/status/fetch.php?pkg=mariadb&arch=hppa&ver=1%3A10.11.1-2&stamp=1675231483&raw=0 with:
The only other recorded case of OS error 14 was in This and other hppa issues tracked downstream in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1006529 |
| Comments |
| Comment by Marko Mäkelä [ 2023-02-06 ] | ||||||||||||||
|
The error code 22 should be EINVAL. The warning message that danblack clarified some time ago is somewhat misleading, because a smaller size would only be attempted if errno==ENOMEM. errno=14 should be EFAULT. My first guess is that there is some fallback that allocates unaligned memory (instead of invoking memalign() or similar), and then an O_DIRECT file operation using an unaligned buffer will fail. | ||||||||||||||
| Comment by Otto Kekäläinen [ 2023-02-06 ] | ||||||||||||||
|
For the record, latest build https://buildd.debian.org/status/fetch.php?pkg=mariadb&arch=hppa&ver=1%3A10.11.1-3&stamp=1675654714&raw=0 of mariadb 1:10.11.1-3 passed but testsuite failed with:
| ||||||||||||||
| Comment by Daniel Black [ 2023-02-06 ] | ||||||||||||||
|
EINVAL in the memory allocation is an invalid length, so it look like hppa putting a wrong error code or populating /sys/kernel/mm/hugepages incorrectly (have I mentioned unsupported arch often enough?). As Marko pointed out, it will only try smaller if ENOMEM. So its returning null. (fixing message now). Further down, EFAULT is "Bad address" so at least that's consistent. O_DIRECT errors I'd expect EINVAL. So I really except EFAULT meaning if trying a read to a memory address that is invalid (null). Could it be a log_t::attach has a ut_malloc_dontdump that fails and an assumption of buf allocated like what occurs in recv_sys_t::find_checkpoint? mariadb-dump error ignored. | ||||||||||||||
| Comment by Daniel Black [ 2023-02-07 ] | ||||||||||||||
|
Corrected large page error message. | ||||||||||||||
| Comment by Otto Kekäläinen [ 2023-02-10 ] | ||||||||||||||
|
The above was backported in https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/7ac10dee3b961cf69b330de23df5f8554450783e to latest Debian build. However, now fails to start at all in https://buildd.debian.org/status/fetch.php?pkg=mariadb&arch=hppa&ver=1%3A10.11.1-4&stamp=1676007600&raw=0 ```
The same upload also had other patches, so what we are seeing might be due to something else as well. Thus I re-opened https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1006529 and I also see that https://jira.mariadb.org/browse/MDEV-30572 remains open. | ||||||||||||||
| Comment by Daniel Black [ 2023-02-13 ] | ||||||||||||||
|
Putting every hppa issue in this one jira issue isn't helpful. Above stack track isn't complete. my_register_filename with just a large filedescriptor seems implausible as is the FileName address, and type_of_file (enum up to 7), though it would segfault on line 140 if this did occur. Without a full stack track I couldn't guess why this occured. The only things to be considered here that I see are:
| ||||||||||||||
| Comment by Marko Mäkelä [ 2023-02-13 ] | ||||||||||||||
|
danblack, I think that my_large_malloc() needs to fall back to the aligned_malloc() wrapper that is defined in include/aligned.h. InnoDB certainly assumes that it gets aligned memory. | ||||||||||||||
| Comment by Otto Kekäläinen [ 2023-02-22 ] | ||||||||||||||
|
Helge Deller reported on the second issue:
| ||||||||||||||
| Comment by Otto Kekäläinen [ 2023-10-19 ] | ||||||||||||||
|
This is passing in latest https://buildd.debian.org/status/fetch.php?pkg=mariadb&arch=hppa&ver=1%3A10.11.5-3&stamp=1697355657&raw=0
|