-
-
Notifications
You must be signed in to change notification settings - Fork 405
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
crash open #592
Comments
Can you get a full backtrace ( |
Program received signal SIGFPE, Arithmetic exception.
0x000055555557fdf2 in LinuxProcessList_readIoFile (now=0, procFd=6, process=0x555555670590) at linux/LinuxProcessList.c:429
429 process->io_rate_read_bps = ONE_K * (process->io_read_bytes - last_read) / (now - process->io_last_scan_time);
(gdb) bt
#0 0x000055555557fdf2 in LinuxProcessList_readIoFile (now=0, procFd=6, process=0x555555670590) at linux/LinuxProcessList.c:429
#1 LinuxProcessList_recurseProcTree (this=this@entry=0x5555555a0890, parentFd=parentFd@entry=-100,
dirname=dirname@entry=0x55555558d424 "/proc", parent=parent@entry=0x0, period=period@entry=20081708.5, now=0)
at linux/LinuxProcessList.c:1344
#2 0x000055555558226a in ProcessList_goThroughEntries (super=super@entry=0x5555555a0890,
pauseProcessUpdate=pauseProcessUpdate@entry=false) at linux/LinuxProcessList.c:2000
#3 0x00005555555753a7 in ProcessList_scan (this=this@entry=0x5555555a0890, pauseProcessUpdate=pauseProcessUpdate@entry=false)
at ProcessList.c:615
#4 0x000055555556856d in CommandLine_run (name=<optimized out>, argc=<optimized out>, argv=<optimized out>) at CommandLine.c:335
#5 0x00007ffff7bf50b3 in __libc_start_main (main=0x5555555646b0 <main>, argc=1, argv=0x7fffffffe5f8, init=<optimized out>,
fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe5e8) at ../csu/libc-start.c:308
#6 0x00005555555646fe in _start ()
(gdb) bt full 3
#0 0x000055555557fdf2 in LinuxProcessList_readIoFile (now=0, procFd=6, process=0x555555670590) at linux/LinuxProcessList.c:429
buffer = "rchar: 19374125417\000wchar: 36455852379\000syscr: 6309305\000syscw: 8378424\000read_bytes: 9826943488\000write_bytes: 11302940672\ncancelled_write_bytes: 457519104\n", '\000' <repeats 43 times>, "\002\000\000\000\000\000\000\000"...
last_read = 0
last_write = 0
buf = 0x7fffffffd88b "write_bytes: 11302940672\ncancelled_write_bytes: 457519104\n"
line = <optimized out>
r = <optimized out>
buffer = <optimized out>
r = <optimized out>
last_read = <optimized out>
last_write = <optimized out>
buf = <optimized out>
line = <optimized out>
#1 LinuxProcessList_recurseProcTree (this=this@entry=0x5555555a0890, parentFd=parentFd@entry=-100,
dirname=dirname@entry=0x55555558d424 "/proc", parent=parent@entry=0x0, period=period@entry=20081708.5, now=0)
at linux/LinuxProcessList.c:1344
pid = <optimized out>
proc = <optimized out>
procFd = 6
command = "\272\005\016\001", '\000' <repeats 28 times>, "\060 0 0 0 \000\004(\371\034(\250\071\300\342YUUU\000\000\240\264\333\367\377\177\000\000\240\244\333\367\377\177\000\000P0\306\367\377\177\000\000\300\342YUUU\000\000\300\342YUUU\000\000\240\250\333\367\377\177\000\000\037\035\306\367\377\177\000\000\060 0 0 0 0 0 0 0 0"
lasttimes = <optimized out>
tty_nr = <optimized out>
lp = <optimized out>
percent_cpu = <optimized out>
name = <optimized out>
preExisting = false
pl = <optimized out>
entry = <optimized out>
settings = 0x5555555bcaf0
dirFd = 5
dir = <optimized out>
cpus = 4
hideKernelThreads = true
hideUserlandThreads = false
__PRETTY_FUNCTION__ = "LinuxProcessList_recurseProcTree"
#2 0x000055555558226a in ProcessList_goThroughEntries (super=super@entry=0x5555555a0890,
pauseProcessUpdate=pauseProcessUpdate@entry=false) at linux/LinuxProcessList.c:2000
this = 0x5555555a0890
settings = 0x5555555bcaf0
period = 20081708.5
rootFd = -100
(More stack frames follow...)
|
@fasterit @wcasanova thanks - looking into it. |
@wcasanova could you try out PR #593 please? I've not been able to reproduce the crash locally but I believe this is the root cause here. |
#593 at 68585fa does not fix the Floating point exception for me. Breaking at !429 process->io_rate_read_bps = ONE_K * (process->io_read_bytes - last_read) / (now - process->io_last_scan_time);
>>> print now
$1 = 0
>>> print process->io_last_scan_time
$2 = 0
# for comparison:
>>> print process->io_read_bytes
$3 = 257432 And 0 - 0 is zero and that faults as a divisor. |
@natoscott still gives the error
|
@fasterit @wcasanova oh, my mistake - its happening in the very first call to ProcessList_scan, not the second as I thought:
So my earlier change did nothing for this case. I've pushed a followup commit to PR #593 - can you try that out once more? Thanks! |
The current version of #593 looks good. I cannot reproduce the FP exception anymore. |
lastest commit crash in open
archlinux
htop-dev-git-3.0.5.r204.gf3a37f9
The solution was to remove the htoprc, but when configuring it gives the same error, it seems to be when the disk read / write column is set.
IO_READ_RATE, IO_WRITE_RATE
The text was updated successfully, but these errors were encountered: