Ticket #10 (closed Problem: Solved/Applied)

Opened 3 years ago

Last modified 11 months ago

Segmentation fault when running Bro with all.bro

Reported by: matthias Owned by: robin
Priority: Normal Milestone:
Component: Bro Version: 1.5.2
Keywords: Cc:

Description

I ran into a segfault when trying to launch Bro with the following arguments: -i en1 all .

I am running a 3.0 GHz Intel Core2 Duo, uname -a: Darwin shogun 9.5.0 Darwin Kernel Version 9.5.0: Wed Sep 3 11:29:43 PDT 2008; root:xnu-1228.7.58~1/RELEASE_I386 i386 i386 iMac8,1 Darwin

... (output cropped) ...
[last_packets_processed] = 40,
[DNS::PTR_pattern] = 13688,
[gen_hot_notice_with_hostnames] = 40,
[FTP::is_ftp_conn] = 40
}

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x645f74a3
0x00137bd1 in Serializer::StartSerialization (this=0x20f8a70, descr=0x20ab53 "call", tag=101 'e') at Serializer.cc:59
59		format->StartWrite();
(gdb) i f 0
Stack frame at 0xbfffe860:
 eip = 0x137bd1 in Serializer::StartSerialization(char const*, char) (Serializer.cc:59); saved eip 0x138070
 called by frame at 0xbfffe8a0
 source language c++.
 Arglist at 0xbfffe858, args: this=0x20f8a70, descr=0x20ab53 "call", tag=101 'e'
 Locals at 0xbfffe858, Previous frame's sp is 0xbfffe860
 Saved registers:
  ebx at 0xbfffe84c, ebp at 0xbfffe858, esi at 0xbfffe850, edi at 0xbfffe854, eip at 0xbfffe85c
(gdb) bt 5
#0  0x00137bd1 in Serializer::StartSerialization (this=0x20f8a70, descr=0x20ab53 "call", tag=101 'e') at Serializer.cc:59
#1  0x00138070 in Serializer::Serialize (this=0x20f8a70, info=0xbfffe8ec, func=0x71be60 "rotate_interval", args=0x20b9f40) at Serializer.cc:132
#2  0x000a4ba3 in BroFile::CloseCachedFiles () at Event.h:57
#3  0x000037ba in termination_signal () at main.cc:321
#4  0x000fa3e5 in net_run () at Net.cc:608
(More stack frames follow...)
(gdb) l
54			return false;
55		}
56	
57	bool Serializer::StartSerialization(const char* descr, char tag)
58		{
59		format->StartWrite();
60		assert(current_cache);
61		SetErrorDescr(fmt("serializing %s", descr));
62		if ( ! Write(tag, "tag") )
63
(gdb) p *format
$4 = {
  _vptr$SerializationFormat = 0x645f746f, 
  static INITIAL_SIZE = 65536, 
  output = 0x65696e65 <Address 0x65696e65 out of bounds>, 
  output_size = 262244, 
  output_pos = 0, 
  input = 0xa70 <Address 0xa70 out of bounds>, 
  input_len = 0, 
  input_pos = 7470304, 
  bytes_written = 0
}

Change History

comment:1 Changed 3 years ago by matthias

  • Summary changed from Segfault to Segmentation fault when running Bro with all.bro

comment:2 Changed 3 years ago by robin

  • Status changed from new to accepted

comment:3 Changed 3 years ago by seth

This problem was introduced by [4657]. If [4657] is reverted, the crash doesn't occur.

comment:4 Changed 3 years ago by matthias

Uhhh, that revision is 17 month old. Do you know which particular analyzer is causing this issue? I'm looking for a way to turn on as much analysis as possible in Bro, yet crash right at program launch.

comment:5 Changed 3 years ago by vern

It's not a particular analyzer. That change concerns closing files upon exit. No doubt the problem is that something is getting stale upon termination. This has been a big pain to try to get right because there are essentially circular dependencies.

comment:6 Changed 3 years ago by matthias

This sounds hairy. Meanwhile, I will stick with Robin's all-mc.bro script which turns on as much analysis as possible. (without crashing)

comment:7 Changed 11 months ago by seth

  • Status changed from accepted to closed
  • Resolution set to Solved/Applied

With all of the core scripts being rewritten and the advent of the logging framework, I don't think this ticket is going to be particularly relevant to the 1.6 and futures releases so I'm closing it.

Note: See TracTickets for help on using tickets.