Skip to content
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

util/debug: increase max length of message #12183

Closed
wants to merge 1 commit into from

Conversation

regit
Copy link
Contributor

@regit regit commented Nov 29, 2024

Ticket: 7419

Contribution style:

Our Contribution agreements:

Changes (if applicable):

Link to ticket: https://redmine.openinfosecfoundation.org/issues/7419

Describe changes:

  • Increase max length for log message

SV_REPO=OISF/suricata-verify#2152

@regit regit requested a review from victorjulien as a code owner November 29, 2024 17:48
Copy link

codecov bot commented Nov 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.97%. Comparing base (287d836) to head (6f15524).
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12183      +/-   ##
==========================================
- Coverage   49.98%   49.97%   -0.02%     
==========================================
  Files         912      912              
  Lines      257066   257066              
==========================================
- Hits       128503   128476      -27     
- Misses     128563   128590      +27     
Flag Coverage Δ
fuzzcorpus 60.97% <100.00%> (-0.01%) ⬇️
livemode 19.41% <100.00%> (+<0.01%) ⬆️
pcap 44.41% <100.00%> (+0.01%) ⬆️
suricata-verify 62.70% <100.00%> (-0.02%) ⬇️
unittests 9.01% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@suricata-qa
Copy link

Information:

ERROR: QA failed on SURI_TLPR1_alerts_cmp.

field baseline test %
SURI_TLPR1_stats_chk
.app_layer.flow.dcerpc_tcp 40 42 105.0%

Pipeline 23608

Copy link
Member

@jasonish jasonish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't think of any problems here. Many many apps log much bigger messages - think stack traces, etc.

Copy link
Member

@victorjulien victorjulien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain the why in the git message?

/* The maximum length of the log message */
#define SC_LOG_MAX_LOG_MSG_LEN 2048
/* The maximum length of the log message: we add max rule size and other info */
#define SC_LOG_MAX_LOG_MSG_LEN 8192 + 256
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where does the 256 come from?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a guess but I've been overly optimistic because if we look at the failure message for a signature, we have in fact inside of the log message error parsing signature {{SIG}} from file {{FILE}}. It we take the full log wihtout the SIG and FILE, we have 265 chars (512 for a round count).
So it we want to be strict we need in fact

#define SC_LOG_MAX_LOG_MSG_LEN 8192 + PATH_MAX + 512

PATH_MAX is usually 4092.

Should I switch to that ?

@regit
Copy link
Contributor Author

regit commented Dec 1, 2024

Replaced by #12192

@regit regit closed this Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants