Skip to content

WSL 3.0.1 kernel 6.18: /proc/<pid>/io missing (CONFIG_TASKSTATS not set), crashes Typesense/brpc at startup (regression from 5.15) #41847

Closed

Description

@giorgiospedaledev

Windows Version

10.0.26300.9550

WSL Version

3.0.1.0

Are you using WSL 1, WSL 2, or WSLC?

  • WSL 2
  • WSL 1
  • WSLC

Kernel Version

6.18.40.1-microsoft-standard-WSL2

Distro Version

No response

Other Software

Docker Desktop 4.79.0 (engine 29.5.3, WSL2 backend).
Also visible from Ubuntu 22.04 in WSL. CPU: Intel Core i9-14900K.

Repro Steps

Repro steps

  1. Update WSL to 3.0.1 (`wsl --update`).
  2. Check the kernel interface:
     ```
     $ cat /proc/self/io
     cat: /proc/self/io: No such file or directory
     $ zcat /proc/config.gz | grep TASKSTATS
     # CONFIG_TASKSTATS is not set
     ```
  3. Start any program built on Apache brpc, e.g. Typesense (every version tried: 27.1, 28.0, 29.0, 30.0):
     ```
     docker run --rm typesense/typesense:27.1 --data-dir /tmp --api-key=x
     ```

Expected Behavior

Expected behavior

  `/proc/<pid>/io` exists, as it did with the previous kernel. Typesense starts normally.

Actual Behavior

/proc/<pid>/io does not exist. Typesense exits immediately with SIGSEGV (exit code 139), before writing any log line.

strace (last syscalls before the crash):

openat(AT_FDCWD, "/proc/self/io", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/localtime", O_RDONLY|O_CLOEXEC) = -1 ENOENT
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x8} ---

gdb backtrace (static initialization, before main):

#0 std::__cxx11::basic_string<...>::empty() const
#1 google::LogMessage::Init(...)
#3 google::ErrnoLogMessage::ErrnoLogMessage(...)
#4 bvar::read_proc_io(bvar::ProcIO*)
#5 bvar::ProcIOReader::operator()(bvar::ProcIO*) const
...
#14 __static_initialization_and_destruction_0(int, int)
#15 _GLOBAL__sub_I_default_variables.cpp
#16 __libc_csu_init
#17 __libc_start_main_impl

brpc's default process metrics read /proc/self/io during static initialization. When the file is missing, brpc tries to log the error before glog is initialized, which dereferences a null pointer. The logging bug is brpc's, but it is triggered by the interface missing from this kernel.

Regression

The same containers ran for days without problems on WSL 2.3.26.0 with kernel 5.15.167.4-1. The crash started right after updating to WSL 3.0.1 / kernel 6.18.40.1, with no other changes.

Diagnostic Logs

No response

Activity

  1. giorgiospedaledev commented on Oct 9, 2026

    @giorgiospedaledev
    Author

    Request

    Please re-enable per-task I/O accounting in the WSL kernel config, as in previous kernels:

    CONFIG_TASKSTATS=y
    CONFIG_TASK_XACCT=y
    CONFIG_TASK_IO_ACCOUNTING=y
    

    Besides brpc/Typesense, anything that reads /proc/<pid>/io is affected: for example iotop, the I/O columns of htop, psutil Process.io_counters(), and Prometheus process exporters.

  2. github-actions commented on Oct 9, 2026

    @github-actions
    Contributor

    Logs are required for review from WSL team

    If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
    Otherwise, please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

    How to collect WSL logs

    Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

    Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
    Set-ExecutionPolicy Bypass -Scope Process -Force
    .\collect-wsl-logs.ps1
    

    The script will output the path of the log file once done.

    If this is a networking issue, please use .\collect-wsl-logs.ps1 -LogProfile networking instead, following the instructions in Collect WSL logs for networking issues

    Once completed please upload the output files to this GitHub issue.

    See Collect WSL logs (recommended method).

    If you choose to email these logs instead of attaching them to the bug, please send them to [email protected] with the GitHub issue number in the subject, and include a link to your GitHub issue comment in the message body, and reply with '/emailed-logs'.

  3. added
    wsl2
    on Oct 9, 2026
  4. OneBlue commented on Oct 9, 2026

    @OneBlue
    Collaborator

    Indeed I can see that this was enabled in previous kernel

    Mitchell Levy (@chessturo): Could we bring this back on the next kernel update ?

  5. added
    kconfig
    on Oct 9, 2026
  6. waynegault commented on Oct 22, 2026

    @waynegault

    Still present in WSL 3.0.4.0 (released 2026-10-20), kernel 6.18.54.1-1. The "next kernel update" asked for in this thread did not bring it back, so upgrading to the current release does not clear it.

    Host: Windows 10.0.26200.9711, WSL 3.0.4.0, kernel 6.18.54.1-microsoft-standard-WSL2, stock kernel (no kernel= override in .wslconfig).

    Measured

    $ zcat /proc/config.gz | grep TASKSTATS
    # CONFIG_TASKSTATS is not set
    
    $ ls /proc/self/io /proc/1/io /proc/<pid>/io
    ls: cannot access '/proc/self/io': No such file or directory
    ls: cannot access '/proc/1/io': No such file or directory
    

    This is not a permissions or mount-namespace artefact — the other /proc accounting interfaces read normally on the same kernel:

    /proc/self/stat            OK
    /proc/self/smaps_rollup    OK
    /proc/pressure/io          OK
    

    It is the kconfig, not the build

    Microsoft's own branch config matches the running kernel, so the omission is in the config itself and is fixable there:

    • linux-msft-wsl-6.18.y, Microsoft/config-wsl, line 147: # CONFIG_TASKSTATS is not set
    • linux-msft-wsl-6.6.y, same file: CONFIG_TASKSTATS=y (line 142) and CONFIG_TASK_IO_ACCOUNTING=y (line 145)

    CONFIG_TASK_XACCT depends on CONFIG_TASKSTATS, and CONFIG_TASK_IO_ACCOUNTING depends on CONFIG_TASK_XACCT, so the three have to be re-enabled together, as the original request lists them.

    The cgroup v2 IO statistics are missing for the same reason

    $ cat /sys/fs/cgroup/user.slice/io.stat
    cat: /sys/fs/cgroup/user.slice/io.stat: No such file or directory
    

    So this is not limited to /proc/<pid>/io: cgroup-level IO accounting is also unavailable, which takes out systemd IOAccounting= and the IO columns of systemd-cgtop on 6.18.

    Impact beyond the crash

    Typesense/brpc is the severe case. Workloads that treat /proc/self/io as an optional statistic degrade instead of crashing, and keep logging on every cycle: the OpenClaw gateway on this host reads it to size a SQLite page-cache warm and now records open '/proc/self/io' … ENOENT each time it warms. iotop is unusable on the same kernel (#1989).

    Re-enabling CONFIG_TASKSTATS + CONFIG_TASK_XACCT + CONFIG_TASK_IO_ACCOUNTING on the 6.18 branch would cover all of the above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

kconfigwsl2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions