Skip to content

Instantly share code, notes, and snippets.

View MaskRay's full-sized avatar
🏠
Working from home. Need food

Fangrui Song MaskRay

🏠
Working from home. Need food
View GitHub Profile
@MaskRay
MaskRay / bench.rb
Last active September 1, 2025 17:51
https://maskray.me/blog/2025-08-31-benchmarking-compression-programs program, distributed under the terms of both the MIT license and the Apache License (Version 2.0)
#!/usr/bin/env ruby
# This program downloads and builds several compression utilities, benchmarks their compression and decompression
# performance on a specific input file, and finally generates HTML charts.
require 'benchmark'
require 'digest'
require 'etc'
require 'fileutils'
require 'json'
require 'net/http'
require 'optparse'
@MaskRay
MaskRay / bad.log
Created August 23, 2025 18:21
journalctl-b.log, good vs bad (system freeze)
Aug 23 10:58:15 blitz kernel: Linux version 6.16.1-arch1-1 (linux@archlinux) (gcc (GCC) 15.2.1 20250813, GNU ld (GNU Binutils) 2.45.0) #1 SMP PREEMPT_DYNAMIC Fri, 15 Aug 2025 16:04:43 +0000
Aug 23 10:58:15 blitz kernel: Command line: BOOT_IMAGE=/vmlinuz-linux root=/dev/nvme0n1p3
Aug 23 10:58:15 blitz kernel: x86/CPU: Model not found in latest microcode list
Aug 23 10:58:15 blitz kernel: x86/split lock detection: #AC: crashing the kernel on kernel split_locks and warning on user-space split_locks
Aug 23 10:58:15 blitz kernel: BIOS-provided physical RAM map:
Aug 23 10:58:15 blitz kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009efff] usable
Aug 23 10:58:15 blitz kernel: BIOS-e820: [mem 0x000000000009f000-0x00000000000fffff] reserved
Aug 23 10:58:15 blitz kernel: BIOS-e820: [mem 0x0000000000100000-0x000000005df8afff] usable
Aug 23 10:58:15 blitz kernel: BIOS-e820: [mem 0x000000005df8b000-0x000000005e88afff] reserved
Aug 23 10:58:15 blitz kernel: BIOS-e820: [mem 0x000000005e88b000-0x00000000606befff] usab
@MaskRay
MaskRay / journalctl-b.log
Created August 5, 2025 05:11
Linux version 6.15.8-arch1-2 (linux@archlinux), random freeze
Aug 04 20:13:02 blitz kernel: Linux version 6.15.8-arch1-2 (linux@archlinux) (gcc (GCC) 15.1.1 20250729, GNU ld (GNU Binutils) 2.45.0) #1 SMP PREEMPT_DYNAMIC Tue, 29 Jul 2025 15:05:00 +0000
Aug 04 20:13:02 blitz kernel: Command line: BOOT_IMAGE=/vmlinuz-linux root=/dev/nvme0n1p3
Aug 04 20:13:02 blitz kernel: x86/split lock detection: #AC: crashing the kernel on kernel split_locks and warning on user-space split_locks
Aug 04 20:13:02 blitz kernel: BIOS-provided physical RAM map:
Aug 04 20:13:02 blitz kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009efff] usable
Aug 04 20:13:02 blitz kernel: BIOS-e820: [mem 0x000000000009f000-0x00000000000fffff] reserved
Aug 04 20:13:02 blitz kernel: BIOS-e820: [mem 0x0000000000100000-0x000000005df8afff] usable
Aug 04 20:13:02 blitz kernel: BIOS-e820: [mem 0x000000005df8b000-0x000000005e88afff] reserved
Aug 04 20:13:02 blitz kernel: BIOS-e820: [mem 0x000000005e88b000-0x00000000606befff] usable
Aug 04 20:13:02 blitz kernel: BIOS-e820: [mem 0x00000000606bf000-0x0000000062
@MaskRay
MaskRay / iwlwifi-bug.md
Created July 15, 2025 05:02
iwlwifi bug report, Intel Wi-Fi 7 BE200

Intel(R) Wi-Fi 7 BE200 320MHz, kernel warning and freeze

When I run sudo iwctl station wlan0 connect wifiname for the first time during a boot, iwctl would error

No matching method found
Failed to retrieve IWD dbus objects, quitting...
@MaskRay
MaskRay / journalctl-b.log
Last active July 15, 2025 04:47
Eurocom Blitz Ultra 2, Ubuntu 24.04, no system freeze
Jul 14 18:20:35 blitz kernel: Linux version 6.11.0-29-generic (buildd@lcy02-amd64-008) (x86_64-linux-gnu-gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0, GNU ld (GNU Binutils for Ubuntu) 2.42) #29~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jun 26 14:16:59 UTC 2 (Ubuntu 6.11.0-29.29~24.04.1-generic 6.11.11)
Jul 14 18:20:35 blitz kernel: Command line: BOOT_IMAGE=/boot/vmlinuz-6.11.0-29-generic root=UUID=bbe63c72-8360-4612-996c-1f26ef0ef727 ro quiet splash vt.handoff=7
Jul 14 18:20:35 blitz kernel: KERNEL supported cpus:
Jul 14 18:20:35 blitz kernel: Intel GenuineIntel
Jul 14 18:20:35 blitz kernel: AMD AuthenticAMD
Jul 14 18:20:35 blitz kernel: Hygon HygonGenuine
Jul 14 18:20:35 blitz kernel: Centaur CentaurHauls
Jul 14 18:20:35 blitz kernel: zhaoxin Shanghai
Jul 14 18:20:35 blitz kernel: x86/split lock detection: #AC: crashing the kernel on kernel split_locks and warning on user-space split_locks
Jul 14 18:20:35 blitz kernel: BIOS-provided physical RAM map:
@MaskRay
MaskRay / journalctl-b.log
Created July 13, 2025 03:39
Eurocom Blitz Ultra 2, no kernel "bad"/"oops" record before freezing
Jul 12 16:53:19 hacking kernel: Linux version 6.15.6-arch1-1 (linux@archlinux) (gcc (GCC) 15.1.1 20250425, GNU ld (GNU Binutils) 2.44.0) #1 SMP PREEMPT_DYNAMIC Thu, 10 Jul 2025 17:10:18 +0000
Jul 12 16:53:19 hacking kernel: Command line: initrd=\intel-ucode.img initrd=\initramfs-linux.img root=UUID=2403f944-7fdf-4185-8119-4f6fd8f7f887 rw intel_idle.max_cstate=2
Jul 12 16:53:19 hacking kernel: x86/split lock detection: #AC: crashing the kernel on kernel split_locks and warning on user-space split_locks
Jul 12 16:53:19 hacking kernel: BIOS-provided physical RAM map:
Jul 12 16:53:19 hacking kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009efff] usable
Jul 12 16:53:19 hacking kernel: BIOS-e820: [mem 0x000000000009f000-0x00000000000fffff] reserved
Jul 12 16:53:19 hacking kernel: BIOS-e820: [mem 0x0000000000100000-0x000000005df8afff] usable
Jul 12 16:53:19 hacking kernel: BIOS-e820: [mem 0x000000005df8b000-0x000000005e88afff] reserved
Jul 12 16:53:19 hacking kernel: BIOS-e820: [mem 0x000000005e88b000-0x0000
@MaskRay
MaskRay / journalctl-b.log
Created July 12, 2025 22:41
Eurocom Ultra Blitz 2 freeze 15:25 kernel log, 15:33 freeze
Jul 12 15:12:14 hacking kernel: Linux version 6.15.6-arch1-1 (linux@archlinux) (gcc (GCC) 15.1.1 20250425, GNU ld (GNU Binutils) 2.44.0) #1 SMP PREEMPT_DYNAMIC Thu, 10 Jul 2025 17:10:18 +0000
Jul 12 15:12:14 hacking kernel: Command line: initrd=\intel-ucode.img initrd=\initramfs-linux.img root=UUID=2403f944-7fdf-4185-8119-4f6fd8f7f887 rw intel_idle.max_cstate=2
Jul 12 15:12:14 hacking kernel: x86/split lock detection: #AC: crashing the kernel on kernel split_locks and warning on user-space split_locks
Jul 12 15:12:14 hacking kernel: BIOS-provided physical RAM map:
Jul 12 15:12:14 hacking kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009efff] usable
Jul 12 15:12:14 hacking kernel: BIOS-e820: [mem 0x000000000009f000-0x00000000000fffff] reserved
Jul 12 15:12:14 hacking kernel: BIOS-e820: [mem 0x0000000000100000-0x000000005df8afff] usable
Jul 12 15:12:14 hacking kernel: BIOS-e820: [mem 0x000000005df8b000-0x000000005e88afff] reserved
Jul 12 15:12:14 hacking kernel: BIOS-e820: [mem 0x000000005e88b000-0x0000
@MaskRay
MaskRay / journalctl-b.log
Created July 12, 2025 22:39
Eurocom Blitz Ultra 2 freeze
Jul 12 15:34:14 hacking kernel: Linux version 6.15.6-arch1-1 (linux@archlinux) (gcc (GCC) 15.1.1 20250425, GNU ld (GNU Binutils) 2.44.0) #1 SMP PREEMPT_DYNAMIC Thu, 10 Jul 2025 17:10:18 +0000
Jul 12 15:34:14 hacking kernel: Command line: initrd=\intel-ucode.img initrd=\initramfs-linux.img root=UUID=2403f944-7fdf-4185-8119-4f6fd8f7f887 rw intel_idle.max_cstate=2
Jul 12 15:34:14 hacking kernel: x86/split lock detection: #AC: crashing the kernel on kernel split_locks and warning on user-space split_locks
Jul 12 15:34:14 hacking kernel: BIOS-provided physical RAM map:
Jul 12 15:34:14 hacking kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009efff] usable
Jul 12 15:34:14 hacking kernel: BIOS-e820: [mem 0x000000000009f000-0x00000000000fffff] reserved
Jul 12 15:34:14 hacking kernel: BIOS-e820: [mem 0x0000000000100000-0x000000005df8afff] usable
Jul 12 15:34:14 hacking kernel: BIOS-e820: [mem 0x000000005df8b000-0x000000005e88afff] reserved
Jul 12 15:34:14 hacking kernel: BIOS-e820: [mem 0x000000005e88b000-0x0000
@MaskRay
MaskRay / journalctl-b.log
Created July 12, 2025 06:42
Eurocom Blitz Ultra 2, Arch Linux, Oops: general protection fault, probably for non-canonical address
Jul 11 21:37:24 hacking kernel: Linux version 6.15.6-arch1-1 (linux@archlinux) (gcc (GCC) 15.1.1 20250425, GNU ld (GNU Binutils) 2.44.0) #1 SMP PREEMPT_DYNAMIC Thu, 10 Jul 2025 17:10:18 +0000
Jul 11 21:37:24 hacking kernel: Command line: initrd=\intel-ucode.img initrd=\initramfs-linux.img root=UUID=2403f944-7fdf-4185-8119-4f6fd8f7f887 rw intel_idle.max_cstate=2
Jul 11 21:37:24 hacking kernel: x86/split lock detection: #AC: crashing the kernel on kernel split_locks and warning on user-space split_locks
Jul 11 21:37:24 hacking kernel: BIOS-provided physical RAM map:
Jul 11 21:37:24 hacking kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009efff] usable
Jul 11 21:37:24 hacking kernel: BIOS-e820: [mem 0x000000000009f000-0x00000000000fffff] reserved
Jul 11 21:37:24 hacking kernel: BIOS-e820: [mem 0x0000000000100000-0x000000005df8afff] usable
Jul 11 21:37:24 hacking kernel: BIOS-e820: [mem 0x000000005df8b000-0x000000005e88afff] reserved
Jul 11 21:37:24 hacking kernel: BIOS-e820: [mem 0x000000005e88b000-0x0000
@MaskRay
MaskRay / README.md
Created June 5, 2025 06:21
Debug ld.lld's spurious "address assignment did not converge" error

llvm/llvm-project#113838 "[RISCV] ld.lld: error: relaxation not converged with openssl"

ld.lld @response.txt --noinhibit-exec -o out.30
S=1 ld.lld @response.txt --noinhibit-exec -o out.31