-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1.x] Increased event handlers SIP logging buffer size one more time or make it configurable #3365
Comments
I still don't understand how SIP messages can get that large, when the SIP plugin doesn't even support multistream and so can only do two m-lines. Are you using event handlers (which is the only thing using those log buffers) or not (in which case we'd need to check why the errors appear in the first place)? |
Hello lminiero, I break point here found that the judgment "if(line[3] == '-')" has never been hit, and then "sofia_log[0] = '\0';" will never be executed to clear the buffer. After executing several more sip operations, sofia_log will be full. If continue to execute sip operations, the error "Truncation occurred" will be reported. I don’t understand sofia’s log structure. Should every log received be forwarded to the event handler without making this judgment? |
I copied the value of 'line' with a registered sip message. It is like this:
the character |
I suspect that the log output may be related to the sofia-sip version. Currently, I am using version 1.13.17. |
Yes, I think so too: there's was an issue some time ago that was opened about that, #3031. The user that opened the issue contributed a tentative PR , but then disappeared so it never went anywhere. If you have ways to replicate the problem and maybe revisit the original PR (#3063) to see if it works for you, it would help having an up-to-date fix for that. |
After further investigation, I concur with the assessment outlined in #3031 (comment). It appears that Sofia-SIP behaves differently before and after version 1.13 (related commit freeswitch/sofia-sip@57cb3b3). |
In the implementation I’m currently working on, I'm going to bypass intermediate
|
What version of Janus is this happening on?
v1.2.2
Have you tested a more recent version of Janus too?
Was this working before?
No.
Is there a gdb or libasan trace of the issue?
Additional context
After enabling the Event Handlers mechanism, I started receiving numerous error messages indicating log truncation. Here's a sample of the log errors:
It appears that the current buffer size of 3072 bytes is insufficient under certain environmental conditions, leading to frequent log truncation errors. A similar issue already was solved within #3060.
Would it be reasonable to make the buffer size for
sofia_log
configurable to accommodate different operational needs?Alternatively, could the buffer size be increased once more, perhaps to 4096 bytes, to prevent truncation?
The text was updated successfully, but these errors were encountered: