Project

General

Profile

Actions

Optimization #551

open

Replace SCLogError by a counter for memory issue and other memcap

Added by Eric Leblond over 12 years ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
Effort:
Difficulty:
Label:

Description

Using a SCLogError for memcap or other memory issues can lead to a lot of messages. They should be replaced by some counters.


Subtasks 1 (0 open1 closed)

Bug #525: [ERRCODE: SC_ERR_MEM_ALLOC(1)]ClosedEric Leblond08/18/2012Actions

Related issues 1 (1 open0 closed)

Related to Suricata - Optimization #614: Rate limiting messagesAssignedCommunity TicketActions
Actions #1

Updated by Victor Julien over 12 years ago

  • Status changed from New to Assigned
  • Assignee set to Eric Leblond
Actions #2

Updated by Eric Leblond about 12 years ago

  • Subject changed from Replace SCLlogError by a counter for memory issue and other memcap to Replace SCLogError by a counter for memory issue and other memcap

We've got 145 occurances of 'SCLogError(SC_ERR_MEM_ALLOC' in the code. There is no way to know if a function is not an init function but to read it and understand its call graph. Doing that 145 may result in errors (for sure if I do it).
But even if it is done correctly we will need to have a lot of counters. Or we can just add one : malloc_failed.

On other complementary approach could be to rate limit this error message and use the previously mentioned counter.

What do you think ?

Actions #3

Updated by Victor Julien about 12 years ago

Rate limiting is something we need regardless, can you open a separate ticket for that?

I'm fine with a single malloc counter. I think we will have review which ones are important, like mallocs at detection time. Maybe you can do a coccinelle search and replace on SCLogError(SC_ERR_MEM_ALLOC and do a trivial change (like add a comment). Then in the pull request we can easily inspect them one by one. Make sense?

Actions #4

Updated by Victor Julien about 12 years ago

  • Target version changed from 1.4beta2 to 1.4beta3
Actions #5

Updated by Victor Julien about 12 years ago

  • Target version changed from 1.4beta3 to 1.4rc1
Actions #6

Updated by Victor Julien about 12 years ago

  • Target version changed from 1.4rc1 to 2.0rc2
Actions #7

Updated by Victor Julien almost 11 years ago

  • Target version changed from 2.0rc2 to 3.0RC2
Actions #8

Updated by Victor Julien about 9 years ago

  • Target version changed from 3.0RC2 to 70
Actions #9

Updated by Eric Leblond over 6 years ago

  • Assignee deleted (Eric Leblond)
Actions #10

Updated by Victor Julien over 6 years ago

  • Status changed from Assigned to New
  • Target version deleted (70)

Needs further thought before starting an implementation.

Actions #11

Updated by Andreas Herz over 5 years ago

  • Assignee set to OISF Dev
  • Target version set to TBD
Actions #12

Updated by Philippe Antoine over 1 year ago

Does this ticket still make sense now that SC_ERR_MEM_ALLOC and other error codes are gone @Eric Leblond ?

Actions #13

Updated by Philippe Antoine over 1 year ago

  • Tracker changed from Bug to Optimization
Actions

Also available in: Atom PDF