[Bro-Dev] #635: Test to crash proxies

Bro Tracker bro at tracker.bro-ids.org
Tue Oct 4 08:28:40 PDT 2011


#635: Test to crash proxies
---------------------+-----------------
 Reporter:  seth     |      Owner:
     Type:  Problem  |     Status:  new
 Priority:  Normal   |  Milestone:
Component:  Bro      |    Version:
 Keywords:           |
---------------------+-----------------
 I have a btest test that can reliably crash proxies (on my laptop at
 least).  I'm not assigning this to the next release though because it just
 seems to be a case of filling the pipe between the parent and child and
 not the weird "poll 101" crash that is occasionally seen in some cases,
 I'm still trying to create a test to cause that crash.

 Here's the error you get from btest from each proxy since each proxy in
 the test crashes with the same message::

 {{{
   error: parent: 1317739862.781639 fatal error, shutting down
 communication: Resource temporarily unavailable [35]
   error: parent: 1317739862.781754 fatal error, shutting down
 communication: Resource temporarily unavailable [35]
   error: parent: 1317739862.781775 fatal error, shutting down
 communication: Resource temporarily unavailable [35]
   Assertion failed: (peer->log_buffer), function SendLogWrite, file
 ./src/RemoteSerializer.cc, line 2556.
 }}}

 Here's the test::

 {{{
 # @TEST-EXEC: btest-bg-run manager-1 BROPATH=$BROPATH:..
 CLUSTER_NODE=manager-1 bro %INPUT
 # @TEST-EXEC: btest-bg-run proxy-1   BROPATH=$BROPATH:..
 CLUSTER_NODE=proxy-1 bro %INPUT
 # @TEST-EXEC: btest-bg-run proxy-2   BROPATH=$BROPATH:..
 CLUSTER_NODE=proxy-2 bro %INPUT
 # @TEST-EXEC: btest-bg-run worker-1  BROPATH=$BROPATH:..
 CLUSTER_NODE=worker-1 bro %INPUT
 # @TEST-EXEC: btest-bg-run worker-2  BROPATH=$BROPATH:..
 CLUSTER_NODE=worker-2 bro %INPUT
 # @TEST-EXEC: btest-bg-run worker-3  BROPATH=$BROPATH:..
 CLUSTER_NODE=worker-3 bro %INPUT
 # @TEST-EXEC: btest-bg-run worker-4  BROPATH=$BROPATH:..
 CLUSTER_NODE=worker-4 bro %INPUT

 # @TEST-EXEC: btest-bg-wait -k 10
 # @TEST-EXEC: btest-diff proxy-1/.stdout

 @TEST-START-FILE cluster-layout.bro
 redef Cluster::nodes = {
         ["manager-1"] = [$node_type=Cluster::MANAGER, $ip=127.0.0.1,
 $p=37757/tcp, $workers=set("worker-1")],
         ["proxy-1"] = [$node_type=Cluster::PROXY,     $ip=127.0.0.1,
 $p=37758/tcp, $manager="manager-1", $workers=set("worker-1", "worker-3")],
         ["proxy-2"] = [$node_type=Cluster::PROXY,     $ip=127.0.0.1,
 $p=37759/tcp, $manager="manager-1", $workers=set("worker-2", "worker-4")],
         ["worker-1"] = [$node_type=Cluster::WORKER,   $ip=127.0.0.1,
 $p=37760/tcp, $manager="manager-1", $proxy="proxy-1", $interface="eth0"],
         ["worker-2"] = [$node_type=Cluster::WORKER,   $ip=127.0.0.1,
 $p=37761/tcp, $manager="manager-1", $proxy="proxy-2", $interface="eth1"],
         ["worker-3"] = [$node_type=Cluster::WORKER,   $ip=127.0.0.1,
 $p=37762/tcp, $manager="manager-1", $proxy="proxy-1", $interface="eth0"],
         ["worker-4"] = [$node_type=Cluster::WORKER,   $ip=127.0.0.1,
 $p=37763/tcp, $manager="manager-1", $proxy="proxy-2", $interface="eth1"],

 };
 @TEST-END-FILE

 global all_data: set[string] = set() &synchronized;
 global blah = 0;

 @if ( Cluster::local_node_type() == Cluster::WORKER )
 event slam_proxy()
         {
         add all_data[unique_id(peer_description)];
         ++blah;
         if ( blah < 10000 )
                 event slam_proxy();
         }

 event bro_init()
         {
         event slam_proxy();
         }
 @endif
 }}}

-- 
Ticket URL: <http://tracker.bro-ids.org/bro/ticket/635>
Bro Tracker <http://tracker.bro-ids.org/bro>
Bro Issue Tracker



More information about the bro-dev mailing list