[MDEV-24131] 10.5.7 does not build stacktrace-t (OpenBSD) - HAVE_BACKTRACE / HAVE_BACKTRACE_FD missing Created: 2020-11-04 Updated: 2021-02-19 Resolved: 2021-01-28 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Compiling, Platform OpenBSD |
| Affects Version/s: | 10.5.7 |
| Fix Version/s: | 10.2.37, 10.3.28, 10.4.18, 10.5.9 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Brad Smith | Assignee: | Daniel Black |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
The 10.5.7 release does not build.
|
| Comments |
| Comment by Daniel Black [ 2020-11-04 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This looks like a lack of backtrace or backtrace_fd function on OpenBSD.
Should get it to compile. The unit test probably isn't sufficiently meaningful however. It was easier than copying the include/my_stacktrace.h HAVE_BACKTRACE logic to a CMakeList defination to exclude this test. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Brad Smith [ 2020-11-05 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Ah. Thanks. We have a libexecinfo port which provides backtrace() but only tend to use it where absolutely necessary. That bit of code did build and the build is still going. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Brad Smith [ 2020-11-05 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
It built in full after that diff. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2020-11-13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
brad0 can you try the attached Is the built unit test ./unittest/mysys/stacktrace-t successfully built, and does it run returning 0? Expected output isn't pretty, e.g. on linux:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Brad Smith [ 2020-11-13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The output of the test is nuts. I attached a log file with the output. I don't know where the PuTTy PuTTy bit at the end comes from but I noticed the bar at the top of the window which usually as the hostname/IP of the host connected to is now some odd ASCII characters. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2020-11-15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yes, there's terminal escape message that change the title. For the most part unit tests are run with their stderr redirected. Can you try the following? I'm mostly interested in the successful or not return code.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Brad Smith [ 2020-11-16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
From my system...
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2020-11-16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks brad0 Robert, can I get a review on: bb-10.2-danielblack- Merge notes: just keep the func my_safe_print_str before `#else /* _WIN_*/` which keeps it out of `#ifdef HAVE_STACKTRACE` at the top of file. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Robert Bindar [ 2020-11-24 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi brad0 and thank you for reporting this problem! Also, did the patch compile for you? On my OpenBSD 6.8, before getting to this compile error Brad reported, compilation failed with incorrect pointer type from my_alarm.h. A fix for those errors is here: https://github.com/MariaDB/server/compare/bb-10.4-robert...robertbindar:bb-10.4-robert (please note the solution is not very well reasoned about, it was a quick fix to get past the errors), feel free to include that on top of your commit if you can reproduce the failure too. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Brad Smith [ 2020-11-24 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The issue with my_alarm.h appears to be legit. Though I don't see where the build error is. The build does not use -Werror. I don't see what the issue is with my_gethwaddr.c. It builds for us without any warnings at all.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Mingli-Yu [ 2021-01-26 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I run into this issue with mariadb 10.5.8 with below steps and attach the patch 0001-stacktrace-t.c-make-the-test-conditional.patch which used to fix the issue on my side. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Robert Bindar [ 2021-01-26 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hey brad0 and Mingli-Yu, Daniel here had already worked out the patch and I reviewed it, my guess is that Daniel is overloaded with work at the moment and probably didn't get the chance to adjust the patch and push it, we're sorry for the delay. danblack is there anything else stopping your patch from getting pushed? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2021-01-27 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Correct. Sorry for delay. I did mean to go back and adjust it to fix the implicit declaration. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2021-01-28 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks Mingli-Yu, that's a nice simple patch and I've used it. Thank you. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Brad Smith [ 2021-02-19 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I see the patch for | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2021-02-19 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
It will be merged to the following branches. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2021-02-19 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
brad0, it's guaranteed by our release procedure. We always merge from 10.2 (or whatever the lowest branch is) all the way up before the release |