Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crashes,hangs and filesystem corruption while compiling with GCC #12565

Open
1 of 2 tasks
JordanYates opened this issue Feb 8, 2025 · 4 comments
Open
1 of 2 tasks

crashes,hangs and filesystem corruption while compiling with GCC #12565

JordanYates opened this issue Feb 8, 2025 · 4 comments

Comments

@JordanYates
Copy link

Windows Version

Microsoft Windows [Version 10.0.26100.2894]

WSL Version

2.4.10.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.167.4-1

Distro Version

Ubuntu 24.04

Other Software

arm-zephyr-eabi-gcc: (Zephyr SDK 0.16.8) 12.2.0

Repro Steps

Cross compiling embedded software, specifically Zephyr RTOS.

while [ 1 ]
do
    rm -rf build
    west build -b nrf52840dk/nrf52840 zephyr/samples/hello_world
done

Expected Behavior

Compiling should complete without problems.

Actual Behavior

Three different failure modes have been observed.

  1. WSL instance crashes:
jordan@TAURUS:~/code/workspace$
[process exited with code 1 (0x00000001)]
You can now close this terminal with Ctrl+D, or press Enter to restart.
  1. VHD disk becomes corrupted, is remounted as read-only
jordan@TAURUS:~/code/workspace$ touch test.txt
touch: cannot touch 'test.txt': Read-only file system
  1. C compiler process hangs forever in a mmap syscall
jordan@TAURUS:~$ sudo cat /proc/23923/stack
[<0>] rwsem_down_write_slowpath+0x1a4/0x4e0
[<0>] vm_mmap_pgoff+0xaa/0x180
[<0>] do_syscall_64+0x35/0xb0
[<0>] entry_SYSCALL_64_after_hwframe+0x6c/0xd6

Diagnostic Logs

Failure 1:
WslLogs-2025-02-08_11-15-54_Crash.zip
Failure 2:
WslLogs-2025-02-08_11-21-01_RO_FS.zip
Failure 3:
WslLogs-2025-02-08_11-30-53_Hang.zip

jordan@TAURUS:~$ sudo cat /proc/23923/status
Name:   cc1
Umask:  0022
State:  D (disk sleep)
Tgid:   23923
Ngid:   0
Pid:    23923
PPid:   23919
TracerPid:      0
Uid:    1000    1000    1000    1000
Gid:    1000    1000    1000    1000
FDSize: 64
Groups: 4 20 24 25 27 29 30 44 46 100 107 1000
NStgid: 23923
NSpid:  23923
NSpgid: 23916
NSsid:  279
VmPeak:    84088 kB
VmSize:    84088 kB
VmLck:         0 kB
VmPin:         0 kB
VmHWM:     67436 kB
VmRSS:     67436 kB
RssAnon:           48944 kB
RssFile:           18492 kB
RssShmem:              0 kB
VmData:    51980 kB
VmStk:       144 kB
VmExe:     28692 kB
VmLib:      2260 kB
VmPTE:       188 kB
VmSwap:        0 kB
HugetlbPages:          0 kB
CoreDumping:    0
THP_enabled:    1
Threads:        1
SigQ:   5/127895
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000001000
SigCgt: 00000000000004e8
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
CapBnd: 000001ffffffffff
CapAmb: 0000000000000000
NoNewPrivs:     0
Seccomp:        0
Seccomp_filters:        0
Speculation_Store_Bypass:       thread vulnerable
SpeculationIndirectBranch:      conditional enabled
Cpus_allowed:   fffffff
Cpus_allowed_list:      0-27
Mems_allowed:   1
Mems_allowed_list:      0
voluntary_ctxt_switches:        1
nonvoluntary_ctxt_switches:     26

Attempting to run ps in this state also fails, as attempts to read a subset of files in /proc/N/ also blocks forever:

jordan@TAURUS:~$ sudo strace cat /proc/23923/cmdline
...
openat(AT_FDCWD, "/proc/23923/cmdline", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
fadvise64(3, 0, 0, POSIX_FADV_SEQUENTIAL) = 0
mmap(NULL, 139264, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe081bc7000
read(3, ^C^C^C^C^C
Copy link

github-actions bot commented Feb 8, 2025

No logs.etl found in the archive. Make sure that you ran collect-wsl-logs.ps1 as administrator and that the logs.etl file is in the archive.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Diagnostic information
Multiple log files found, using: https://github.com/user-attachments/files/18716297/WslLogs-2025-02-08_11-15-54_Crash.zip
.wslconfig found
Detected appx version: 2.4.10.0
No logs.etl found in archive.
Error while parsing the logs. See action page for details

@JordanYates
Copy link
Author

No logs.etl found in the archive. Make sure that you ran collect-wsl-logs.ps1 as administrator and that the logs.etl file is in the archive.

It looks like the log collection process did not complete properly in the case of the full VM crash. The other two log archives do contain the logs.etl file.

@JordanYates
Copy link
Author

Based on the linked "similar issues" I have updated my BIOS (Intel(R) Core(TM) i7-14700K) and will see if that resolves the issue.

@OneBlue
Copy link
Collaborator

OneBlue commented Feb 11, 2025

Thank you @JordanYates. Let us know if this reproduces again after the bios update.

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

No branches or pull requests

2 participants