Skip to contentSkip to conversation

child processes stall forever and don't get killed

bug Jan Stancek 2 participants 5 messages Sep 9, 2016 – Sep 13, 2016 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi,

I'm running v1.6-643-gecea2b06d5f3 on RHEL7.3 and I'm seeing an issue where all child processes stall and none of them is getting killed. They are usually in a syscalls like read, recv, nanosleep, etc.

I suspect this commit introduced the problem, because any syscall that started but not completed is now considered to "make progress":

commit ecf6dfd83d4c886d78d4605163cb8c3f1728db62
Author: Dave Jones <[email protected]>
Date: Fri Aug 12 15:05:01 2016 -0400

if we haven't done a syscall yet, treat child as "making progress".

Chances are that we haven't been scheduled because some other children are hogging the cpu.

I'm seeing more the opposite of what commit above says. Most CPUs are idle, because N-1 children are stuck in recv/read/... and last child manages to keep going. Then by a chance it also hits a syscall that doesn't complete and system stays idle (after ~hour I gave up waiting).

Regards,
Jan

#2 lore raw
Quoted 15 lines · Jan Stancek

Hi,

I'm running v1.6-643-gecea2b06d5f3 on RHEL7.3 and I'm seeing an issue where all child processes stall and none of them is getting killed. They are usually in a syscalls like read, recv, nanosleep, etc.

I suspect this commit introduced the problem, because any syscall that started but not completed is now considered to "make progress":

commit ecf6dfd83d4c886d78d4605163cb8c3f1728db62
Author: Dave Jones <[email protected]>
Date: Fri Aug 12 15:05:01 2016 -0400

if we haven't done a syscall yet, treat child as "making progress".

Quoted 8 lines

Chances are that we haven't been scheduled because some other children are hogging the cpu.

I'm seeing more the opposite of what commit above says. Most CPUs are idle, because N-1 children are stuck in recv/read/... and last child manages to keep going. Then by a chance it also hits a syscall that doesn't complete and system stays idle (after ~hour I gave up waiting).

Need to think some more on this, but as a quick guess... try replacing the <= BEFORE with < BEFORE

I'll try and find some time to look into this soon. I'm surprised I haven't also seen it happen though. How many CPUs & how many child processes ?

Dave

#3 lore raw

----- Original Message -----

Quoted 25 lines

From: "Dave Jones" <[email protected]>
To: "Jan Stancek" <[email protected]>
Cc: [email protected]
Sent: Friday, 9 September, 2016 3:32:36 PM
Subject: Re: [bug] child processes stall forever and don't get killed

Quoted 18 lines · Jan Stancek

Hi,

I'm running v1.6-643-gecea2b06d5f3 on RHEL7.3 and I'm seeing an issue where all child processes stall and none of them is getting killed. They are usually in a syscalls like read, recv, nanosleep, etc.

I suspect this commit introduced the problem, because any syscall that started but not completed is now considered to "make progress":

commit ecf6dfd83d4c886d78d4605163cb8c3f1728db62
Author: Dave Jones <[email protected]>
Date: Fri Aug 12 15:05:01 2016 -0400

if we haven't done a syscall yet, treat child as "making progress".

Chances are that we haven't been scheduled because some other children are hogging the cpu.

Quoted 8 lines
Quoted 5 lines

I'm seeing more the opposite of what commit above says. Most CPUs are idle, because N-1 children are stuck in recv/read/... and last child manages to keep going. Then by a chance it also hits a syscall that doesn't complete and system stays idle (after ~hour I gave up waiting).

Need to think some more on this, but as a quick guess... try replacing the <= BEFORE with < BEFORE

I've started new test with patch above reverted and that looks good so far. No stalls after 1 hour. Previously it stalled after ~20-30 minutes. I noticed that when syscall stat messages (those which show number of iteration) stopped appearing.

Quoted 4 lines

I'll try and find some time to look into this soon. I'm surprised I haven't also seen it happen though. How many CPUs & how many child processes ?

Anywhere from 2-8 CPUs, 8-32 children on x86_64, ppc64le and s390x systems (RHEL7.3 Beta). It happened usually within 20-30 minutes.

Regards,
Jan

Quoted 4 lines

Dave

#4 lore raw
Quoted 6 lines · Jan Stancek
Quoted 6 lines
Quoted 5 lines

I'm seeing more the opposite of what commit above says. Most CPUs are idle, because N-1 children are stuck in recv/read/... and last child manages to keep going. Then by a chance it also hits a syscall that doesn't complete and system stays idle (after ~hour I gave up waiting).

Quoted 7 lines
Quoted 2 lines

Need to think some more on this, but as a quick guess... try replacing the <= BEFORE with < BEFORE

I've started new test with patch above reverted and that looks good so far. No stalls after 1 hour. Previously it stalled after ~20-30 minutes. I noticed that when syscall stat messages (those which show number of iteration) stopped appearing.

Ok, I committed that, but with a minor change to widen how long we spend in BEFORE state slightly. I doubt that part will have a negative effect, but holler if it does..

Quoted 6 lines
Quoted 3 lines

I'll try and find some time to look into this soon. I'm surprised I haven't also seen it happen though. How many CPUs & how many child processes ?

Anywhere from 2-8 CPUs, 8-32 children on x86_64, ppc64le and s390x systems (RHEL7.3 Beta). It happened usually within 20-30 minutes.

Weird. I'm doing 24/7 runs on one quad core and didn't hit it. But I wonder if I was just fortunate enough that I had some children always making progress even if N-1 were stuck.

Dave

#5 lore raw

----- Original Message -----

Quoted 17 lines

From: "Dave Jones" <[email protected]>
To: "Jan Stancek" <[email protected]>
Cc: [email protected]
Sent: Saturday, 10 September, 2016 3:46:30 AM
Subject: Re: [bug] child processes stall forever and don't get killed

Quoted 9 lines · Jan Stancek
Quoted 8 lines
Quoted 5 lines

I'm seeing more the opposite of what commit above says. Most CPUs are idle, because N-1 children are stuck in recv/read/... and last child manages to keep going. Then by a chance it also hits a syscall that doesn't complete and system stays idle (after ~hour I gave up waiting).

Need to think some more on this, but as a quick guess... try replacing the <= BEFORE with < BEFORE

Quoted 8 lines
Quoted 4 lines

I've started new test with patch above reverted and that looks good so far. No stalls after 1 hour. Previously it stalled after ~20-30 minutes. I noticed that when syscall stat messages (those which show number of iteration) stopped appearing.

Ok, I committed that, but with a minor change to widen how long we spend in BEFORE state slightly. I doubt that part will have a negative effect, but holler if it does..

I applied this patch and I haven't seen stalls in over-night test.

Thanks,
Jan

Quoted 15 lines
Quoted 7 lines
Quoted 4 lines

I'll try and find some time to look into this soon. I'm surprised I haven't also seen it happen though. How many CPUs & how many child processes ?

Anywhere from 2-8 CPUs, 8-32 children on x86_64, ppc64le and s390x systems (RHEL7.3 Beta). It happened usually within 20-30 minutes.

Weird. I'm doing 24/7 runs on one quad core and didn't hit it. But I wonder if I was just fortunate enough that I had some children always making progress even if N-1 were stuck.

Dave