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

gcc build and tar cfv gcc-10.1.0.tar gcc-10.1.0 crashes WSL2 - just build and compression of directory? #5532

Closed
ChameleonRed opened this issue Jul 3, 2020 · 7 comments

Comments

@ChameleonRed
Copy link

Environment

Windows build number: Microsoft Windows [Version 10.0.19041.329]
Your Distribution version: Release:        20.04 Ubuntu
Whether the issue is on WSL 2 and/or WSL 1: Linux version 4.19.104-microsoft-standard (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Wed Feb 19 06:37:35 UTC 2020 WSL2

Steps to reproduce

I can not build gcc and pack gcc build directory.

10GB of RAM, SWAP = 0GB

  1. Unpack gcc-10.1.0 to /dptr/root/src
  2. download dependencies /dptr/root/src/gcc-10.1.0# ./contrib/download_prerequisites
  3. /dptr/root/src/gcc-10.1.0/configure" --prefix="/dptr/root/import" --disable-multilib
  4. make it (should crash) /dptr/root/build/gcc-10.1.0# make -j 2
5. try `/dptr/root/build/# tar cfv gcc-10.1.0.tar gcc-10.1.0`

Expected behavior

gcc 10.1.0 build should success, tar should compress.

Actual behavior

gcc 10.1.0 build crash (no problem with memory)
tar crash on gcc build

I think it is problem with files/file system created by gcc build but I do not know why?

@ChameleonRed ChameleonRed changed the title tar cfv gcc-10.1.0.tar gcc-10.1.0 crashes WSL - just compression of directory? gcc build and tar cfv gcc-10.1.0.tar gcc-10.1.0 crashes WSL2 - just build and compression of directory? Jul 3, 2020
@ChameleonRed
Copy link
Author

Some logs from gcc build crash.
logs.zip

I compile gcc 10.1.0 from source with options as above. Nothing special is done or extra flags.

This compilation works fine on CentOS 7 (real one not wsl).

@ChameleonRed
Copy link
Author

Here is content of gcc build directory - maybe some name cause problem of too long path - I do not know. I can not tar cvf on this directory but tree works.

tree.txt

@onomatopellan
Copy link

WSL2 uses a vhdx with ext4 as filesystem so it should behave exactly like in a real Linux.

What's the error you are seeing? Does dmesg show anything when that happens?

What is /dptr/root? Does the user have permission to write there? Did you try compiling in /home/username?

How much free space do you have in C:? The vhdx file expands while compiling so make sure you have enough disk space.

@therealkenc
Copy link
Collaborator

What it the nature of the "crash". Maybe a screencap, or at least a description. Start WSL with wsl.exe (or wsl.exe -d`) from a cmd prompt rather than the distro start menu item. Does do you get kicked out of WSL and back to the prompt, or...?

Like Ono says WSL2 is Real Linux and gcc 10 certainly builds. That doesn't help you of course. Hopefully you will get some me2s.

@therealkenc
Copy link
Collaborator

10GB of RAM, SWAP = 0GB

Evens this is #5410. Open up Resource Monitor during the run and see if you are hitting the wall. A big tar cvf is not materially different than a big dd as far as the kernel is concerned. In addition to giving yourself some Linux swap, try limiting your WSL memory with .wslconfig. You can also try upping your Windows pagefile manually.

@therealkenc
Copy link
Collaborator

Calling the landing zone /dupe #5532 for "WSL2 crashes under memory pressure". WSL logs over there. It isn't an over-length path name, at least not on ext4 /home/you. I could not reproduce here. Building gcc and other "big stuff" is pretty standard fare on WSL2.

@ghost
Copy link

ghost commented May 11, 2021

Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.

Thanks for your report!

@ghost ghost closed this as completed May 11, 2021
@ghost ghost added the duplicate label May 11, 2021
This issue was closed.
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

3 participants