Project

General

Profile

Actions

Optimization #1020

closed

1.4.6: sc_log_config->op_filter not filled in

Added by Mark Solaris over 10 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Effort:
Difficulty:
Label:

Description

The sc_log_config->op_filter value is not provided and when in debug mode (setenv SC_LOG_LEVEL debug) it's printed here:

util-debug.c:

1218
1219 SCLogInitLogModule(sc_lid);
1220
1221 SCLogDebug("sc_log_global_log_level: %d", sc_log_global_log_level);
1222 SCLogDebug("sc_lc->log_format: %s", sc_log_config->log_format);
1223 SCLogDebug("SCLogSetOPFilter: filter: %s", sc_log_config->op_filter);
1224
31/10/2013 -- 18:37:36 - <Debug> - parser_local_id: 1
31/10/2013 -- 18:37:36 - <Debug> - al_proto_table[2].map[1]->parser_id: 13
31/10/2013 -- 18:37:36 - <Debug> - failed to lookup configuration parameter 'max-pending-packets'
31/10/2013 -- 18:37:36 - <Debug> - Max pending packets set to 1024
31/10/2013 -- 18:37:36 - <Debug> - failed to lookup configuration parameter 'default-packet-size'
31/10/2013 -- 18:37:36 - <Debug> - Default packet size set to 1514
31/10/2013 -- 18:37:36 - <Debug> - failed to lookup configuration parameter 'logging.default-log-format'
31/10/2013 -- 18:37:36 - <Debug> - sc_log_global_log_level: 8
31/10/2013 -- 18:37:36 - &lt;Debug&gt; - sc_lc->log_format: %t - <%d>
t@1 (l@1) signal SEGV (no mapping at the fault address) in strlen at 0xffffffff7d93c750
0xffffffff7d93c750: strlen+0x0050: ld [%o2], %o1
Current function is SCLogLoadConfig
1223 SCLogDebug("SCLogSetOPFilter: filter: %s", sc_log_config
>op_filter);
(dbx) dump
_sc_log_temp = 0xffffffff7fffdfab "SCLogSetOPFilter: filter: "
_sc_log_msg = "31/10/2013 -- 18:37:36 - &lt;Debug&gt; - SCLogSetOPFilter: filter: "
have_logging = 1
outputs = 0x101bc99b0
default_log_level_s = 0x101bc8070 "info"
daemon = 0
output = 0x101bc9d10
sc_lid = 0x101bbf910
FUNCTION = "SCLogLoadConfig"
seq_node = (nil)
(dbx) print -L *sc_log_config
*sc_log_config = {
startup_message = (nil)
log_level = SC_LOG_DEBUG
log_format = 0x101b9d010 "%t - <%d> - "
op_filter = (nil)
op_filter_regex = (nil)
op_filter_regex_study = (nil)
op_ifaces = 0x101b9c3d0
op_ifaces_cnt = '\002'
}
Actions #1

Updated by Mark Solaris over 10 years ago

My yaml file had:

  1. This value is overriden by the SC_LOG_OP_FILTER env var.
    default-output-filter:

it now has

  1. This value is overriden by the SC_LOG_OP_FILTER env var.
    default-output-filter: " "

and things work ok.

Actions #2

Updated by Victor Julien over 10 years ago

  • Assignee set to OISF Dev
  • Target version set to 2.0rc1
Actions #3

Updated by Victor Julien about 10 years ago

  • Target version changed from 2.0rc1 to 2.0rc2
Actions #4

Updated by Victor Julien about 10 years ago

  • Target version changed from 2.0rc2 to TBD

So the problem here appears to be that we're printing a null pointer, correct? Seems glibc allows for this, it will just print "(null)" then. If this is the problem I'm pretty certain we have many more of these issues.

Actions #5

Updated by Andreas Herz almost 5 years ago

  • Tracker changed from Bug to Optimization
Actions #6

Updated by Victor Julien over 4 years ago

  • Status changed from New to Closed
  • Assignee deleted (OISF Dev)
  • Target version deleted (TBD)

Don't think this is an issue.

Actions

Also available in: Atom PDF