dlang wrote:rgerhards wrote:dlang wrote:grabbing the snapshot of bcb97650683bbcb1ecdacd0c2a6052ef836d3eda doesn't work as it doesn't include the configure program. I'll unpack it on top of my 3.21.4 image to get it working
You don't need configure.
autoreconf -fvi
builds it for you.
I looked at the README, but didn't see this. I ended up unpacking it on top of 3.21.4 and doing a make clean then a configure.
dlang wrote:I'm just getting home (about 4am local time) so I won't try to test this before you call it a night.
dlang wrote:I also did a test where I commented out the yield call and the writer ate a lot more cpu.
doing a quick strace doesn't show any specific problems, the reader in doing three futex calls (on different futexes) and the writer is doind one futex call
dlang wrote:one thing you could look at doing for signal handlers is to have the handler itself just set a flag variable and have the main loops of all the threads do the appropriate processing on their next pass through the loop. with multiple processes you would want to have the flag be a bitfield with the handler setting all bits and then each thread zeroing out their bit in the processing loop (this approach has the side benifit that you no longer care how many times you recieve a signal, you process it once when you can get to it, it also lets you skip any need to disable signals in the program)
dlang wrote:with your question of how to deal with recording times that you mention in the commit., I'm not quite understanding it.
dlang wrote:when you queue a message for output do you queue just the final string to be sent? or do you queue the Msg structure?
so how do the child threads handle the results of the signals? do they need to have something in their main loop? if so, it's not documented in the imtemplate file. If not it could be this mechanism that's getting tripped uprgerhards wrote:dlang wrote:one thing you could look at doing for signal handlers is to have the handler itself just set a flag variable and have the main loops of all the threads do the appropriate processing on their next pass through the loop. with multiple processes you would want to have the flag be a bitfield with the handler setting all bits and then each thread zeroing out their bit in the processing loop (this approach has the side benifit that you no longer care how many times you recieve a signal, you process it once when you can get to it, it also lets you skip any need to disable signals in the program)
Actually, this is what is done today. Except, that only the "main" thread reacts to signals, all others are blocked. The main thread is the one that is started by the OS and it coordinates all activities inside rsyslog (very few).
I hope this clarifies. Obviously, I am still puzzled about the HUP issue you mention plus some other bug reports you have seen on the mailing list. I am still consolidating things in the hope to come down to the root cause. I am still of the view that performance optimization and bugfixing this time closely relate to each other...
dlang wrote:so how do the child threads handle the results of the signals? do they need to have something in their main loop? if so, it's not documented in the imtemplate file. If not it could be this mechanism that's getting tripped up
rgerhards wrote:Well, I have looked around a bit more. I could probably abuse SIGTTIN and SIGTTOU, so that I could spare one signal "just" for closing files. I think that's probably a smart addition in any case (avoiding all the overhead of a full restart). Now I "just" need to check if that's something that can be done rather easily (I don't want to do anything intrusive unless I've found the source of the annoying abort case).
dlang wrote:the problems I am having with rsyslog not cycling log files properly all seem to have to do with the HUP not killing all of the processes. even if you don't do a 'log rotate' signal, it may make sense to change the while(true) loops in all the threads to be while(!shutdown)
Users browsing this forum: No registered users and 0 guests