Skip to content
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

Can't run 0.4.5 #7

Closed
garywill opened this issue Feb 16, 2019 · 10 comments
Closed

Can't run 0.4.5 #7

garywill opened this issue Feb 16, 2019 · 10 comments

Comments

@garywill
Copy link

Hello there,
Thank you for this interesting program.
Can't run 0.4.5 on Linux x86_64.

$ RUST_BACKTRACE=1 ./procs 
thread 'main' panicked at 'Failed to unwrap map.remove("Umask"). Please report this as a procfs bug.', /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/procfs-0.4.5/src/process.rs:1346:59
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:59
             at src/libstd/panicking.rs:211
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:227
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:491
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:398
   6: std::panicking::begin_panic_fmt
             at src/libstd/panicking.rs:353
   7: procfs::process::Status::from_reader
   8: procfs::process::Process::status
   9: procs::run_opt_config
  10: procs::main
  11: std::rt::lang_start::{{closure}}
  12: std::panicking::try::do_call
             at src/libstd/rt.rs:59
             at src/libstd/panicking.rs:310
  13: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:102
  14: std::rt::lang_start_internal
             at src/libstd/panicking.rs:289
             at src/libstd/panic.rs:398
             at src/libstd/rt.rs:58
  15: main

Running 0.4.4 OK, but there are odd empty between lines

 PID   User       | State Nice TTY   CPU MEM  VSZ      RSS      TCP    UDP Read  Write | CPU Time Start            | Command                                                                                                        
                                                                                                                                                                                                                                    
                                                                                     
                  |                  [%] [%]  [bytes]  [bytes]             [B/s] [B/s] |                           |                                                                                                                
                                                                                                                                                                                                                                    
                                                                                     
 1     root       | S     0          0.0 0.2  217.703M 9.344M                          | 00:00:05 2019/02/15 18:37 | /usr/lib/systemd/systemd --switched-root --system --deserialize 24                                             
                                                                                                                                                                                                                                    
                                                                                     
 2     root       | S     0          0.0 0.0  0        0                               | 00:00:00 2019/02/15 18:37 | kthreadd                                                                                                       
                                                                                                                                                                                                                                    
                                                                                     
 4     root       | S     -20        0.0 0.0  0        0                               | 00:00:00 2019/02/15 18:37 | kworker/0:0H                                                                                                   
 
@dalance
Copy link
Owner

dalance commented Feb 16, 2019

Could you write your Linux distribution and kernel version?
The first problem seems to be failure to check kernel version.
The second is actually odd..

@garywill
Copy link
Author

openSUSE 15.0
kernel 4.12.14-lp150.12.45-default

@dalance
Copy link
Owner

dalance commented Feb 16, 2019

I can reproduce the second problem, so it will be fixed at v0.4.6.
But the first problem doesn't occur at openSUSE 15.0 with kernel 4.12.14-lp150.11-default.
Could you execute cat /proc/1/status and paste the result?

@garywill
Copy link
Author

$ cat /proc/1/status
Name:	systemd
Umask:	0000
State:	S (sleeping)
Tgid:	1
Ngid:	0
Pid:	1
PPid:	0
TracerPid:	0
Uid:	0	0	0	0
Gid:	0	0	0	0
FDSize:	256
Groups:	 
NStgid:	1
NSpid:	1
NSpgid:	1
NSsid:	1
VmPeak:	  288472 kB
VmSize:	  222936 kB
VmLck:	       0 kB
VmPin:	       0 kB
VmHWM:	    9668 kB
VmRSS:	    9668 kB
RssAnon:	    2828 kB
RssFile:	    6840 kB
RssShmem:	       0 kB
VmData:	   19096 kB
VmStk:	     132 kB
VmExe:	     984 kB
VmLib:	    9596 kB
VmPTE:	     168 kB
VmPMD:	      16 kB
VmSwap:	       0 kB
HugetlbPages:	       0 kB
Threads:	1
SigQ:	0/14181
SigPnd:	0000000000000000
ShdPnd:	0000000000000000
SigBlk:	7be3c0fe28014a03
SigIgn:	0000000000001000
SigCgt:	00000001800004ec
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,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list:	0
voluntary_ctxt_switches:	1821
nonvoluntary_ctxt_switches:	324

Odd thing happened just now. I rebooted PC, then 0.4.5 could run. Then, after about 5 minutes, I tried again and it couldn't run.

PS: process exit code 101

@garywill
Copy link
Author

I think I found what's causing it. It's uget and it's backend aria2c

tcp    LISTEN     0      128    127.0.0.1:6800               0.0.0.0:*                   users:(("aria2c",pid=22288,fd=6))

tcp    ESTAB      0      0      127.0.0.1:44988              127.0.0.1:6800                users:(("uget-gtk",pid=22280,fd=20))
tcp    ESTAB      0      0      127.0.0.1:6800               127.0.0.1:44988               users:(("aria2c",pid=22288,fd=7))

tcp    SYN-SENT   0      1      192.168.x.x:52130              172.217.160.110:80                  users:(("uget-gtk",pid=22280,fd=12))
tcp    SYN-SENT   0      1       [fe80::xxxx:xxx:xxxx:xxxx]:56972                [2404:6800:4008:801::200e]:80                  users:(("uget-gtk",pid=22280,fd=18))


