In my opinion there are issues of concurrency in writing to the file. It seems 
to be open in the main process, during the initialisation and then write to it 
during runtime from kamailio processes. Writing from multiple processes to the 
same file is going to have unpredictable content.

The solution would be to either have a lock around and do every time: lock, 
open file, write, close unlock; or create a consumer process that write to the 
file and the others produce data that is sent to it. Another option would be 
that each process writes to dedicated file (e.g., filename-pid).

I also noticed that the file name is reallocated in pkg using a local variable 
in a function and not freed.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2785#issuecomment-869404475
_______________________________________________
Kamailio (SER) - Development Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to