Skip to content

Processes disappearing? #2469

Closed
Closed

Description

On Build 16278, processes occasionally 'disappear'. This type of error has occured several times during compilation of GCC 7.2.0 as a cross-compiler. The common elements are fork: Invalid argument, and wait_for: No record of process nnnnn.

gcc-7.2.0/libcpp/configure: fork: Invalid argument
checking for build system preprocessor... 
gcc-7.2.0/libcpp/configure: line 1: wait_for: No record of process 16132

Activity

  1. Warblefly commented on Sep 2, 2017

    @Warblefly
    Author

    Yes, the host Ubuntu GCC. Version 5.4.0.

  2. therealkenc commented on Sep 3, 2017

    @therealkenc
    gcc-7.2.0/libcpp/configure: fork: Invalid argument
    checking for build system preprocessor... 
    

    The problem doesn't seem to be so much "processes disappearing" as the process didn't happen, screwing up the job accounting in bash here. A fork failed. If you can catch the EINVAL in an strace we might be able to make a guess, but compiling gcc 7 under strace is a bear of a repro. And, given Murphy, it might not even fail under strace. Tough one.

  3. Warblefly commented on Sep 3, 2017

    @Warblefly
    Author

    It's happened in other giant compiles I do, beside GCC. Reproduction is difficult because it is a rare failure, but potent when it happens.

  4. therealkenc commented on Sep 3, 2017

    @therealkenc

    Could be just running out of resources (memory) and the error message is less than ideal, like this example. Maybe try upping your Windows page file to something ridiculously large. Compile with make -j 1.

    Or it could be a bug. You'll see more "same here" posts roll in if it's a general problem with 16278 versus previous releases.

  5. Majsvaffla commented on Sep 8, 2017

    @Majsvaffla

    I have a similar issue that could be related.

    I'm running a pytest browser test suite that launches gunicorn webserver through Python's subprocess module. Before upgrading to build 16278 it launched properly but now my code seems to lose the process and time out.

    I haven't located the root of this issue as all I get from Python is OSError: [Errno 9] Bad file descriptor. I'll keep looking into it!

    The webserver is able to run and accept connections when not started through Python but directly from bash.

  6. bitcrazed commented on Nov 21, 2017

    @bitcrazed
    Contributor

    Sunil Muthuswamy (@sunilmut) Sarah Cooley (@scooley) Could you take a look if we're recording any errors that would result in a fork: Invalid argument errors being returned?

    Ben Hillis (@benhillis) is OOF for a while, but copying too in case he's bored and looking for something to do ;)

  7. rdp commented on Dec 15, 2017

    @rdp

    I get this "somewhat reproducibly" doing some cross compiling, ex:

    opencore-amr-0.1.5 as $ make  -j 4
    ...
    ../libtool: fork: Invalid argument
    
    

    or sometimes (I assume related)
    ... x86_64-w64-mingw32-g++: error: : No such file or directory

    that's with like 8GB of RAM free according to Task Manager FWIW. If I restart the same "make" command then it may (or may not) continue smoothly to completion. lxfs. Make -j 1 seems to work OK. Disabling windows defender had no effect.

  8. HinTak commented on Feb 26, 2018

    @HinTak

    I got this while cross-compiling fftw in two bash windows, one for win32 and the other for win64 (and both doing "make -j 4") . I think it is just WSL being a bit flaky when spawning new processes too quickly.

  9. rdp commented on Feb 26, 2018

    @rdp

    I don't get this "this morning" maybe try with this patch applied? #2697

  10. HinTak commented on Mar 2, 2018

    @HinTak
    Microsoft Windows [Version 10.0.16299.248]
    (c) 2017 Microsoft Corporation. All rights reserved.
    
    C:\Users\Hin-Tak>ver
    
    Microsoft Windows [Version 10.0.16299.248]
    
    C:\Users\Hin-Tak>
    

    I get that quite often with cross tools.

  11. cosmicdan commented on Mar 21, 2019

    @cosmicdan

    I got a /bin/bash: fork: Invalid argument while compiling AOSP 9.0 (Android Pie) under Ubuntu 18.04 in WSL (make -j6). Repeating make with the same job count produced no error.

    Doubt it's a RAM thing as I have 32GB total and total usage never went above 20GB. This did happen after an hour or so of sustained heavy-load, like some others have encountered - but the possibly-interesting part was that this was at the end of AOSP compiling, where most of the work is compiling lots of Java.

    I am also using ccache, as is pretty standard in AOSP compiling.

    My Win10 build is 17763.379.

    Dunno what else I can say, just a "me too" and "still happens for me", I guess.

  12. piiroim1 commented on Mar 31, 2019

    @piiroim1

    I was creating bash script for some ocr stuff. It would run multiple instances imagemagick and tesseract-ocr. It was doing somewhat heavy IO, processing around 600-700 images, totaling about 500MB. It would also cap my CPU most of the time.

    I realized that when letting the script create more than 4-5 subprocessess, I would start getting the ": fork: Invalid argument" -error. Checking the task manager revealed Microsoft Antimalware taking up most of the CPU time.

    Sure enough, disabling the real time protection at the Windows Defender settings seems to have solved the problem.

  13. cosmicdan commented on Mar 31, 2019

    @cosmicdan
  14. piiroim1 commented on Mar 31, 2019

    @piiroim1

    I have 8 logical cores. However I don't seem to be able to reproduce the problem anymore. Before it would consistently happen when I set the number of subprocessess to 12. But now it seems to run just fine. The antivirus CPU usage does still ramp up though.

    Not sure what to make of this. Seems quite random.

    I had defender already disabled in my WSL setup because of the performance issues - I still had the problem, so that's a red herring. You mention 4-5 subprocesses, so 6 at most; but how many logical cores does your host have?
    …
    On 31 Mar. 2019, piiroim1 @.***> wrote: I was creating bash script for some ocr stuff. It would run multiple instances imagemagick and tesseract-ocr. It was doing somewhat heavy IO, processing around 600-700 images, totaling about 500MB. It would also cap my CPU most of the time. I realized that when letting the script create more than 4-5 subprocessess, I would start getting the ": fork: Invalid argument" -error. Checking the task manager revealed Microsoft Antimalware taking up most of the CPU time. Disabling the real time protection at the Windows Defender settings seems to have solved the problem.
    -- Sent with K-@](https://play.google.com/store/apps/details?id=com.onegravity.k10.pro2%22>K-@) Mail - the evolution of emailing.

  15. toncho11 commented on Apr 6, 2019

    @toncho11

    I have the same problem: compiling gcc, random messages from the same type ...
    Disabling Windows Defender real time protection seems to help.

  16. saschanaz commented on Jun 24, 2019

    @saschanaz

    Had this problem when building Servo and Anton Andreev (@toncho11)'s suggestion helped. Astonishing solution 😲

    Didn't happen on WSL2, only on WSL1. Using AMD Ryzen 5 2600X on Windows Insider build 18922 if you ask.

    --- stderr
    No module named mako
    Package libtizcore was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libtizcore.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libtizcore' found
    ar: `u' modifier ignored since `D' is the default (see `U')
    ar: `u' modifier ignored since `D' is the default (see `U')
    ar: `u' modifier ignored since `D' is the default (see `U')
    ar: `u' modifier ignored since `D' is the default (see `U')
    ar: `u' modifier ignored since `D' is the default (see `U')
    ar: `u' modifier ignored since `D' is the default (see `U')
    ar: `u' modifier ignored since `D' is the default (see `U')
    ar: `u' modifier ignored since `D' is the default (see `U')
    ar: `u' modifier ignored since `D' is the default (see `U')
    ar: `u' modifier ignored since `D' is the default (see `U')
    ../../../../libtool: fork: Invalid argument
    make[4]: *** [sp_state_so.lo] Error 254
    make[4]: *** Waiting for unfinished jobs....
    make[3]: *** [all-recursive] Error 1
    make[2]: *** [all-recursive] Error 1
    make[1]: *** [all] Error 2
    make: *** [all-recursive] Error 1
    thread 'main' panicked at 'failed with: exit code: 2', /home/saschanaz/.cargo/git/checkouts/osmesa-src-bf84ce2b80210dd7/97f4613/build.rs:61:9
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
    
    [Warning] Could not generate notification! Optional Python module 'dbus' is not installed.
    Build FAILED in 0:03:31
    
  17. fdcds commented on Oct 29, 2019

    @fdcds

    Could this be an instance of the following bug in bash 4.3 (e.g. Ubuntu 16.04) which is fixed in bash 4.4 (e.g. Ubuntu 18.04)?

    https://lists.gnu.org/archive/html/bug-bash/2016-06/msg00052.html

  18. cslycord commented on Jun 25, 2020

    @cslycord

    Could this be an instance of the following bug in bash 4.3 (e.g. Ubuntu 16.04) which is fixed in bash 4.4 (e.g. Ubuntu 18.04)?

    https://lists.gnu.org/archive/html/bug-bash/2016-06/msg00052.html

    I get hit by the bug with bash 5 from a debian WSL instance.

    GNU bash, version 5.0.16(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2019 Free Software Foundation, Inc.

    Although, debian lists it as version 5.0-6.

  19. therealkenc commented on May 5, 2021

    @therealkenc

    An EINVAL on fork(2) is "just wrong" even if the cause was OOM. Better in WSL2.

  20. GrayXu commented on Mar 22, 2022

    @GrayXu

    Had this problem when building Servo and Anton Andreev (@toncho11)'s suggestion helped. Astonishing solution 😲

    Didn't happen on WSL2, only on WSL1. Using AMD Ryzen 5 2600X on Windows Insider build 18922 if you ask.

    --- stderr
    No module named mako
    Package libtizcore was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libtizcore.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libtizcore' found
    ar: `u' modifier ignored since `D' is the default (see `U')
    ar: `u' modifier ignored since `D' is the default (see `U')
    ar: `u' modifier ignored since `D' is the default (see `U')
    ar: `u' modifier ignored since `D' is the default (see `U')
    ar: `u' modifier ignored since `D' is the default (see `U')
    ar: `u' modifier ignored since `D' is the default (see `U')
    ar: `u' modifier ignored since `D' is the default (see `U')
    ar: `u' modifier ignored since `D' is the default (see `U')
    ar: `u' modifier ignored since `D' is the default (see `U')
    ar: `u' modifier ignored since `D' is the default (see `U')
    ../../../../libtool: fork: Invalid argument
    make[4]: *** [sp_state_so.lo] Error 254
    make[4]: *** Waiting for unfinished jobs....
    make[3]: *** [all-recursive] Error 1
    make[2]: *** [all-recursive] Error 1
    make[1]: *** [all] Error 2
    make: *** [all-recursive] Error 1
    thread 'main' panicked at 'failed with: exit code: 2', /home/saschanaz/.cargo/git/checkouts/osmesa-src-bf84ce2b80210dd7/97f4613/build.rs:61:9
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
    
    [Warning] Could not generate notification! Optional Python module 'dbus' is not installed.
    Build FAILED in 0:03:31
    

    libtool: fork: Invalid argument
    similar problems here during make, but I found if I reduce the number of threads, it doesn't fail.

  21. adrian-gierakowski commented on May 4, 2022

    @adrian-gierakowski

    why is this issue closed? has a root cause been identified and fixed?

  22. rdp commented on Apr 24, 2025

    @rdp

    I still get this in WSL1 sporadically under heavy load with at least 20.04 and 22.04 (it does seem better in WSL2...). I guess fix is to not do heavy process forking in WSL1 or to use WSL2? :|

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions