[httperf] Buffer overflow detected

Nenad Petronijevic nenad.petronijevic at softserbia.com
Thu Aug 22 08:01:31 PDT 2013


Hi.

I am receiving buffer overflow with higher number of sessions and rate.

Even though I have increased FD_SETSIZE to 65535, as well as ulimit -n 
for user running httperf,
each time open files number gets to 1039, I receive buffer overflow.

Strange is that it doesn't happens on default 1024, but always on 1039, 
as if that is the new limit and not 65535.

httperf -v says maximum number of open descriptors = 65535

Compiled latest version from SVN
httperf: httperf-0.9.1 compiled Aug 22 2013 with DEBUG without 
TIME_SYSCALLS.

Here is the command:
httperf --hog --timeout=15 --client=0/1 --server=SERVER --port=80 
--uri=/ --failure-status=502 --rate=100 --send-buffer=104857600 
--recv-buffer=104857610 --add-header='Authorization: Bearer TOKEN\n' 
--wsesslog=2500,2.000,SESIONS_FILE


And error and backtrace from gdb.

*** buffer overflow detected ***: 
/home/user/src/httperf-read-only/httperf/build/src/httperf terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x7ffff7203807]
/lib/x86_64-linux-gnu/libc.so.6(+0x109700)[0x7ffff7202700]
/lib/x86_64-linux-gnu/libc.so.6(+0x10a7be)[0x7ffff72037be]
/home/user/src/httperf-read-only/httperf/build/src/httperf[0x404494]
/home/user/src/httperf-read-only/httperf/build/src/httperf[0x4054ce]
/home/user/src/httperf-read-only/httperf/build/src/httperf[0x409ecb]
/home/user/src/httperf-read-only/httperf/build/src/httperf[0x40a3d1]
/home/user/src/httperf-read-only/httperf/build/src/httperf[0x408b9d]
/home/user/src/httperf-read-only/httperf/build/src/httperf[0x408cdb]
/home/user/src/httperf-read-only/httperf/build/src/httperf[0x407711]
/home/user/src/httperf-read-only/httperf/build/src/httperf[0x406ed1]
/home/user/src/httperf-read-only/httperf/build/src/httperf[0x40b2bd]
/home/user/src/httperf-read-only/httperf/build/src/httperf[0x407092]
/home/user/src/httperf-read-only/httperf/build/src/httperf[0x4058bb]
/home/user/src/httperf-read-only/httperf/build/src/httperf[0x4029dc]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7ffff711a76d]
/home/user/src/httperf-read-only/httperf/build/src/httperf[0x403ce9]

backtrace

#0  0x00007ffff712f425 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff7132b8b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff716d39e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007ffff7203807 in __fortify_fail () from 
/lib/x86_64-linux-gnu/libc.so.6
#4  0x00007ffff7202700 in __chk_fail () from /lib/x86_64-linux-gnu/libc.so.6
#5  0x00007ffff72037be in __fdelt_warn () from 
/lib/x86_64-linux-gnu/libc.so.6
#6  0x0000000000404494 in set_active (s=0x9b6810, fdset=0x615c00) at 
../../src/core.c:328
#7  0x00000000004054ce in core_connect (s=0x9b6810) at ../../src/core.c:942
#8  0x0000000000409ecb in create_conn (sess=0x9b61c0, ci=0x9b6218) at 
../../../src/gen/session.c:162
#9  0x000000000040a3d1 in session_issue_call (sess=<optimized out>, 
call=<optimized out>)
     at ../../../src/gen/session.c:428
#10 0x0000000000408b9d in issue_calls (sess=0x9b61c0, priv=0x9b61e8)
     at ../../../src/gen/wsesslog.c:244
#11 0x0000000000408cdb in sess_create (arg=...) at 
../../../src/gen/wsesslog.c:291
#12 0x0000000000407711 in tick (t=<optimized out>, arg=...) at 
../../../src/gen/rate.c:117
#13 0x0000000000406ed1 in timer_has_expired (a=...) at ../../src/timer.c:185
#14 0x000000000040b2bd in list_for_each (l=<optimized out>, 
action=0x406e70 <timer_has_expired>)
     at ../../../src/lib/list.c:150
#15 0x0000000000407092 in timer_tick () at ../../src/timer.c:214
#16 0x00000000004058bb in core_loop () at ../../src/core.c:1126
#17 0x00000000004029dc in main (argc=13, argv=<optimized out>) at 
../../src/httperf.c:1133


More information about the httperf mailing list