[MDEV-32251] Crash in stack unwinding during pthread_exit() in centos7-bintar Created: 2023-09-26 Updated: 2023-12-11 Resolved: 2023-12-11 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Compiling |
| Affects Version/s: | 10.4.31 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Kristian Nielsen | Assignee: | Kristian Nielsen |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
On centos7-bintar in buildbot, the test case binlog_encryption.rpl_special_charset crashes during server exit inside the stack unwinding in pthread_exit():
The problem is that the unwind code gets an invalid register number and asserts. The build is made with static linking of some system libraries:
Removing the two flags -static-libgcc and -static-libstdc++ makes the problem go away. It seems problematic to link a few system libraries static like this. I suggest to remove those options. Exact commands to reproduce:
|
| Comments |
| Comment by Daniel Black [ 2023-09-27 ] | ||||||||||||||||||||||||||
|
As it looks like we aren't doing anything particularly wrong, if its reproducible on the RHEL7 we can put in a support ticket for Red Hat to fix. | ||||||||||||||||||||||||||
| Comment by Kristian Nielsen [ 2023-10-28 ] | ||||||||||||||||||||||||||
|
I think we are doing something wrong. Looking deeper at the stack trace (different binary):
So we see that libpthread is linked dynamically, it's calling into (dynamic) And the static libgcc is version 4.8.2, while the dynamic libgcc is a So we are mixing internal functions of two different versions of libgcc. Let's just remove those static link options. We'll get rid of a lot of very | ||||||||||||||||||||||||||
| Comment by Kristian Nielsen [ 2023-12-11 ] | ||||||||||||||||||||||||||
|
This appears to have been fixed, the centos7-bintar builder in buildbot is now no longer using the problematic -static-libgcc -static-libstdc++ options and the builds are looking good now. |