[LEDE-DEV] [PATCH] ubox/logread: add re-connect capability

2017-11-21 Thread Zefir Kurtisi
When logd is restarted while 'logread -f' is running, the logread process terminates, which cumbers debugging in different use-cases. This patch adds re-connect functionality to logread. In follow mode, when the ustream to logd is disconnected, instead of terminating, it tries to re-connect to log

Re: [LEDE-DEV] [PATCH] ubox logread

2017-11-06 Thread Felix Fietkau
On 2017-11-06 17:45, Maksym Ruchko wrote: >> I think your patch was only masking the real issues. > Just to explain what was my rationale - I was seeing that the old logread > code was blocked when syslog message was occasionally crossing the 4K > boundary, > then in the logread.c function logre

Re: [LEDE-DEV] [PATCH] ubox logread

2017-11-06 Thread Maksym Ruchko
> I think your patch was only masking the real issues. Just to explain what was my rationale - I was seeing that the old logread code was blocked when syslog message was occasionally crossing the 4K boundary, then in the logread.c function logread_fd_data_cb condition if (len < cur_len) was alw

Re: [LEDE-DEV] [PATCH] ubox logread

2017-11-06 Thread Felix Fietkau
On 2017-10-19 17:57, Maksym Ruchko wrote: > The read optimization with buffer ustream in the logread caused the > logger to hung randomly, more often under high load and when logged > messages are large. > > To reproduce 100% compile and run: > #include > #include > #include > > #define BUF_SI

[LEDE-DEV] [PATCH] ubox logread

2017-10-19 Thread Maksym Ruchko
The read optimization with buffer ustream in the logread caused the logger to hung randomly, more often under high load and when logged messages are large. To reproduce 100% compile and run: #include #include #include #define BUF_SIZE 8192 int i; static char msg_buf[BUF_SIZE]; int main(int