#693896 [siege] siege crashes on FQDN in URL

Package:
siege
Source:
siege
Description:
HTTP regression testing and benchmarking utility
Submitter:
Török Edwin
Date:
2012-11-23 08:57:03 UTC
Severity:
normal
#693896#5
Date:
2012-11-21 14:56:55 UTC
From:
To:
--- Please enter the report below this line. ---

This crashes:
$ siege http://debian.home.lan/index.html
** SIEGE 2.70
** Preparing 15 concurrent users for battle.
The server is now under siege...Segmentation fault (core dumped)

This works:
$ siege http://debian/index.html
** SIEGE 2.70
** Preparing 15 concurrent users for battle.
The server is now under siege...

Both point to same IPv4 address:
$ host debian.home.lan
debian.home.lan has address 172.30.42.2
$ host debian
debian.home.lan has address 172.30.42.2

$ uname -a
Linux debian 3.6.6 #229 SMP PREEMPT Mon Nov 12 00:02:45 EET 2012 x86_64 GNU/Linux

.siegerc and /var/tmp/urls is attached.

Here is a stacktrace, unfortunately there is no -dbg package so no symbols:
(gdb) bt
#0  __memcpy_sse2 () at ../sysdeps/x86_64/multiarch/../memcpy.S:90
#1  0x000055555556695f in ?? ()
#2  0x000055555555d3cd in ?? ()
#3  0x000055555555dff5 in start_routine ()
#4  0x000055555555f1c5 in ?? ()
#5  0x00007ffff7bc7b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#6  0x00007ffff70cba7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

If I compile siege 2.72 from upstream then there is no crash, so this seems to be a problem in Debian's 2.70 version.


Debian Release: wheezy/sid
  500 unstable        ftp.ro.debian.org
    1 experimental    ftp.ro.debian.org
--- Package information. ---
Depends          (Version) | Installed
==========================-+-===========
libc6             (>= 2.7) |
libssl1.0.0     (>= 1.0.0) |


Package's Recommends field is empty.

Package's Suggests field is empty.

#693896#10
Date:
2012-11-21 16:05:43 UTC
From:
To:
Hello, thanks for the detailed report.

Right now, on a quick test with my default environment, I was not able
to reproduce the bug, but I will spend more time on this tonight using
all the details that you sent.

Cheers,

#693896#15
Date:
2012-11-23 02:55:57 UTC
From:
To:
...

I am trying to reproduce with the latest versions in sid:
$ dpkg -l libc6
ii  libc6:amd64    2.13-37      amd64

$ dpkg -l libssl1.0.0
ii  libssl1.0.0:am 1.0.1c-4     amd64

I have been trying, but I have not been able to reproduce the bug.

Maybe you could try to reproduce it with upstream "2.70" version
http://www.joedog.org/pub/siege/siege-2.70.tar.gz

In the mean time I'll prepare a debug symbols package for you.

Here is my output, using your ".siegerc" file:

$ siege -R .siegerc http://www.jmaslibre.org/index.html
** SIEGE 2.70
** Preparing 15 concurrent users for battle.
The server is now under siege...
Lifting the server siege...      done.
Transactions:		          11 hits
Availability:		      100.00 %
Elapsed time:		        9.32 secs
Data transferred:	        0.00 MB
Response time:		        2.21 secs
Transaction rate:	        1.18 trans/sec
Throughput:		        0.00 MB/sec
Concurrency:		        2.61
Successful transactions:          11
Failed transactions:	           0
Longest transaction:	        5.37
Shortest transaction:	        5.33

FILE: /var/tmp/siege.log
You can disable this annoying message by editing
the .siegerc file in your home directory; change
the directive 'show-logfile' to false.

$ siege -R .siegerc http://debian.home.lan/index.html
** SIEGE 2.70
** Preparing 15 concurrent users for battle.
The server is now under siege...
Lifting the server siege...      done.
Transactions:                    269 hits
Availability:                    100.00 %
Elapsed time:                    9.95 secs
Data transferred:                0.04 MB
Response time:                   0.00 secs
Transaction rate:                27.04 trans/sec
Throughput:                      0.00 MB/sec
Concurrency:                     0.11
Successful transactions:         269
Failed transactions:             0
Longest transaction:             0.02
Shortest transaction:            0.00

FILE: /var/tmp/siege.log
You can disable this annoying message by editing
the .siegerc file in your home directory; change
the directive 'show-logfile' to false.


Cheers,

#693896#20
Date:
2012-11-23 08:44:59 UTC
From:
To:
I've got the same.

It doesn't crash, and valgrind doesn't say anything either.

I've done an 'apt-get source siege', and that doesn't crash either if I manually build it
(using a simple ./configure && make).
Maybe it has something to do with the way the Debian package is built (I see its using hardening-wrapper).

I've rebuilt the Debian package using pbuilder in a wheezy chroot and a squeeze chroot.
None of them crash.

I've just checked again and /usr/bin/siege from the Debian repository still crashes.

Do you remember what environment/compiler versions where used to build it?
Because apparently simply rebuilding the package makes the crash go away, which makes me
believe that it might be due to a compiler bug?