| Summary: | databases/mariadb105-server and databases/mariadb104-server: Fix SIGILL from __builtin_readcyclecounter on ARM platforms | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Ports & Packages | Reporter: | Naram Qashat <cyberbotx> | ||||||
| Component: | Individual Port(s) | Assignee: | Bernard Spil <brnrd> | ||||||
| Status: | Closed Overcome By Events | ||||||||
| Severity: | Affects Some People | CC: | brnrd, freebsd, vvd | ||||||
| Priority: | --- | Keywords: | crash, needs-qa | ||||||
| Version: | Latest | Flags: | bugzilla:
maintainer-feedback?
(brnrd) koobs: merge-quarterly? |
||||||
| Hardware: | arm64 | ||||||||
| OS: | Any | ||||||||
| See Also: | https://jira.mariadb.org/browse/MDEV-23249 | ||||||||
| Attachments: |
|
||||||||
|
Description
Naram Qashat
2020-07-22 01:38:42 UTC
Thank you Naram. Could you: - Clarify if any other mariadb port versions are affected? - Include your patch as an attachment - Confirm the change passes QA (portlint, poudriere) Created attachment 216648 [details]
patch-MDEV-23249
Only the ports listed in the subject are affected. As mentioned in the initial comment, the problem was introduced in 10.4.7, and 10.5 was created sometime after that. The MariaDB JIRA report lists every affected version.
The attached patch can be cleanly applied to both ports as the code for include/my_rdtsc.h is identical in both.
I have only tested compiling maria105-server in poudriere for 12-aarch64. As I have made no changes to the Makefile I did not check portlint nor do I feel I need to. The port still compiles even with the given patch.
Created attachment 216668 [details] patch-MDEV-23249 I'm replacing the patch after some information from some MariaDB devs in the JIRA report. The new patch combines what I did in the previous patch with the pull request here: https://github.com/MariaDB/server/pull/1620 I did change the conditional in the previous patch from __arm__ to __aarch64__, as the former was not defined on the RPi3 which I'm running aarch64 on. I do not have access to a 32-bit ARM system to know if __build_readcyclecounter causes a SIGILL on that architecture or not. One other note, this patch will only be needed temporarily, until MariaDB 10.4.14 and 10.5.5 land, as this will be fixed upstream in those versions. MariaDB 10.4.14 and 10.5.5 both came out yesterday, and appear to include this fix upstream. Considering this is a 100% blocker from running either version of MariaDB on some ARM platforms at all, it would be nice to see these new versions land in ports soon. I'd say that once the ports have been updated to those versions, this patch will be entirely unnecessary then. Perhaps it should be kept open until the ports are updated, however. I just finished building mariadb105-server 10.5.5 locally, and can confirm that it is at least up and running on my Pi3b+ and I can do basic read/writing (have not tried anything more complex yet) - but this is certainly a lot better than crashing on load! :) (In reply to Vincent Milum Jr from comment #7) databases/mariadb105-{server,client}: update to 10.5.5 + optimization: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248677 This is merged in 10.5.5. Though this hunk seems to be missing? include/my_rdtsc.h @@ -26,7 +26,7 @@ # ifndef __has_builtin # define __has_builtin(x) 0 /* Compatibility with non-clang compilers */ # endif -# if __has_builtin(__builtin_readcyclecounter) +# if __has_builtin(__builtin_readcyclecounter) && !defined(__aarch64__) # elif defined _WIN32 # include <intrin.h> # elif defined __i386__ || defined __x86_64__ closing for now, let me know if further work needs to be done. |