[LITMUS^RT] reached end-of-file on input event stream

Martinez Garcia Jorge Luis (PS-EC/ESB2) JorgeLuis.MartinezGarcia at de.bosch.com
Wed Oct 31 22:16:10 CET 2018


Dear Björn, 
Thank you for the explanation. I misunderstood the issue. 
By the way, I wanted to point out that if one is to use reservation-based plug-ins on the RPi3, CONFIG_RESERVATION_CLIENT_PRIORITY_DISPATCH in your Linux kernel configuration file should be set accordingly: 
https://gist.github.com/brandenburg/982fce066c59684d21855e1638b28631#file-config-L5027
Since in my case I wanted to get tasks that were mapped onto servers dispatched according to their priority, setting this configuration option and making the trace buffers as large as possible helped me to overcome my original " Failed trace writes" issue. 
Best, 
Jorge


-----Original Message-----
From: litmus-dev <litmus-dev-bounces at lists.litmus-rt.org> On Behalf Of Björn Brandenburg
Sent: Dienstag, 9. Oktober 2018 10:30
To: litmus-dev at lists.litmus-rt.org
Subject: Re: [LITMUS^RT] reached end-of-file on input event stream

On 7. Oct 2018, at 20:25, Martinez Garcia Jorge Luis (PS-EC/ESB2) <JorgeLuis.MartinezGarcia at de.bosch.com> wrote:
> 
> rm ./tmp/sequencePipe_0 2> /dev/null
> mkfifo ./tmp/sequencePipe_0
> resctl -n 101 -c 3 -t unconstrained-server -q 1 rtspin -w 
> -O./tmp/sequencePipe_0 -m 0 -s 1 -p 3 -r 101 -q 1 2.670000 10.000000 1  
> & PID="$!"
> PIDS="$PIDS $PID"
> START_PIDS="$START_PIDS $PID"
>  
> rm ./tmp/sequencePipe_1 2> /dev/null
> touch ./tmp/sequencePipe_1
> resctl -n 107 -c 3 -t unconstrained-server -q 7 rtspin 
> -S./tmp/sequencePipe_0 -O./tmp/sequencePipe_1 -m 0 -s 1 -p 3 -r 107 -q 
> 7 0.100000 1.000000 $ PID="$!"
> PIDS="$PIDS $PID"
>  
> resctl -n 102 -c 3 -t unconstrained-server -q 2 rtspin -w  -m 0 -s 1 
> -p 3 -r 102 -q 2 2.320000 20.000000 1  & PID="$!"
> PIDS="$PIDS $PID"
> START_PIDS="$START_PIDS $PID"
>  
> resctl -n 103 -c 3 -t unconstrained-server -q 3 rtspin -w  -m 0 -s 1 
> -p 3 -r 103 -q 3 4.090000 50.000000 1  & PID="$!"
> PIDS="$PIDS $PID"
> START_PIDS="$START_PIDS $PID"
>  
> resctl -n 104 -c 3 -t unconstrained-server -q 4 rtspin -w  -m 0 -s 1 
> -p 3 -r 104 -q 4 18.700000 100.000000 1  & PID="$!"
> PIDS="$PIDS $PID"
> START_PIDS="$START_PIDS $PID"
>  
> resctl -n 105 -c 3 -t unconstrained-server -q 5 rtspin -w  -m 0 -s 1 
> -p 3 -r 105 -q 5 0.130000 200.000000 1  & PID="$!"
> PIDS="$PIDS $PID"
> START_PIDS="$START_PIDS $PID"
>  
> resctl -n 106 -c 3 -t unconstrained-server -q 6 rtspin -w  -m 0 -s 1 
> -p 3 -r 106 -q 6 0.080000 1000.000000 1  & PID="$!"
> PIDS="$PIDS $PID"
> START_PIDS="$START_PIDS $PID"
>  
> On completion, I get the following message: “reached end-of-file on input event stream”

This is expected; rtspin prints this when a blocking read call returns with zero bytes read. 

	https://github.com/LITMUS-RT/liblitmus/blob/a430c7b5cacae4219a185decb863f6fb9e5cbcb9/bin/rtspin.c#L269-L270

As a result, the function wait_for_input() will return zero:

	https://github.com/LITMUS-RT/liblitmus/blob/a430c7b5cacae4219a185decb863f6fb9e5cbcb9/bin/rtspin.c#L283

Which in turn will terminate the rtspin instance:

	https://github.com/LITMUS-RT/liblitmus/blob/a430c7b5cacae4219a185decb863f6fb9e5cbcb9/bin/rtspin.c#L742-L744

So if you kill the producer at the head of a pipeline, all the subsequent consumers will shutdown automatically. 

> due to the multiple activations of the spawned jobs

Jobs of which task? Multiple activations in which sense? 

> which in turn makes the input buffer full (INPUT_BUF_SIZE=4096). 

Sorry, I don’t follow. How is a lack of data to read indicative of a filled-up input buffer? 

> Since I am only interested in the number of completed spawned jobs, can I trust  “st-job-stats” to give me the number I am looking for? Or does “st-job-stats” give me the number of coalesced jobs?

What are coalesced jobs? Are you referring to budget enforcement in classic process-based plugins? This should not be an issue here. IIRC, in reservation-based plugins, the number of job completions indicated by st-job-stats should indeed reflect the number of times the task indicated job completion. 

Best,
Björn



_______________________________________________
litmus-dev mailing list
litmus-dev at lists.litmus-rt.org
https://lists.litmus-rt.org/listinfo/litmus-dev


More information about the litmus-dev mailing list