Hi,

I've been doing some tests on jabberd2 server under high load using
Tsung<http://tsung.erlang-projects.org/>and I'm experiencing a
behaviour that could be a bug.
Under a 5 register requests per second scenario the c2s process is closing,
creating the following backtrace:

#0  0xb77c3424 in __kernel_vsyscall ()
#1  0xb73d5c8f in raise () from /lib/i386-linux-gnu/libc.so.6
#2  0xb73d92b5 in abort () from /lib/i386-linux-gnu/libc.so.6
#3  0xb73ce826 in __assert_fail () from /lib/i386-linux-gnu/libc.so.6
#4  0x08058516 in sx_nad_write_elem (s=0x92a21d0, nad=0x0, elem=0) at
io.c:422
#5  0x08054481 in c2s_router_sx_callback (s=0x927b0d8, e=event_PACKET,
data=0x92a26c8, arg=0x9255028) at c2s.c:1037
#6  0x0805b11c in __sx_event (file=0x806fdc4 "io.c", line=156, s=0x927b0d8,
e=event_PACKET, data=0x92a26c8) at sx.c:340
#7  0x08058a1a in _sx_process_read (s=0x927b0d8, buf=0x92a2970) at io.c:156
#8  0x08059086 in sx_can_read (s=0x927b0d8) at io.c:243
#9  0x080556e5 in c2s_router_mio_callback (m=0x927ab70, a=action_READ,
fd=0x927ada8, data=0x0, arg=0x9255028) at c2s.c:1370
#10 0x08062c11 in _mio_run (m=0x927ab70, timeout=5) at mio_impl.h:268
#11 0x0804e831 in main (argc=4, argv=0xbfa78954) at main.c:788

The version used for the tests is 2.2.16, which I downloaded and compiled
by myself, on a Ubuntu 11.10 computer.
It seems to me, that the issue is related to timing/synchronisation,
because the time to trigger the problem is not always the same. Also, when
I add a delay between the connection establishment and the register request
the crash doesn't happen!

The Tsung's XML file used on the test is attached.

Regards
<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "/usr/share/tsung/tsung-1.0.dtd">
<tsung loglevel="notice" dumptraffic="false" version="1.0">

  <clients>
    <client host="localhost" use_controller_vm="true" maxusers="200000">
    </client>
  </clients>

<servers>
   <server host='127.0.0.1' port='5222' type='tcp'/>
</servers>

<load>
  <arrivalphase phase="1" duration="15" unit="minute">
    <users maxnumber="10000" arrivalrate="5" unit="second"></users>
  </arrivalphase>
  </load>

<options>
  <option type="ts_jabber" name="global_number" value="5"></option>
  <option type="ts_jabber" name="userid_max" value="10000"></option>
  <option type="ts_jabber" name="domain" value="clint.eastwood"></option>
  <option type="ts_jabber" name="username" value="tsung"></option>
  <option type="ts_jabber" name="passwd" value="tsung"></option>
</options>

<sessions>
  <session probability="100" name="jabber-example" type="ts_jabber">

    <request>
      <jabber type="connect" ack="local"></jabber>
    </request>

    <request>
      <match do="abort" when="match">error</match>
      <jabber type="register" ack="local" id="new"></jabber>
    </request>

    <request>
      <jabber type="close" ack="local"></jabber>
    </request>

  </session>
</sessions>
</tsung>

Reply via email to