我正在尝试使用 Rustrover,但它非常不稳定,每当它崩溃或被我卡住并杀死时,ps
命令和任何其他任务管理器都会永远卡住而不会显示任何内容。根据其他线程的建议,我运行了strace ps
,但我不知道下一步该怎么做。以下是最后几行:
...
openat(AT_FDCWD, "/proc/4282/status", O_RDONLY) = 4
read(4, "Name:\tspotify\nUmask:\t0022\nState:"..., 2048) = 1169
close(4) = 0
openat(AT_FDCWD, "/proc/4282/environ", O_RDONLY) = 4
read(4, "=pl --user-data-dir=/home/michal"..., 131072) = 1839
read(4, "", 129233) = 0
close(4) = 0
openat(AT_FDCWD, "/proc/4282/cmdline", O_RDONLY) = 4
read(4, "/opt/spotify/spotify --type=util"..., 131072) = 477
read(4, "", 130595) = 0
close(4) = 0
openat(AT_FDCWD, "/proc/4282/ctty", O_RDONLY) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/proc/4287", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0
openat(AT_FDCWD, "/proc/4287/stat", O_RDONLY) = 4
read(4, "4287 (spotify) S 4229 1707 1707 "..., 2048) = 285
close(4) = 0
openat(AT_FDCWD, "/proc/4287/status", O_RDONLY) = 4
read(4, "Name:\tspotify\nUmask:\t0022\nState:"..., 2048) = 1170
close(4) = 0
openat(AT_FDCWD, "/proc/4287/environ", O_RDONLY) = 4
read(4, "Cache\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 131072) = 1870
read(4, "", 129202) = 0
close(4) = 0
openat(AT_FDCWD, "/proc/4287/cmdline", O_RDONLY) = 4
read(4, "/opt/spotify/spotify --type=util"..., 131072) = 474
read(4, "", 130598) = 0
close(4) = 0
openat(AT_FDCWD, "/proc/4287/ctty", O_RDONLY) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/proc/4308", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0
openat(AT_FDCWD, "/proc/4308/stat", O_RDONLY) = 4
read(4, "4308 (spotify) S 4234 1707 1707 "..., 2048) = 295
close(4) = 0
openat(AT_FDCWD, "/proc/4308/status", O_RDONLY) = 4
read(4, "Name:\tspotify\nUmask:\t0022\nState:"..., 2048) = 1178
close(4) = 0
openat(AT_FDCWD, "/proc/4308/environ", O_RDONLY) = 4
read(4, "sandbox --log-file=/opt/spotify/"..., 131072) = 1839
read(4, "", 129233) = 0
close(4) = 0
openat(AT_FDCWD, "/proc/4308/cmdline", O_RDONLY) = 4
read(4, "/opt/spotify/spotify --type=rend"..., 131072) = 597
read(4, "", 130475) = 0
close(4) = 0
openat(AT_FDCWD, "/proc/4308/ctty", O_RDONLY) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/proc/5138", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0
openat(AT_FDCWD, "/proc/5138/stat", O_RDONLY) = 4
read(4, "5138 (rustc) D 1542 1707 1707 0 "..., 2048) = 306
close(4) = 0
openat(AT_FDCWD, "/proc/5138/status", O_RDONLY) = 4
read(4, "Name:\trustc\nUmask:\t0022\nState:\tD"..., 2048) = 1169
close(4) = 0
openat(AT_FDCWD, "/proc/5138/environ", O_RDONLY) = 4
read(4,
和内容/proc/5138/status
:
Name: rustc
Umask: 0022
State: D (disk sleep)
Tgid: 5138
Ngid: 0
Pid: 5138
PPid: 1542
TracerPid: 0
Uid: 1000 1000 1000 1000
Gid: 1000 1000 1000 1000
FDSize: 128
Groups: 90 98 959 984 987 991 994 996 998 1000
NStgid: 5138
NSpid: 5138
NSpgid: 1707
NSsid: 1707
VmPeak: 236164 kB
VmSize: 236164 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 29020 kB
VmRSS: 29020 kB
RssAnon: 11096 kB
RssFile: 17924 kB
RssShmem: 0 kB
VmData: 11196 kB
VmStk: 132 kB
VmExe: 352 kB
VmLib: 158980 kB
VmPTE: 196 kB
VmSwap: 0 kB
HugetlbPages: 0 kB
CoreDumping: 0
THP_enabled: 1
Threads: 1
SigQ: 6/127234
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000004
SigIgn: 0000000000000000
SigCgt: 0000000000000440
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
CapBnd: 000001ffffffffff
CapAmb: 0000000000000000
NoNewPrivs: 0
Seccomp: 0
Seccomp_filters: 0
Speculation_Store_Bypass: thread vulnerable
SpeculationIndirectBranch: conditional enabled
Cpus_allowed: ffffff
Cpus_allowed_list: 0-23
Mems_allowed: 00000001
Mems_allowed_list: 0
voluntary_ctxt_switches: 1
nonvoluntary_ctxt_switches: 13
cat /proc/5138/environ
永远挂起。知道发生了什么事以及如何修复吗?
[编辑]
这次 Java 出现了同样的问题。
strace ps
:
openat(AT_FDCWD, "/proc/151969/environ", O_RDONLY) = -1 EACCES (Brak dostępu)
openat(AT_FDCWD, "/proc/151969/cmdline", O_RDONLY) = 4
read(4, "", 131072) = 0
close(4) = 0
openat(AT_FDCWD, "/proc/151969/ctty", O_RDONLY) = -1 ENOENT (Nie ma takiego pliku ani katalogu)
newfstatat(AT_FDCWD, "/proc/151970", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0
openat(AT_FDCWD, "/proc/151970/stat", O_RDONLY) = 4
read(4, "151970 (kworker/9:1-events) I 2 "..., 2048) = 172
close(4) = 0
openat(AT_FDCWD, "/proc/151970/status", O_RDONLY) = 4
read(4, "Name:\tkworker/9:1-events\nUmask:\t"..., 2048) = 758
close(4) = 0
openat(AT_FDCWD, "/proc/151970/environ", O_RDONLY) = -1 EACCES (Brak dostępu)
openat(AT_FDCWD, "/proc/151970/cmdline", O_RDONLY) = 4
read(4, "", 131072) = 0
close(4) = 0
openat(AT_FDCWD, "/proc/151970/ctty", O_RDONLY) = -1 ENOENT (Nie ma takiego pliku ani katalogu)
newfstatat(AT_FDCWD, "/proc/151971", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0
openat(AT_FDCWD, "/proc/151971/stat", O_RDONLY) = 4
read(4, "151971 (kworker/5:2) I 2 0 0 0 -"..., 2048) = 165
close(4) = 0
openat(AT_FDCWD, "/proc/151971/status", O_RDONLY) = 4
read(4, "Name:\tkworker/5:2\nUmask:\t0000\nSt"..., 2048) = 749
close(4) = 0
openat(AT_FDCWD, "/proc/151971/environ", O_RDONLY) = -1 EACCES (Brak dostępu)
openat(AT_FDCWD, "/proc/151971/cmdline", O_RDONLY) = 4
read(4, "", 131072) = 0
close(4) = 0
openat(AT_FDCWD, "/proc/151971/ctty", O_RDONLY) = -1 ENOENT (Nie ma takiego pliku ani katalogu)
newfstatat(AT_FDCWD, "/proc/152058", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0
openat(AT_FDCWD, "/proc/152058/stat", O_RDONLY) = 4
read(4, "152058 (kworker/0:1) I 2 0 0 0 -"..., 2048) = 165
close(4) = 0
openat(AT_FDCWD, "/proc/152058/status", O_RDONLY) = 4
read(4, "Name:\tkworker/0:1\nUmask:\t0000\nSt"..., 2048) = 749
close(4) = 0
openat(AT_FDCWD, "/proc/152058/environ", O_RDONLY) = -1 EACCES (Brak dostępu)
openat(AT_FDCWD, "/proc/152058/cmdline", O_RDONLY) = 4
read(4, "", 131072) = 0
close(4) = 0
openat(AT_FDCWD, "/proc/152058/ctty", O_RDONLY) = -1 ENOENT (Nie ma takiego pliku ani katalogu)
newfstatat(AT_FDCWD, "/proc/152089", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0
openat(AT_FDCWD, "/proc/152089/stat", O_RDONLY) = 4
read(4, "152089 (java) S 1663 1663 1663 0"..., 2048) = 339
close(4) = 0
openat(AT_FDCWD, "/proc/152089/status", O_RDONLY) = 4
read(4, "Name:\tjava\nUmask:\t0022\nState:\tS "..., 2048) = 1177
close(4) = 0
openat(AT_FDCWD, "/proc/152089/environ", O_RDONLY) = 4
read(4,
cat /proc/152089/status
:
Name: java
Umask: 0022
State: S (sleeping)
Tgid: 152089
Ngid: 0
Pid: 152089
PPid: 1663
TracerPid: 0
Uid: 1000 1000 1000 1000
Gid: 1000 1000 1000 1000
FDSize: 256
Groups: 90 98 959 984 987 991 994 996 998 1000
NStgid: 152089
NSpid: 152089
NSpgid: 1663
NSsid: 1663
VmPeak: 20889548 kB
VmSize: 20889548 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 1406604 kB
VmRSS: 1406604 kB
RssAnon: 1079756 kB
RssFile: 326716 kB
RssShmem: 132 kB
VmData: 1448488 kB
VmStk: 140 kB
VmExe: 4 kB
VmLib: 41436 kB
VmPTE: 5404 kB
VmSwap: 0 kB
HugetlbPages: 0 kB
CoreDumping: 0
THP_enabled: 1
Threads: 234
SigQ: 3/127234
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000001000
SigCgt: 2000000101004cef
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
CapBnd: 000001ffffffffff
CapAmb: 0000000000000000
NoNewPrivs: 0
Seccomp: 0
Seccomp_filters: 0
Speculation_Store_Bypass: thread vulnerable
SpeculationIndirectBranch: conditional enabled
Cpus_allowed: ffffff
Cpus_allowed_list: 0-23
Mems_allowed: 00000001
Mems_allowed_list: 0
voluntary_ctxt_switches: 38
nonvoluntary_ctxt_switches: 12
cat /proc/152089/environ
挂起。sudo cat /proc/152089/stack
:
[<0>] futex_wait_queue+0x63/0x90
[<0>] futex_wait+0x189/0x270
[<0>] do_futex+0xc6/0x190
[<0>] __x64_sys_futex+0x129/0x1e0
[<0>] do_syscall_64+0x5d/0x90
[<0>] entry_SYSCALL_64_after_hwframe+0x64/0xce
dmesg:https://pastebin.com/Uy1kjZrX
它看起来像一些多线程问题,但我不知道该怎么解决。