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

Björn Brandenburg bbb at mpi-sws.org
Tue Oct 9 10:30:19 CEST 2018


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





More information about the litmus-dev mailing list