user    22280  4429  2 19:07 ?        00:00:00 uget-gtk
user    22285 22280  0 19:07 ?        00:00:00 [aria2c] <defunct>
user    22288     1  0 19:07 ?        00:00:00 aria2c -c -x16 -s10 -k1M --enable-rpc=true -D --disable-ipv6 --check-certificate=false

Close uget and wait for about 5 sec, then it can run.

@dalance
Copy link
Owner

dalance commented Feb 16, 2019

Could you check cat /proc/[uget's pid or aria2c's pid]/status?
Do these include Umask entry?

@garywill
Copy link
Author

Name:	uget-gtk
Umask:	0022
State:	S (sleeping)
Tgid:	28651
Ngid:	0
Pid:	28651
PPid:	4429
TracerPid:	0
Uid:	1000	1000	1000	1000
Gid:	100	100	100	100
FDSize:	64
Groups:	33 100 460 461 463 479 480 
NStgid:	28651
NSpid:	28651
NSpgid:	3902
NSsid:	3902
VmPeak:	 1067012 kB
VmSize:	 1001476 kB
VmLck:	       0 kB
VmPin:	       0 kB
VmHWM:	   47740 kB
VmRSS:	   47740 kB
RssAnon:	   10968 kB
RssFile:	   36612 kB
RssShmem:	     160 kB
VmData:	   68184 kB
VmStk:	     132 kB
VmExe:	     392 kB
VmLib:	   40776 kB
VmPTE:	     616 kB
VmPMD:	      16 kB
VmSwap:	       0 kB
HugetlbPages:	       0 kB
Threads:	7
SigQ:	0/14181
SigPnd:	0000000000000000
ShdPnd:	0000000000000000
SigBlk:	0000000000000000
SigIgn:	0000000000001000
SigCgt:	0000000180004022
CapInh:	0000000000000000
CapPrm:	0000000000000000
CapEff:	0000000000000000
CapBnd:	0000003fffffffff
CapAmb:	0000000000000000
NoNewPrivs:	0
Seccomp:	0
Speculation_Store_Bypass:	thread vulnerable
Cpus_allowed:	ff
Cpus_allowed_list:	0-7
Mems_allowed:	00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list:	0
voluntary_ctxt_switches:	430
nonvoluntary_ctxt_switches:	29
Name:	aria2c
State:	Z (zombie)
Tgid:	28656
Ngid:	0
Pid:	28656
PPid:	28651
TracerPid:	0
Uid:	1000	1000	1000	1000
Gid:	100	100	100	100
FDSize:	0
Groups:	33 100 460 461 463 479 480 
NStgid:	28656
NSpid:	28656
NSpgid:	3902
NSsid:	3902
Threads:	1
SigQ:	0/14181
SigPnd:	0000000000000000
ShdPnd:	0000000000000000
SigBlk:	0000000000000000
SigIgn:	0000000000001000
SigCgt:	0000000180000000
CapInh:	0000000000000000
CapPrm:	0000000000000000
CapEff:	0000000000000000
CapBnd:	0000003fffffffff
CapAmb:	0000000000000000
NoNewPrivs:	0
Seccomp:	0
Speculation_Store_Bypass:	thread vulnerable
Cpus_allowed:	ff
Cpus_allowed_list:	0-7
Mems_allowed:	00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list:	0
voluntary_ctxt_switches:	1
nonvoluntary_ctxt_switches:	1
Name:	aria2c
Umask:	0022
State:	S (sleeping)
Tgid:	28659
Ngid:	0
Pid:	28659
PPid:	1
TracerPid:	0
Uid:	1000	1000	1000	1000
Gid:	100	100	100	100
FDSize:	64
Groups:	33 100 460 461 463 479 480 
NStgid:	28659
NSpid:	28659
NSpgid:	28659
NSsid:	28659
VmPeak:	   72244 kB
VmSize:	   72244 kB
VmLck:	       0 kB
VmPin:	       0 kB
VmHWM:	    6376 kB
VmRSS:	    6376 kB
RssAnon:	    1196 kB
RssFile:	    5180 kB
RssShmem:	       0 kB
VmData:	     904 kB
VmStk:	     132 kB
VmExe:	       8 kB
VmLib:	   18920 kB
VmPTE:	     140 kB
VmPMD:	      12 kB
VmSwap:	       0 kB
HugetlbPages:	       0 kB
Threads:	1
SigQ:	0/14181
SigPnd:	0000000000000000
ShdPnd:	0000000000000000
SigBlk:	0000000000000000
SigIgn:	0000000000011000
SigCgt:	0000000180004003
CapInh:	0000000000000000
CapPrm:	0000000000000000
CapEff:	0000000000000000
CapBnd:	0000003fffffffff
CapAmb:	0000000000000000
NoNewPrivs:	0
Seccomp:	0
Speculation_Store_Bypass:	thread vulnerable
Cpus_allowed:	ff
Cpus_allowed_list:	0-7
Mems_allowed:	00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list:	0
voluntary_ctxt_switches:	134
nonvoluntary_ctxt_switches:	0

@dalance
Copy link
Owner

dalance commented Feb 16, 2019

Thanks. I understood it and I'll fix.

dalance added a commit that referenced this issue Feb 18, 2019
@dalance
Copy link
Owner

dalance commented Feb 18, 2019

I released v0.4.7. Could you try it?

@garywill
Copy link
Author

0.4.7 runs fine with uget

@dalance dalance closed this as completed Feb 19, 2019
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