DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] test: fix hang on FreeBSD
@ 2018-05-21 11:35 Radu Nicolau
  2018-05-21 12:30 ` Thomas Monjalon
  2018-05-21 13:28 ` Burakov, Anatoly
  0 siblings, 2 replies; 7+ messages in thread
From: Radu Nicolau @ 2018-05-21 11:35 UTC (permalink / raw)
  To: dev; +Cc: thomas, ferruh.yigit, Radu Nicolau, stable

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
 test/test/test_debug.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/test/test_debug.c b/test/test/test_debug.c
index faf2cf5..56fadce 100644
--- a/test/test/test_debug.c
+++ b/test/test/test_debug.c
@@ -34,7 +34,8 @@ test_panic(void)
 		printf("Fork Failed\n");
 		return -1;
 	}
-	wait(&status);
+	sleep(1);
+	waitpid(pid, &status, WNOHANG);
 	if(status == 0){
 		printf("Child process terminated normally!\n");
 		return -1;
-- 
2.7.5

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] test: fix hang on FreeBSD
  2018-05-21 11:35 [dpdk-dev] [PATCH] test: fix hang on FreeBSD Radu Nicolau
@ 2018-05-21 12:30 ` Thomas Monjalon
  2018-05-21 12:58   ` Radu Nicolau
  2018-05-21 13:28 ` Burakov, Anatoly
  1 sibling, 1 reply; 7+ messages in thread
From: Thomas Monjalon @ 2018-05-21 12:30 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: dev, ferruh.yigit, stable

21/05/2018 13:35, Radu Nicolau:
> Fixes: af75078fece3 ("first public release")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> ---
> @@ -34,7 +34,8 @@ test_panic(void)
>  		printf("Fork Failed\n");
>  		return -1;
>  	}
> -	wait(&status);
> +	sleep(1);
> +	waitpid(pid, &status, WNOHANG);

Please give an explanation why you are adding this sleep.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] test: fix hang on FreeBSD
  2018-05-21 12:30 ` Thomas Monjalon
@ 2018-05-21 12:58   ` Radu Nicolau
  2018-05-21 13:16     ` Thomas Monjalon
  2018-05-21 16:13     ` Stephen Hemminger
  0 siblings, 2 replies; 7+ messages in thread
From: Radu Nicolau @ 2018-05-21 12:58 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, ferruh.yigit, stable



On 5/21/2018 1:30 PM, Thomas Monjalon wrote:
> 21/05/2018 13:35, Radu Nicolau:
>> Fixes: af75078fece3 ("first public release")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
>> ---
>> @@ -34,7 +34,8 @@ test_panic(void)
>>   		printf("Fork Failed\n");
>>   		return -1;
>>   	}
>> -	wait(&status);
>> +	sleep(1);
>> +	waitpid(pid, &status, WNOHANG);
> Please give an explanation why you are adding this sleep.
>
To give a chance to the child process to complete before calling waitpid.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] test: fix hang on FreeBSD
  2018-05-21 12:58   ` Radu Nicolau
@ 2018-05-21 13:16     ` Thomas Monjalon
  2018-05-21 16:13     ` Stephen Hemminger
  1 sibling, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2018-05-21 13:16 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: dev, ferruh.yigit, stable

21/05/2018 14:58, Radu Nicolau:
> 
> On 5/21/2018 1:30 PM, Thomas Monjalon wrote:
> > 21/05/2018 13:35, Radu Nicolau:
> >> Fixes: af75078fece3 ("first public release")
> >> Cc: stable@dpdk.org
> >>
> >> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> >> ---
> >> @@ -34,7 +34,8 @@ test_panic(void)
> >>   		printf("Fork Failed\n");
> >>   		return -1;
> >>   	}
> >> -	wait(&status);
> >> +	sleep(1);
> >> +	waitpid(pid, &status, WNOHANG);
> > Please give an explanation why you are adding this sleep.
> >
> To give a chance to the child process to complete before calling waitpid.

One second in an unit test is a lot.

When I was asking for explanation, I mean usual explanations in commit message:
	- what is the issue
	- what is the root cause
	- what is the reasoning behind the fix

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] test: fix hang on FreeBSD
  2018-05-21 11:35 [dpdk-dev] [PATCH] test: fix hang on FreeBSD Radu Nicolau
  2018-05-21 12:30 ` Thomas Monjalon
@ 2018-05-21 13:28 ` Burakov, Anatoly
  2018-05-21 13:33   ` Radu Nicolau
  1 sibling, 1 reply; 7+ messages in thread
From: Burakov, Anatoly @ 2018-05-21 13:28 UTC (permalink / raw)
  To: Radu Nicolau, dev; +Cc: thomas, ferruh.yigit, stable

On 21-May-18 12:35 PM, Radu Nicolau wrote:
> Fixes: af75078fece3 ("first public release")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> ---
>   test/test/test_debug.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/test/test/test_debug.c b/test/test/test_debug.c
> index faf2cf5..56fadce 100644
> --- a/test/test/test_debug.c
> +++ b/test/test/test_debug.c
> @@ -34,7 +34,8 @@ test_panic(void)
>   		printf("Fork Failed\n");
>   		return -1;
>   	}
> -	wait(&status);
> +	sleep(1);
> +	waitpid(pid, &status, WNOHANG);
>   	if(status == 0){
>   		printf("Child process terminated normally!\n");
>   		return -1;
> 

I'd be curious to see which specific problem you are addressing as well. 
FreeBSD hanging on abort is a known issue, and a workaround is already 
available:

http://dpdk.org/dev/patchwork/patch/40256/

FreeBSD doesn't really "hang" here, it just spends a looooooooooooooong 
time doing the core dump because FreeBSD, unlike Linux, doesn't ignore 
hugepage and zero-page anonymous memory for core dumps, resulting in it 
trying to dump the entire 128 gigabytes of VA space that we preallocate.

Setting resource limits will address the immediate issue, a more 
complete fix (some memory subsystem refactor) will be coming for 18.08.

-- 
Thanks,
Anatoly

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] test: fix hang on FreeBSD
  2018-05-21 13:28 ` Burakov, Anatoly
@ 2018-05-21 13:33   ` Radu Nicolau
  0 siblings, 0 replies; 7+ messages in thread
From: Radu Nicolau @ 2018-05-21 13:33 UTC (permalink / raw)
  To: Burakov, Anatoly, dev; +Cc: thomas, ferruh.yigit, stable



On 5/21/2018 2:28 PM, Burakov, Anatoly wrote:
> On 21-May-18 12:35 PM, Radu Nicolau wrote:
>> Fixes: af75078fece3 ("first public release")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
>> ---
>>   test/test/test_debug.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/test/test/test_debug.c b/test/test/test_debug.c
>> index faf2cf5..56fadce 100644
>> --- a/test/test/test_debug.c
>> +++ b/test/test/test_debug.c
>> @@ -34,7 +34,8 @@ test_panic(void)
>>           printf("Fork Failed\n");
>>           return -1;
>>       }
>> -    wait(&status);
>> +    sleep(1);
>> +    waitpid(pid, &status, WNOHANG);
>>       if(status == 0){
>>           printf("Child process terminated normally!\n");
>>           return -1;
>>
>
> I'd be curious to see which specific problem you are addressing as 
> well. FreeBSD hanging on abort is a known issue, and a workaround is 
> already available:
>
> http://dpdk.org/dev/patchwork/patch/40256/
>
> FreeBSD doesn't really "hang" here, it just spends a 
> looooooooooooooong time doing the core dump because FreeBSD, unlike 
> Linux, doesn't ignore hugepage and zero-page anonymous memory for core 
> dumps, resulting in it trying to dump the entire 128 gigabytes of VA 
> space that we preallocate.
>
> Setting resource limits will address the immediate issue, a more 
> complete fix (some memory subsystem refactor) will be coming for 18.08.
>

So it seems my "fix" only hides the issue and doesn't actually fix 
anything - so I will remove it from patchwork

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] test: fix hang on FreeBSD
  2018-05-21 12:58   ` Radu Nicolau
  2018-05-21 13:16     ` Thomas Monjalon
@ 2018-05-21 16:13     ` Stephen Hemminger
  1 sibling, 0 replies; 7+ messages in thread
From: Stephen Hemminger @ 2018-05-21 16:13 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: Thomas Monjalon, dev, ferruh.yigit, stable

On Mon, 21 May 2018 13:58:39 +0100
Radu Nicolau <radu.nicolau@intel.com> wrote:

> On 5/21/2018 1:30 PM, Thomas Monjalon wrote:
> > 21/05/2018 13:35, Radu Nicolau:  
> >> Fixes: af75078fece3 ("first public release")
> >> Cc: stable@dpdk.org
> >>
> >> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> >> ---
> >> @@ -34,7 +34,8 @@ test_panic(void)
> >>   		printf("Fork Failed\n");
> >>   		return -1;
> >>   	}
> >> -	wait(&status);
> >> +	sleep(1);
> >> +	waitpid(pid, &status, WNOHANG);  
> > Please give an explanation why you are adding this sleep.
> >  
> To give a chance to the child process to complete before calling waitpid.


Should not be necessary; waitpid does that.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-05-21 16:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-21 11:35 [dpdk-dev] [PATCH] test: fix hang on FreeBSD Radu Nicolau
2018-05-21 12:30 ` Thomas Monjalon
2018-05-21 12:58   ` Radu Nicolau
2018-05-21 13:16     ` Thomas Monjalon
2018-05-21 16:13     ` Stephen Hemminger
2018-05-21 13:28 ` Burakov, Anatoly
2018-05-21 13:33   ` Radu Nicolau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).