[Bug sanitizer/77538] segmentation fault: thread sanitizer shadow stack overflow
coollpe at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Sep 17 02:41:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77538
--- Comment #5 from peien luo <coollpe at hotmail dot com> ---
(In reply to Dmitry Vyukov from comment #4)
> Unkillable processed in D state usually mean kernel bugs (and there are lots
> of them: https://github.com/google/syzkaller/wiki/Found-Bugs).
>
> Please post results of 'cat /proc/PID/task/*/stack` and `cat
> /proc/PID/task/*/status`. Sometimes hangs happen due to secondary threads in
> the process. Maybe we will be able to figure out something from that info.
> However, I am not sure what we can do about a process hanged in D state,
> generally user must not be able to create them.
It can be killed by kill -9.
I have updated my centos 7 to the latest. Problem still occurs. The kernel
stack output is:
$ cat task/*/stack
[<ffffffff81081544>] do_exit+0x1e4/0xa60
[<ffffffff81081e3f>] do_group_exit+0x3f/0xa0
[<ffffffff81092c50>] get_signal_to_deliver+0x1d0/0x6d0
[<ffffffff81014417>] do_signal+0x57/0x6c0
[<ffffffff81014adf>] do_notify_resume+0x5f/0xb0
[<ffffffff81646dfd>] int_signal+0x12/0x17
[<ffffffffffffffff>] 0xffffffffffffffff
[<ffffffff81081544>] do_exit+0x1e4/0xa60
[<ffffffff81081e3f>] do_group_exit+0x3f/0xa0
[<ffffffff81092c50>] get_signal_to_deliver+0x1d0/0x6d0
[<ffffffff81014417>] do_signal+0x57/0x6c0
[<ffffffff81014adf>] do_notify_resume+0x5f/0xb0
[<ffffffff81646dfd>] int_signal+0x12/0x17
[<ffffffffffffffff>] 0xffffffffffffffff
[<ffffffff81081544>] do_exit+0x1e4/0xa60
[<ffffffff81081e3f>] do_group_exit+0x3f/0xa0
[<ffffffff81092c50>] get_signal_to_deliver+0x1d0/0x6d0
[<ffffffff81014417>] do_signal+0x57/0x6c0
[<ffffffff81014adf>] do_notify_resume+0x5f/0xb0
[<ffffffff81646dfd>] int_signal+0x12/0x17
[<ffffffffffffffff>] 0xffffffffffffffff
[<ffffffff81081544>] do_exit+0x1e4/0xa60
[<ffffffff81081e3f>] do_group_exit+0x3f/0xa0
[<ffffffff81092c50>] get_signal_to_deliver+0x1d0/0x6d0
[<ffffffff81014417>] do_signal+0x57/0x6c0
[<ffffffff81014adf>] do_notify_resume+0x5f/0xb0
[<ffffffff81646dfd>] int_signal+0x12/0x17
[<ffffffffffffffff>] 0xffffffffffffffff
[<ffffffff81081544>] do_exit+0x1e4/0xa60
[<ffffffff81081e3f>] do_group_exit+0x3f/0xa0
[<ffffffff81092c50>] get_signal_to_deliver+0x1d0/0x6d0
[<ffffffff81014417>] do_signal+0x57/0x6c0
[<ffffffff81014adf>] do_notify_resume+0x5f/0xb0
[<ffffffff81646dfd>] int_signal+0x12/0x17
[<ffffffffffffffff>] 0xffffffffffffffff
[<ffffffff81081544>] do_exit+0x1e4/0xa60
[<ffffffff81081e3f>] do_group_exit+0x3f/0xa0
[<ffffffff81092c50>] get_signal_to_deliver+0x1d0/0x6d0
[<ffffffff81014417>] do_signal+0x57/0x6c0
[<ffffffff81014adf>] do_notify_resume+0x5f/0xb0
[<ffffffff81646dfd>] int_signal+0x12/0x17
[<ffffffffffffffff>] 0xffffffffffffffff
[<ffffffff81081544>] do_exit+0x1e4/0xa60
[<ffffffff81081e3f>] do_group_exit+0x3f/0xa0
[<ffffffff81092c50>] get_signal_to_deliver+0x1d0/0x6d0
[<ffffffff81014417>] do_signal+0x57/0x6c0
[<ffffffff81014adf>] do_notify_resume+0x5f/0xb0
[<ffffffff81646dfd>] int_signal+0x12/0x17
[<ffffffffffffffff>] 0xffffffffffffffff
[<ffffffff811e75b0>] pipe_wait+0x70/0xc0
[<ffffffff811e7896>] pipe_write+0x236/0x5b0
[<ffffffff811de43d>] do_sync_write+0x8d/0xd0
[<ffffffff8123e1c2>] dump_write+0x52/0x70
[<ffffffff8123e474>] dump_seek+0xa4/0xe0
[<ffffffff81239606>] elf_core_dump+0x896/0x950
[<ffffffff8123f252>] do_coredump+0x882/0xb10
[<ffffffff81092c47>] get_signal_to_deliver+0x1c7/0x6d0
[<ffffffff81014417>] do_signal+0x57/0x6c0
[<ffffffff81014adf>] do_notify_resume+0x5f/0xb0
[<ffffffff8163e43c>] retint_signal+0x48/0x8c
[<ffffffffffffffff>] 0xffffffffffffffff
[god@localhost 12987]$ ls task
12987 12988 12989 12990 12991 12992 12993 12994
and status:
$ cat task/*/status
Name: test_metaserver
State: D (disk sleep)
Tgid: 12987
Ngid: 0
Pid: 12987
PPid: 11646
TracerPid: 0
Uid: 1000 1000 1000 1000
Gid: 1000 1000 1000 1000
FDSize: 256
Groups: 1000
VmPeak: 104153197488 kB
VmSize: 104153197488 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 265724 kB
VmRSS: 265724 kB
VmData: 104153051792 kB
VmStk: 136 kB
VmExe: 18492 kB
VmLib: 5992 kB
VmPTE: 1288 kB
VmSwap: 0 kB
Threads: 8
SigQ: 0/63365
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000001000
SigCgt: 0000000180000000
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
CapBnd: 0000001fffffffff
Seccomp: 0
Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff
Cpus_allowed_list: 0-127
Mems_allowed:
00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list: 0
voluntary_ctxt_switches: 96
nonvoluntary_ctxt_switches: 8
Name: test_metaserver
State: D (disk sleep)
Tgid: 12987
Ngid: 0
Pid: 12988
PPid: 11646
TracerPid: 0
Uid: 1000 1000 1000 1000
Gid: 1000 1000 1000 1000
FDSize: 256
Groups: 1000
VmPeak: 104153197488 kB
VmSize: 104153197488 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 265724 kB
VmRSS: 265724 kB
VmData: 104153051792 kB
VmStk: 136 kB
VmExe: 18492 kB
VmLib: 5992 kB
VmPTE: 1288 kB
VmSwap: 0 kB
Threads: 8
SigQ: 0/63365
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: fffffffffffbfeff
SigIgn: 0000000000001000
SigCgt: 0000000180000000
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
CapBnd: 0000001fffffffff
Seccomp: 0
Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff
Cpus_allowed_list: 0-127
Mems_allowed:
00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list: 0
voluntary_ctxt_switches: 6
nonvoluntary_ctxt_switches: 0
Name: test_metaserver
State: D (disk sleep)
Tgid: 12987
Ngid: 0
Pid: 12989
PPid: 11646
TracerPid: 0
Uid: 1000 1000 1000 1000
Gid: 1000 1000 1000 1000
FDSize: 256
Groups: 1000
VmPeak: 104153197488 kB
VmSize: 104153197488 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 265724 kB
VmRSS: 265724 kB
VmData: 104153051792 kB
VmStk: 136 kB
VmExe: 18492 kB
VmLib: 5992 kB
VmPTE: 1288 kB
VmSwap: 0 kB
Threads: 8
SigQ: 0/63365
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000001000
SigCgt: 0000000180000000
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
CapBnd: 0000001fffffffff
Seccomp: 0
Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff
Cpus_allowed_list: 0-127
Mems_allowed:
00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list: 0
voluntary_ctxt_switches: 3829
nonvoluntary_ctxt_switches: 0
Name: test_metaserver
State: D (disk sleep)
Tgid: 12987
Ngid: 0
Pid: 12990
PPid: 11646
TracerPid: 0
Uid: 1000 1000 1000 1000
Gid: 1000 1000 1000 1000
FDSize: 256
Groups: 1000
VmPeak: 104153197488 kB
VmSize: 104153197488 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 265724 kB
VmRSS: 265724 kB
VmData: 104153051792 kB
VmStk: 136 kB
VmExe: 18492 kB
VmLib: 5992 kB
VmPTE: 1288 kB
VmSwap: 0 kB
Threads: 8
SigQ: 0/63365
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000001000
SigCgt: 0000000180000000
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
CapBnd: 0000001fffffffff
Seccomp: 0
Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff
Cpus_allowed_list: 0-127
Mems_allowed:
00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list: 0
voluntary_ctxt_switches: 6
nonvoluntary_ctxt_switches: 0
Name: test_metaserver
State: D (disk sleep)
Tgid: 12987
Ngid: 0
Pid: 12991
PPid: 11646
TracerPid: 0
Uid: 1000 1000 1000 1000
Gid: 1000 1000 1000 1000
FDSize: 256
Groups: 1000
VmPeak: 104153197488 kB
VmSize: 104153197488 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 265724 kB
VmRSS: 265724 kB
VmData: 104153051792 kB
VmStk: 136 kB
VmExe: 18492 kB
VmLib: 5992 kB
VmPTE: 1288 kB
VmSwap: 0 kB
Threads: 8
SigQ: 0/63365
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000001000
SigCgt: 0000000180000000
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
CapBnd: 0000001fffffffff
Seccomp: 0
Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff
Cpus_allowed_list: 0-127
Mems_allowed:
00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list: 0
voluntary_ctxt_switches: 3768
nonvoluntary_ctxt_switches: 0
Name: test_metaserver
State: D (disk sleep)
Tgid: 12987
Ngid: 0
Pid: 12992
PPid: 11646
TracerPid: 0
Uid: 1000 1000 1000 1000
Gid: 1000 1000 1000 1000
FDSize: 256
Groups: 1000
VmPeak: 104153197488 kB
VmSize: 104153197488 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 265724 kB
VmRSS: 265724 kB
VmData: 104153051792 kB
VmStk: 136 kB
VmExe: 18492 kB
VmLib: 5992 kB
VmPTE: 1288 kB
VmSwap: 0 kB
Threads: 8
SigQ: 0/63365
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000001000
SigCgt: 0000000180000000
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
CapBnd: 0000001fffffffff
Seccomp: 0
Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff
Cpus_allowed_list: 0-127
Mems_allowed:
00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list: 0
voluntary_ctxt_switches: 7
nonvoluntary_ctxt_switches: 0
Name: test_metaserver
State: D (disk sleep)
Tgid: 12987
Ngid: 0
Pid: 12993
PPid: 11646
TracerPid: 0
Uid: 1000 1000 1000 1000
Gid: 1000 1000 1000 1000
FDSize: 256
Groups: 1000
VmPeak: 104153197488 kB
VmSize: 104153197488 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 265724 kB
VmRSS: 265724 kB
VmData: 104153051792 kB
VmStk: 136 kB
VmExe: 18492 kB
VmLib: 5992 kB
VmPTE: 1288 kB
VmSwap: 0 kB
Threads: 8
SigQ: 0/63365
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000001000
SigCgt: 0000000180000000
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
CapBnd: 0000001fffffffff
Seccomp: 0
Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff
Cpus_allowed_list: 0-127
Mems_allowed:
00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list: 0
voluntary_ctxt_switches: 14
nonvoluntary_ctxt_switches: 0
Name: test_metaserver
State: R (running)
Tgid: 12987
Ngid: 0
Pid: 12994
PPid: 11646
TracerPid: 0
Uid: 1000 1000 1000 1000
Gid: 1000 1000 1000 1000
FDSize: 64
Groups: 1000
VmPeak: 104153197488 kB
VmSize: 104153197488 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 265724 kB
VmRSS: 265724 kB
VmData: 104153051792 kB
VmStk: 136 kB
VmExe: 18492 kB
VmLib: 5992 kB
VmPTE: 1288 kB
VmSwap: 0 kB
Threads: 8
SigQ: 0/63365
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000001000
SigCgt: 0000000180000000
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
CapBnd: 0000001fffffffff
Seccomp: 0
Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff
Cpus_allowed_list: 0-127
Mems_allowed:
00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list: 0
voluntary_ctxt_switches: 22838194
nonvoluntary_ctxt_switches: 36
More information about the Gcc-bugs
mailing list