Skip to content

runtime: crash if missing 32-bit time compat on Arm 32-bit Linux #75133

@orangecms

Description

@orangecms

Go currently uses the 32-bit futex syscall for Arm Linux:

#define SYS_futex (SYS_BASE + 240)

Since torvalds/linux@00bf25d, this requires Linux to be configured with CONFIG_COMPAT_32BIT_TIME, or Go would need to switch to the newer futex_time64 syscall.

See the syscall table for Arm in Linux:
https://github.com/torvalds/linux/blob/1b237f190eb3d36f52dffe07a40b5eb210280e00/arch/arm/tools/syscall.tbl#L258

  240	common	futex			sys_futex_time32

further down

  422	common	futex_time64			sys_futex

I am not seeing the minimum requirements mention this at this point: https://go.dev/wiki/MinimumRequirements

My suggestion is to switch to the newer syscall.
We have for now documented the Kconfig option in u-root.

For reference, this is how I found it:
u-root/u-root#3442
This is the crash, as it would be seen:
https://gist.github.com/orangecms/d7a8a59ec9dc28b74a20da09ff2db3ec

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReportIssues describing a possible bug in the Go implementation.NeedsFixThe path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.help wanted

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions