ninja-build/ninja

ninja hanging with zombie child process

Open

#2.052 geöffnet am 18. Nov. 2021

Auf GitHub ansehen
 (4 Kommentare) (6 Reaktionen) (0 zugewiesene Personen)C++ (1.544 Forks)batch import
bughelp wanted

Repository-Metriken

Stars
 (10.194 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 39T 3h) (10 gemergte PRs in 30 T)

Beschreibung

Occasionally, ninja is hanging after running a long-running build step, with a zombie child process present:

$  ps ax | grep ninja
32692 pts/1    S+     0:00 ninja -C build/GccReleaseASan/
$ pstree 32692 -p
ninja(32692)───sh(32702)
$ gdb -p 32702
[...]
Attaching to process 32702
warning: process 32702 is a zombie - the process has already terminated
$ gdb -p 32692
[...]
0x00007f2839c2ed39 in __GI_ppoll (fds=0x1813c60, nfds=1, timeout=<optimized out>, sigmask=0x1807b40) at ../sysdeps/unix/sysv/linux/ppoll.c:51
51          result = INLINE_SYSCALL (ppoll, 5, fds, nfds, timeout, sigmask, _NSIG / 8);
(gdb) bt
#0  0x00007f2839c2ed39 in __GI_ppoll (fds=0x1813c60, nfds=1, timeout=<optimized out>, sigmask=0x1807b40) at ../sysdeps/unix/sysv/linux/ppoll.c:51
#1  0x000000000042e588 in SubprocessSet::DoWork() ()
#2  0x00000000004095c8 in RealCommandRunner::WaitForCommand(CommandRunner::Result*) ()
#3  0x000000000040edbb in Builder::Build(std::string*) ()
#4  0x0000000000407c1b in (anonymous namespace)::real_main(int, char**) ()
#5  0x0000000000403199 in main ()
$ ninja --version
1.10.2

Contributor Guide