On 2017-07-11 21:04, Ron Brash wrote: > This patch fixes a logread starvation error, which occurs after many > logs are generated (around 16k if defaults are used). The log read > process seems to halt silently and yet continues running. A restart > of the log services fixes it. > > This is problematic because logs should be logged, instead of silently lost > > Signed-off-by: “Ron Brash <“ron.br...@gmail.com”> > --- > log/logread.c | 24 ++++++++++++++++++++++-- > 1 file changed, 22 insertions(+), 2 deletions(-) > > diff --git a/log/logread.c b/log/logread.c > index edac1d9..7eb028e 100644 > --- a/log/logread.c > +++ b/log/logread.c > @@ -230,8 +230,10 @@ static void logread_fd_data_cb(struct ustream *s, > int bytes) > break; > > cur_len = blob_len(a) + sizeof(*a); > - if (len < cur_len) > + if (len < cur_len) { > + ustream_consume(s, len); > break; > + } This part looks wrong to me, it would probably break on incomplete reads (when more data arrives later).
- Felix _______________________________________________ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev