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

Assertion tmp process failed #27

Open
emmanuelgeoffray opened this issue Jan 9, 2014 · 11 comments
Open

Assertion tmp process failed #27

emmanuelgeoffray opened this issue Jan 9, 2014 · 11 comments

Comments

@emmanuelgeoffray
Copy link

Good morning!

Running $ cpulimit -l 240 python myscript.py
on a quad-core debian
with the master branch at this date
After 20 minutes, I get:

cpulimit: process_group.c:203: update_process_group: Assertion `tmp_process.ppid == p->ppid' failed. 

myscript.py runs 60 to 120 child process.

Any clue how to fix that?

Thank you,
Emmanuel

@opsengine
Copy link
Owner

Hi,

Can you send a minimal version of your python script so I can reproduce?

Thanks
Angelo

2014/1/9 Emmanuel Geoffray notifications@github.com

Good morning!

Running $ cpulimit -l 240 python myscript.py
on a quad-core debian
with the master branch at this date
After 20 minutes, I get:

cpulimit: process_group.c:203: update_process_group: Assertion `tmp_process.ppid == p->ppid' failed.

myscript.py runs 60 to 120 child process.

Any clue how to fix that?

Thank you,
Emmanuel


Reply to this email directly or view it on GitHubhttps://github.com//issues/27
.

Angelo Marletta

@emmanuelgeoffray
Copy link
Author

Hey,
Thanks for replying so quickly.
The script is on this repo

There's a install_dependencies.sh script, mostly to download/install python libs.
After that, you can run the script with cpu-limit:

$ cpulimit -l 240 python run_webcams.py

Thanks!
Emmanuel

@emmanuelgeoffray
Copy link
Author

I changed some things in my script to get it running for now, without cpulimit.
So if you test the script, make sure you use the commit mentioned in the link above.
Thanks!
Emmanuel

@zarere
Copy link

zarere commented Dec 23, 2014

Hi Angelo,

Is there a fix for the bug mentioned here?

@opsengine
Copy link
Owner

The issue should be solved. Please confirm.

@zarere
Copy link

zarere commented Jan 13, 2015

Hi Angelo,

Sorry for the late reply.Now I get the following error:

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

@zarere
Copy link

zarere commented Jan 13, 2015

Hi Angelo,

Here is some more information which program I'm using.I'm using it that way:

martin@maleksov ~ $ sudo cpulimit -l 200 -i -p 5248
Process 5248 found
cpulimit: process_group.c:175: update_process_group: Assertion `tmp_process.starttime == p->starttime' failed

http://dox.bg/files/dw?a=7cc855d269

@zarere
Copy link

zarere commented Jan 26, 2015

Hi Angelo,

Any idea when the issue with the
cpulimit: process_group.c:175: update_process_group: Assertion `tmp_process.starttime == p->starttime' failed
is going to be fixed.

Thanks in advance.

@zarere
Copy link

zarere commented Feb 16, 2015

Hi Angelo,

Any updates?

BR
Martin

@Berbe
Copy link

Berbe commented Aug 19, 2015

Hello,
Are there any news on this bug? I am experiencing very frequently the exact error message @zarere just told about:
cpulimit: process_group.c:175: update_process_group: Assertion tmp_process.starttime == p->starttime' failed`
The consequence is the process being run crashes in a dirty manner...

I am really considering giving cpulimit up and use the nice command along with some regular checks using the renice one.
Any news on the matter?

@arstercz
Copy link

arstercz commented Jun 4, 2020

I have the same error when use mongodump, but it's ok when backup without -i option:

$ cpulimit -l 80 -i mongodump  --host=localhost --db=sbtest1 --numParallelCollections=4 --out=/data/backup
T=1591260162.399432 PID=12771 PPID=12770 START=15192000 CPUTIME=10
2020-06-04T16:42:42.400+0800    writing sbtest1.sbtest1 to 
2020-06-04T16:42:42.410+0800    done dumping sbtest1.sbtest1 (1013 documents)
T=1591260162.417804 PID=12771 PPID=1852402733 START=2016245877 CPUTIME=912209464
cpulimit: process_group.c:175: update_process_group: Assertion `tmp_process.starttime == p->starttime' failed.

$ cpulimit -l 80  mongodump  --host=localhost --db=sbtest1 --numParallelCollections=4 --out=/data/backup
T=1591262671.908695 PID=43043 PPID=43042 START=15194510 CPUTIME=0
T=1591262671.909086 PID=43043 PPID=43042 START=15194510 CPUTIME=0
2020-06-04T17:24:31.924+0800    writing sbtest1.sbtest1 to 
2020-06-04T17:24:31.934+0800    done dumping sbtest1.sbtest1 (1013 documents)

it seems something was wrong in get_next_process so that tmp_process get wrong starttime or cputime:

diff --git a/src/process_group.c b/src/process_group.c
index 06d73a6..5285922 100644
--- a/src/process_group.c
+++ b/src/process_group.c
@@ -141,9 +141,9 @@ void update_process_group(struct process_group *pgroup)
 
        while (get_next_process(&it, &tmp_process) != -1)
        {
-//             struct timeval t;
-//             gettimeofday(&t, NULL);
-//             printf("T=%ld.%ld PID=%d PPID=%d START=%d CPUTIME=%d\n", t.tv_sec, t.tv_usec, tmp_process.pid, tmp_process.ppid, tmp_process.starttime, tmp_process.cputime);
+               struct timeval t;
+               gettimeofday(&t, NULL);
+               printf("T=%ld.%ld PID=%d PPID=%d START=%d CPUTIME=%d\n", t.tv_sec, t.tv_usec, tmp_process.pid, tmp_process.ppid, tmp_process.starttime, tmp_process.cputime);
                int hashkey = pid_hashfn(tmp_process.pid);
                if (pgroup->proctable[hashkey] == NULL)

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

5 participants