JoeDog / siege

Siege is an http load tester and benchmarking utility
GNU General Public License v3.0
5.95k stars 385 forks source link

URLs longer than 4KB kill siege with buffer overflow #59

Open wpietri opened 8 years ago

wpietri commented 8 years ago

I'm running down performance problems with a Solr server in an ecommerce setting. Some legitimate user requests cause the app to generate long queries listing lots of product ids. This produces URLs at least 10KB in length. Somewhere around the 4KB mark, siege dies saying:

*** buffer overflow detected ***: siege terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7338f)[0x7f526126238f]
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f52612f9c9c]
/lib/x86_64-linux-gnu/libc.so.6(+0x109b60)[0x7f52612f8b60]
/lib/x86_64-linux-gnu/libc.so.6(+0x109069)[0x7f52612f8069]
/lib/x86_64-linux-gnu/libc.so.6(_IO_default_xsputn+0xbc)[0x7f526126a70c]
/lib/x86_64-linux-gnu/libc.so.6(_IO_vfprintf+0x1cd5)[0x7f526123a9c5]
/lib/x86_64-linux-gnu/libc.so.6(__vsprintf_chk+0x84)[0x7f52612f80f4]
/lib/x86_64-linux-gnu/libc.so.6(__sprintf_chk+0x7d)[0x7f52612f804d]
siege(+0xe1a0)[0x7f52620401a0]
siege(+0x8abb)[0x7f526203aabb]
siege(+0x99d3)[0x7f526203b9d3]
siege(+0xae6e)[0x7f526203ce6e]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x8182)[0x7f5261bf7182]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f52612e947d]

This is on Ubuntu 14.04.4 LTS, kernel 3.13.0-85-generic.

It'd be nice if this just worked, but if not, it would be better to fail with a clear error message.

JoeDog commented 8 years ago

It has a 4K limit. I should make it dynamic. This has become an issue only recently. You're right - it shouldn't crash.