suaefar / ryzen-test

Tools to reproduce randomly crashing processes under load on AMD Ryzen processors on Linux
GNU General Public License v3.0
224 stars 59 forks source link

on archlinux the gcc 7.1 build fails #6

Closed ChristophHaag closed 7 years ago

ChristophHaag commented 7 years ago

But not because of a segfault

./md-unwind-support.h: In function 'x86_64_fallback_frame_state':
./md-unwind-support.h:65:47: error: dereferencing pointer to incomplete type 'struct ucontext'
       sc = (struct sigcontext *) (void *) &uc_->uc_mcontext;
                                               ^~

Sounds like the gcc 7.2 sources should compile: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81712

BuzzBumbleBee commented 7 years ago

@ChristophHaag see my PR, seems to work fine on arch (as of yesterday) for me

suaefar commented 7 years ago

Sorry, but I had to remove the support for Arch. I suppose Arch users know what to do to get the script running, or how to reproduce the buggy behaviour for that matter. The problem with Arch is, that I can't rely on a standard version of, e.g., gcc. The reference implementation will be based on Ubuntu.

ttbek commented 6 years ago

I updated my Arch yesterday and got this error running the script this morning, if it is fixed upstream it may not have filtered down into Arch yet. Before my update it was building on Arch quite happily. I get that you only want to support a single OS, but it will be good for people to know they may encounter this issue, I will update the AMD forum thread. I'm not quite clear on the referenced link, they updated gcc or glib? Looks like gcc to me, so they decided glib is behaving correctly. I did switch to gcc-multilib (needed to make some 32 bit static binaries) though, maybe the change didn't reach the multilib version yet.
I wouldn't assume Arch users are necessarily that much more advanced.... I'm actually running Arch because when I was installing my OS Ubuntu had significant problems running on the Gigabyte X370 K7 board.... and turns out Gigabyte doesn't give a hoot.

Oxalin commented 6 years ago

Not related to rolling release distributions. Problem comes with glib 2.26 under gcc 7.1.0 known bug and fixed, but not backported), which is fixed under gcc 7.2: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81712

Updating the script to download gcc 7.2.0 (.tar.xz please) should fix the problem.

Cimbali commented 6 years ago

FYI the problem is just that struct ucontext doesn't exist anymore in glibc 2.26.

As a workaround to compile gcc code with glibc 2.26+ you can change struct ucontext to ucontext_t in the gcc source.