Date: Tue, 25 Jul 2017 23:10:45 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 219399] System panics after several hours of 14-threads-compilation orgies using poudriere on AMD Ryzen... Message-ID: <bug-219399-8-aTlaZT4QSY@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-219399-8@https.bugs.freebsd.org/bugzilla/> References: <bug-219399-8@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D219399 --- Comment #134 from Don Lewis <truckman@FreeBSD.org> --- (In reply to Don Lewis from comment #124) The AMD documentation that I've found is pretty much silent about cross-modifying code. My interpretation of the pseudo-code that I found in= the Intel documentation is that nothing other than the lock followed by CPUID is necessary. They don't mention anything about the need for fence instructio= ns. Is this a Ryzen bug? Yes, it looks like one to me. Do I care, probably no= t.=20 I don't need to run contrived cross-modifying code. I don't think this aff= ects FreeBSD. I suspect that anyplace that we do something like this there is likely be some code that changes the page permissions to remove write access and adds execute access between where the code is written and where it is executed. That is probably sufficient distance to flush out the inconsiste= nt state from the CPU before it tries to execute the code. If this was not the case, I would expect that FreeBSD would hardly run at all on Ryzen. In any case, I think there is a software workaround. Just do a read access= of the newly written instructions before the CPUID. Maybe a fence instruction= is needed as well. I'm surprised that this problem seems to be worse with SMT. I would think = that cross-modifying between threads on the same core would be the best case and running on cores belonging to different CCXes would be the worst case ... --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-219399-8-aTlaZT4QSY>