Re: strange compiling problems on AMD Ryzen 5 5600G with freebsd-current

From: tech-lists <tech-lists_at_zyxst.net>
Date: Wed, 05 Jan 2022 14:47:16 UTC
On Wed, Jan 05, 2022 at 06:55:38PM +1100, Peter Jeremy wrote:
>On 2022-Jan-05 00:09:14 +0000, tech-lists <tech-lists@zyxst.net> wrote:
>>Are there known issues with Ryzen 5600G and freebsd-current?
>
>This might be better off on freebsd-current, rather than hackers.

Yeah I was confused about that. Is it a cpu/compiler problem? 
(hackers@) or is it a -current problem?

I raised a thread earlier in -current:
https://lists.freebsd.org/archives/freebsd-current/2022-January/001358.html

Context has changed a bit since then.

>>In particular with building *some* ports. perl5.32 and llvm13
>>fail to build,

perl5.32 failed to build because DTRACE was enabled in its config
and for whatever reason the system didn't like it. It builds and 
installs without it. As DTRACE is enabled by default, I've raised 
a PR at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260947

llvm13 is still failing with a ninja error. I'll try again when
the system is rebuilt.

>I can't answer your question but I have a number of questions for you:
>0) What is the exact version of -current that you're running?

It *was* 14.0-CURRENT #0 main-n252210-3a9688f8bc4: Tue Jan  4 19:50:00 GMT 2022 
it's in the middle of a buildworld rn generic *everything*. Although the above
build was vanilla it still had a src.conf and a make.conf for ccache. This new 
build has neither.

>1) Can you share more details on "fails to build".  Are you in a position
>   to share a build log.

yes I'll do so as soon as it's done this completely generic build.

>2) Are you using ECC RAM?  Have you run memtest86 or similar?

I don't know. The machine is remote. Need to see if memtest is in ports.
This is the output from dmidecode:

Memory Device
   Array Handle: 0x0010
   Error Information Handle: 0x0018
   Total Width: 64 bits
   Data Width: 64 bits
   Size: 16 GB
   Form Factor: DIMM
   Set: None
   Locator: DIMM 1
   Bank Locator: P0 CHANNEL A
   Type: DDR4
   Type Detail: Synchronous Unbuffered (Unregistered)
   Speed: 3200 MT/s
   Manufacturer: Unknown
   Serial Number: 00000000
   Asset Tag: Not Specified
   Part Number: CMK32GX4M2D3200C16  
   Rank: 2
   Configured Memory Speed: 3200 MT/s
   Minimum Voltage: 1.2 V
   Maximum Voltage: 1.2 V
   Configured Voltage: 1.2 V
   Memory Technology: DRAM
   Memory Operating Mode Capability: Volatile memory
   Firmware Version: Unknown
   Module Manufacturer ID: Bank 3, Hex 0x9E
   Module Product ID: Unknown
   Memory Subsystem Controller Manufacturer ID: Unknown
   Memory Subsystem Controller Product ID: Unknown
   Non-Volatile Size: None
   Volatile Size: 16 GB
   Cache Size: None
   Logical Size: None

>3) Have you tried (eg) FreeBSD-13 instead of -current?

No not yet, that would be my next step after this build
and if possible, memtest

>I presume that means a previous kernel/world could build/install world.
>4) Have you tried a buildworld with your problematic install?

this is running right now

>>I'm wondering if there's something like a sysctl I need to
>>tweak for this cpu.
>
>Any CPU-specific tweaks would be in the kernel.

it's been suggested in various places in other contexts but with 
ryzen to add kern.sched.steal_thresh=0 in /etc/sysctl.conf and 

machdep.idle=spin
machdep.hyperthreading_allowed=0

to /boot/loader.conf

>(FTR, I have an AMD 5600X that's happily/stably running 13-stable).

Have you clocked it in the bios? Which motherboard do you use?
Does it have any special settings in sysctl or loader.conf?

This system:

Base Board Information
   Manufacturer: ASRock
   Product Name: B450 Steel Legend
-- 
J.