Description of problem: In terminal1 (xterm): bash for NUM in `seq 1 64`; do trap "echo Received $NUM, ignoring... | grep error" $NUM; done ps # get the PID_OF_THE_BASH In terminal2: touch /var/tmp/docker_kill_stress # Replace $PID_OF_THE_BASH with the bash pid for AAA in `seq 1 31`; do [ $AAA -eq 9 ] && continue; [ $AAA -eq 17 ] && continue; [ $AAA -eq 20 ] && continue ; { while [ -e /var/tmp/docker_kill_stress ]; do kill -$AAA $PID_OF_THE_BASH > /dev/null || echo "Sender $AAA failed"; done } & done Which results in SIGSEGV. Version-Release number of selected component: bash-4.2.47-2.fc20 Additional info: reporter: libreport-2.2.2 backtrace_rating: 4 cmdline: bash crash_function: find_job executable: /usr/bin/bash kernel: 3.14.3-200.fc20.x86_64 runlevel: N 5 type: CCpp uid: 1000 Truncated backtrace: Thread no. 1 (10 frames) #0 find_job at jobs.c:1374 #1 find_pipeline at jobs.c:1329 #2 find_process at jobs.c:1346 #3 waitchld at jobs.c:3133 #4 wait_for at jobs.c:2450 #5 execute_command_internal at execute_cmd.c:787 #6 execute_pipeline at execute_cmd.c:2238 #7 execute_connection at execute_cmd.c:2350 #8 execute_command_internal at execute_cmd.c:903 #9 parse_and_execute at evalstring.c:319
Created attachment 895859 [details] File: backtrace
Created attachment 895860 [details] File: cgroup
Created attachment 895861 [details] File: core_backtrace
Created attachment 895862 [details] File: dso_list
Created attachment 895863 [details] File: environ
Created attachment 895864 [details] File: exploitable
Created attachment 895865 [details] File: limits
Created attachment 895866 [details] File: maps
Created attachment 895867 [details] File: open_fds
Created attachment 895868 [details] File: proc_pid_status
Created attachment 895869 [details] File: var_log_messages
I met this bug while trying to simulate similar problem in docker container. The difference is, that when I used container: 1. TERM1: docker run -t -i --name=test_95vY fedora bash -c 'for NUM in `seq 1 64`; do trap "echo Received $NUM, ignoring..." $NUM; done; while :; do sleep 1; done' 2>&1 | grep error 2. TERM2: touch /var/tmp/docker_kill_stress 3. TERM2: for AAA in `seq 1 31`; do [ $AAA -eq 9 ] && continue; [ $AAA -eq 17 ] && continue; { while [ -e /var/tmp/docker_kill_stress ]; do /usr/bin/docker -D kill -s $AAA test_95vY > /dev/null || echo "Sender $AAA failed"; done } & done Results were: bash: line 1: echo: write error: Interrupted system call bash: line 1: echo: write error: Interrupted system call bash: line 1: echo: write error: Interrupted system call (once in a while) When I tried the same with os kill: 1. TERM1: docker run -t -i --name=test_95vY fedora bash -c 'for NUM in `seq 1 64`; do trap "echo Received $NUM, ignoring..." $NUM; done; while :; do sleep 1; done' 2>&1 | grep error 2. TERM2: touch /var/tmp/docker_kill_stress 3. TERM2: for AAA in `seq 1 31`; do [ $AAA -eq 9 ] && continue; [ $AAA -eq 17 ] && continue; { while [ -e /var/tmp/docker_kill_stress ]; do kill -$AAA $PID_OF_THE_CONTAINER > /dev/null || echo "Sender $AAA failed"; done } & done Results were: docker process was destroyed, while the container was still running and handling the signals properly. I was able to attach it and send another bunch of kills to it. NOTE: In later trials I omitted signal 20 too as it puts the process into background (sometimes)
I don't seem to be able to reproduce it with bash-4.3.33-1.fc21. Are you able to?
Hello, again. I tried it on bash-4.2.53-2.fc20.x86_64 and it survived successfully. Only xterm hanged afterwards, but that's most certainly an xterm issue... Thank you, Lukáš