xadhoom left a comment (kamailio/kamailio#4203)
Going on with my tests, those errors seems "interleaving" problems, where one thread writes to stderr while another is writing, most of the times you can see the "interrupted" line continuing after the interleaved one.
This should not happen, since fprintf should be atomic according to glibc, but this goes out of my reach.
I've tested rebuilding my container with rocky 9 and voilà, problem fixes. So is definitely something related to glibc/gcc differences between noble and rocky.
Now I'm gonna test it with debian bookworm and see what happens.