Skip to content

cannot parse /proc/pid/status on Linux 4.17.19 #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
symphorien opened this issue Sep 3, 2018 · 3 comments
Open

cannot parse /proc/pid/status on Linux 4.17.19 #40

symphorien opened this issue Sep 3, 2018 · 3 comments

Comments

@symphorien
Copy link

Error:

Err(Custom { kind: InvalidInput, error: StringError("unable to parse whole input, remaining: Ok(\"CoreDumping:\\t0\\nThreads:\\t1\\nSigQ:\\t0/31394\\nSigPnd:\\t0000000000000000\\nShdPnd:\\t0000000000000000\\nSigBlk:\\t0000000000000000\\nSigIgn:\\t0000000000004006\\nSigCgt:\\t0000000180000000\\nCapInh:\\t0000000000000000\\nCapPrm:\\t0000003fffffffff\\nCapEff:\\t0000003fffffffff\\nCapBnd:\\t0000003fffffffff\\nCapAmb:\\t0000000000000000\\nNoNewPrivs:\\t0\\nSeccomp:\\t0\\nSpeculation_Store_Bypass:\\tthread vulnerable\\nCpus_allowed:\\tff\\nCpus_allowed_list:\\t0-7\\nMems_allowed:\\t00000000,00000001\\nMems_allowed_list:\\t0\\nvoluntary_ctxt_switches:\\t3\\nnonvoluntary_ctxt_switches:\\t0\\n\")") })

corresponding /proc/pid/status

Name:	cat
Umask:	0022
State:	S (sleeping)
Tgid:	17417
Ngid:	0
Pid:	17417
PPid:	2011
TracerPid:	0
Uid:	0	0	0	0
Gid:	0	0	0	0
FDSize:	64
Groups:	0 
NStgid:	17417
NSpid:	17417
NSpgid:	2011
NSsid:	2011
VmPeak:	   16016 kB
VmSize:	   16016 kB
VmLck:	       0 kB
VmPin:	       0 kB
VmHWM:	     440 kB
VmRSS:	     440 kB
RssAnon:	      80 kB
RssFile:	     360 kB
RssShmem:	       0 kB
VmData:	     440 kB
VmStk:	     136 kB
VmExe:	    1428 kB
VmLib:	    2036 kB
VmPTE:	      68 kB
VmSwap:	       0 kB
HugetlbPages:	       0 kB
CoreDumping:	0
Threads:	1
SigQ:	0/31394
SigPnd:	0000000000000000
ShdPnd:	0000000000000000
SigBlk:	0000000000000000
SigIgn:	0000000000004006
SigCgt:	0000000180000000
CapInh:	0000000000000000
CapPrm:	0000003fffffffff
CapEff:	0000003fffffffff
CapBnd:	0000003fffffffff
CapAmb:	0000000000000000
NoNewPrivs:	0
Seccomp:	0
Speculation_Store_Bypass:	thread vulnerable
Cpus_allowed:	ff
Cpus_allowed_list:	0-7
Mems_allowed:	00000000,00000001
Mems_allowed_list:	0
voluntary_ctxt_switches:	3
nonvoluntary_ctxt_switches:	0

System: 4.17.19

@symphorien symphorien changed the title cannot part /proc/pid/status on Linux 4.17.19 cannot parse /proc/pid/status on Linux 4.17.19 Sep 3, 2018
@rendaw
Copy link

rendaw commented Jul 27, 2019

PR #38 seems to address this.

@symphorien
Copy link
Author

I am now on linux 5.1.11 and it #38 does not solve the problem:

unable to parse whole input, remaining: Ok("THP_enabled:\t1\nThreads:\t1\nSigQ:\t0/31381\nSigPnd:\t0000000000000000\nShdPnd:\t0000000000000000\nSigBlk:\t0000000000000000\nSigIgn:\t0000000000001000\nSigCgt:\t0000000000000000\nCapInh:\t0000000000000000\nCapPrm:\t00000000200534e2\nCapEff:\t00000000200534e2\nCapBnd:\t00000000200534e2\nCapAmb:\t0000000000000000\nNoNewPrivs:\t0\nSeccomp:\t0\nSpeculation_Store_Bypass:\tthread vulnerable\nCpus_allowed:\tff\nCpus_allowed_list:\t0-7\nMems_allowed:\t00000000,00000001\nMems_allowed_list:\t0\nvoluntary_ctxt_switches:\t10\nnonvoluntary_ctxt_switches:\t2\n")

@rendaw
Copy link

rendaw commented Jul 28, 2019

Ah, thanks for trying it. I guess I'll just go with regex myself then, at least for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants