Bug 1098145 - [abrt] bash: find_job(): bash killed by SIGSEGV
Summary: [abrt] bash: find_job(): bash killed by SIGSEGV
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: bash
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ondrej Oprala
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:372661638cfc57ed4c7942ae208...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-15 11:42 UTC by Lukáš Doktor
Modified: 2016-02-01 02:09 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-03-10 12:11:38 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (57.63 KB, text/plain)
2014-05-15 11:42 UTC, Lukáš Doktor
no flags Details
File: cgroup (172 bytes, text/plain)
2014-05-15 11:42 UTC, Lukáš Doktor
no flags Details
File: core_backtrace (13.83 KB, text/plain)
2014-05-15 11:42 UTC, Lukáš Doktor
no flags Details
File: dso_list (761 bytes, text/plain)
2014-05-15 11:42 UTC, Lukáš Doktor
no flags Details
File: environ (2.87 KB, text/plain)
2014-05-15 11:42 UTC, Lukáš Doktor
no flags Details
File: exploitable (82 bytes, text/plain)
2014-05-15 11:42 UTC, Lukáš Doktor
no flags Details
File: limits (1.29 KB, text/plain)
2014-05-15 11:42 UTC, Lukáš Doktor
no flags Details
File: maps (3.09 KB, text/plain)
2014-05-15 11:42 UTC, Lukáš Doktor
no flags Details
File: open_fds (108 bytes, text/plain)
2014-05-15 11:43 UTC, Lukáš Doktor
no flags Details
File: proc_pid_status (943 bytes, text/plain)
2014-05-15 11:43 UTC, Lukáš Doktor
no flags Details
File: var_log_messages (183 bytes, text/plain)
2014-05-15 11:43 UTC, Lukáš Doktor
no flags Details

Description Lukáš Doktor 2014-05-15 11:42:39 UTC
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

Comment 1 Lukáš Doktor 2014-05-15 11:42:44 UTC
Created attachment 895859 [details]
File: backtrace

Comment 2 Lukáš Doktor 2014-05-15 11:42:46 UTC
Created attachment 895860 [details]
File: cgroup

Comment 3 Lukáš Doktor 2014-05-15 11:42:48 UTC
Created attachment 895861 [details]
File: core_backtrace

Comment 4 Lukáš Doktor 2014-05-15 11:42:50 UTC
Created attachment 895862 [details]
File: dso_list

Comment 5 Lukáš Doktor 2014-05-15 11:42:52 UTC
Created attachment 895863 [details]
File: environ

Comment 6 Lukáš Doktor 2014-05-15 11:42:54 UTC
Created attachment 895864 [details]
File: exploitable

Comment 7 Lukáš Doktor 2014-05-15 11:42:56 UTC
Created attachment 895865 [details]
File: limits

Comment 8 Lukáš Doktor 2014-05-15 11:42:58 UTC
Created attachment 895866 [details]
File: maps

Comment 9 Lukáš Doktor 2014-05-15 11:43:00 UTC
Created attachment 895867 [details]
File: open_fds

Comment 10 Lukáš Doktor 2014-05-15 11:43:03 UTC
Created attachment 895868 [details]
File: proc_pid_status

Comment 11 Lukáš Doktor 2014-05-15 11:43:05 UTC
Created attachment 895869 [details]
File: var_log_messages

Comment 12 Lukáš Doktor 2014-05-15 12:14:47 UTC
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)

Comment 13 Ondrej Oprala 2015-01-16 17:22:44 UTC
I don't seem to be able to reproduce it with bash-4.3.33-1.fc21. Are you able to?

Comment 14 Lukáš Doktor 2015-03-10 12:10:57 UTC
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áš


Note You need to log in before you can comment on or make changes to this bug.