pola-rs/polars · error

POLARS_MEMORY_PREFETCH=madvise_populate_read is not supporte

Error message

POLARS_MEMORY_PREFETCH=madvise_populate_read is not supported by this system

What it means

Panic while parsing POLARS_MEMORY_PREFETCH: the value 'madvise_populate_read' was requested, but MADV_POPULATE_READ is Linux-only and this system is not Linux, so the requested prefetch strategy has no implementation and initialization panics.

Source

Thrown at crates/polars-utils/src/mem.rs:149

                #[cfg(target_family = "unix")]
                {
                    madvise_willneed
                }
                #[cfg(not(target_family = "unix"))]
                {
                    panic!(
                        "POLARS_MEMORY_PREFETCH=madvise_willneed is not supported by this system"
                    );
                }
            },
            Some("madvise_populate_read") => {
                #[cfg(target_os = "linux")]
                {
                    madvise_populate_read
                }
                #[cfg(not(target_os = "linux"))]
                {
                    panic!(
                        "POLARS_MEMORY_PREFETCH=madvise_populate_read is not supported by this system"
                    );
                }
            },
            Some("force_populate_read") => force_populate_read,
            Some(v) => panic!("invalid value for POLARS_MEMORY_PREFETCH: {v}"),
        };

        if verbose {
            let func_name = match memory_prefetch_func as usize {
                v if v == no_prefetch as *const () as usize => "no_prefetch",
                v if v == prefetch_l2 as *const () as usize => "prefetch_l2",
                v if v == madvise_sequential as *const () as usize => "madvise_sequential",
                v if v == madvise_willneed as *const () as usize => "madvise_willneed",
                v if v == madvise_populate_read as *const () as usize => "madvise_populate_read",
                v if v == force_populate_read as *const () as usize => "force_populate_read",
                _ => unreachable!(),
            };

View on GitHub (pinned to 9b5d73fd00)

Solutions

  1. madvise_populate_read is unsupported on this OS; unset POLARS_MEMORY_PREFETCH or choose another mode.

Example fix

unset POLARS_MEMORY_PREFETCH
Defensive patterns

Strategy: fallback

When it happens

Trigger: POLARS_MEMORY_PREFETCH=madvise_populate_read on an unsupported platform.

Common situations: See trigger scenarios.


AI-assisted analysis of pola-rs/polars@9b5d73fd00 (2026-08-19). Data as JSON: /api/errors/0265119c105d2bf7. Report an issue: GitHub.