<div dir="ltr"><div class="gmail_default" style="font-size:large">Hello syslog-ng developers,</div><div class="gmail_default" style="font-size:large"><br></div><div class="gmail_default" style="font-size:large">I am planning to add a new thread of execution to syslog-ng. I am seeking inputs/expert advice for the same.</div><div class="gmail_default" style="font-size:large"><br></div><div class="gmail_default" style="font-size:large">Motivation: I had previously discussed a problem here where syslog-ng would hang if dns server is unreachable. The reason this was happening was that getaddrinfo() would take some time to timeout and all syslog-ng tasks would pile up resulting in delayed execution which would appear that syslog-ng has hung.</div><div class="gmail_default" style="font-size:large"><br></div><div class="gmail_default" style="font-size:large">I took the approach of using getaddrinfo_a() which would do the async resolution of the address. I have recently come to understand that getaddrinfo_a() finally calls getaddrinfo() in a separate pthread that it spawns. This is causing some issues resulting in a crash. The stacktrace is pointing to problem in glib allocators. </div><div class="gmail_default" style="font-size:large"><br></div><div class="gmail_default" style="font-size:large">Here is what I am thinking. I will call iv_thread() to create a new thread as part of the main process. All this thread does is execute a fixed task (which in my case is to just do address resolution). </div><div class="gmail_default" style="font-size:large"><br></div><div class="gmail_default" style="font-size:large">I am looking for inputs from you developers for pointers as to what would be a good place to spawn this thread. This thread would do very minimal stuff and hope not to have much complexity. Are there things that I should look out for if we have another thread of execution. Do any of you think it is bad idea and time consuming process to introduce a new thread to existing syslog-ng.<br><br>I have some understanding of the code and have read a bit about ivykis and some of it's functions. All I'll be bothering you will be for your expertise and would be doing the development on my side. <br><br>Sorry if I am bothering you in your time with family. Happy Holidays :)<br><br>Thanks,<br>Naveen.</div></div>