Skip to content

Assertion `tmp_process.starttime == p->starttime' failed #104

@davidwagner

Description

@davidwagner

Today I got the following assertion failure from cpulimit:

cpulimit: process_group.c:179: update_process_group: Assertion `tmp_process.starttime == p->starttime' failed.

It happene after the command I was running under cpulimit terminated with an error. However I don't seem to be able to reproduce it.

I'm running on Fedora 35, with cpulimit-0.2-15.20151118gitf4d2682.fc35.x86_64 installed.

Here is a backtrace:

#5  0x00007fe2eb858396 in __GI___assert_fail (
    assertion=assertion@entry=0x4052f0 "tmp_process.starttime == p->starttime", file=file@entry=0x4056b6 "process_group.c", line=line@entry=179, 
    function=function@entry=0x4058c0 <__PRETTY_FUNCTION__.0> "update_process_group") at assert.c:101
#6  0x0000000000403d7f in update_process_group (pgroup=0x407e40 <pgroup>)
    at /usr/src/debug/cpulimit-0.2-15.20151118gitf4d2682.fc35.x86_64/src/process_group.c:179
#7  0x0000000000403eb5 in limit_process (pid=pid@entry=357699, 
    limit=limit@entry=0.5, include_children=include_children@entry=1)
    at /usr/src/debug/cpulimit-0.2-15.20151118gitf4d2682.fc35.x86_64/src/cpulimit.c:231
#8  0x0000000000402ca3 in main (argc=<optimized out>, argv=<optimized out>)
    at /usr/src/debug/cpulimit-0.2-15.20151118gitf4d2682.fc35.x86_64/src/cpulimit.c:492

and here is some information on the value of those two variables in frame 6:

(gdb) print &tmp_process
$7 = (struct process *) 0x7ffed4fa2bb0
(gdb) print tmp_process
$8 = {pid = 357699, ppid = 357699, starttime = 540209, cputime = 20, 
  cpu_usage = -1, 
  command = "rpmkeys\000/python3", '\000' <repeats 144 times>, "\016H\246\353\342\177\000\000\000\260\250\353\342\177\000\000\000\061\372\324\376\177\000\000@Ё\353\342\177\000\000)\024\246\353\342\177\000\000\006"...}
(gdb) print p
$9 = (struct process *) 0x204a940
(gdb) print *p
$10 = {pid = 357699, ppid = 357698, starttime = 540170, cputime = 4850, 
  cpu_usage = 0.031009276549690552, 
  command = "/usr/bin/python3", '\000' <repeats 144 times>, "\016H\246\353\342\177\000\000\000\260\250\353\342\177\000\000\000\061\372\324\376\177\000\000@Ё\353\342\177\000\000)\024\246\353\342\177\000\000\006"...}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions