Hide Forgot
Description of problem: When starting bash in a new PID namespace without fork, it segfaults: $ sudo unshare --pid bash bash: fork: Cannot allocate memory Segmentation fault I understand this is pretty cumbersome. I would expect bash not to segfault, I think it should print that it's not able to allocate memory. E.g. zsh carries on: $ sudo unshare --pid zsh /etc/profile.d/colorgrep.sh:3: fork failed: cannot allocate memory /etc/profile.d/colorls.sh:26: fork failed: cannot allocate memory /etc/profile.d/colorxzgrep.sh:1: fork failed: cannot allocate memory /etc/profile.d/colorzgrep.sh:3: fork failed: cannot allocate memory /etc/profile.d/qt-graphicssystem.sh:7: fork failed: cannot allocate memory /etc/profile.d/vim.sh:3: fork failed: cannot allocate memory compinit:534: fork failed: cannot allocate memory [root@localhost]/home/root# ls zsh: fork failed: cannot allocate memory [root@localhost]/home/root#
Created attachment 1153903 [details] backtrace
Thank you for the backtrace, because I was unable to reproduce it: > $ sudo unshare --pid bash > bash: fork: Cannot allocate memory > bash-4.3# My version of bash: > bash-4.3.42-3.fc23.x86_64 Also, I'm reassigning this to new maintainer of bash (but I will keep myself in CC for now).
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle. Changing version to '25'.
This was fixed by rebasing bash to version 4.4 in rawhide.