Re: no room in free client client list
Status: Alpha
Brought to you by:
coroberti
|
From: Robert I. <cor...@gm...> - 2010-07-18 12:23:24
|
Hi Vincent,
On Sun, Jul 18, 2010 at 2:44 PM, Vincent Blondel <vin...@ma...>wrote:
>
> Hello,
>
> I am working on a project to replace our current squid infrastructure by a
> brand new bluecoat platform.
>
Great project!
>
> For this I developed a little script to automatically generate some
> curl-loader configuration file.
>
I liked it.
>
> this is running pretty well, generating some thousands of urls simulating
> thousands of users surfing on the net but I get a little error message that
> continuously comes back.
>
> put_free_client - error: no room in free client client list.
> mperform_hyper error: cannot free a client.
>
> I do not know what it is exactly and how I can solve it ?
>
> details of my env
> *******************
>
> Vmware Fusion 3.1.0 machine (Single Core/512Mb RAM) on Mac OSX 10.6.4 (Dual
> Core/2048Mb RAM)
>
> debian:/var/tmp# uname -a
> Linux debian 2.6.26-2-amd64 #1 SMP Sun Jun 20 20:16:30 UTC 2010 x86_64
> GNU/Linux
>
> net.ipv4.tcp_tw_recycle=1
> net.ipv4.tcp_tw_reuse=1
> fs.file-max=102286
> net.core.rmem_max=8388608
> net.core.wmem_max=8388608
> net.core.rmem_default=65536
> net.core.wmem_default=65536
> net.ipv4.tcp_mem=8388608 8388608 8388608
> net.ipv4.tcp_rmem=4096 87380 8388608
> net.ipv4.tcp_wmem=4096 65536 8388608
>
> debian:/var/tmp# ulimit -a
> core file size (blocks, -c) 0
> data seg size (kbytes, -d) unlimited
> scheduling priority (-e) 0
> file size (blocks, -f) unlimited
> pending signals (-i) 4096
> max locked memory (kbytes, -l) 32
> max memory size (kbytes, -m) unlimited
> open files (-n) 19999
> pipe size (512 bytes, -p) 8
> POSIX message queues (bytes, -q) 819200
> real-time priority (-r) 0
> stack size (kbytes, -s) 8192
> cpu time (seconds, -t) unlimited
> max user processes (-u) 4096
> virtual memory (kbytes, -v) unlimited
> file locks (-x) unlimited
>
> my script
> **********
>
> wget \
> --cache=off \
> -U "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us)
> AppleWebKit/531.22.7 (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7" \
> --glob=off \
> --tries=3 \
> -x -p -H \
> -i urls 2>&1 | \
> awk -F'--' 'BEGIN{tmp=0}{if ($0 ~ /^--2010-.*-- http/ && $0 !~ /robots/)
> {blank=gsub(/ /,""); if (tmp==2) tmp=0; tmp+=1 ; print length($0) " " tmp "
> " $3}}' | sort -rn -k 1 | sort -n -k 2 | \
> awk 'BEGIN {
> fetch=0
> gen=gen "########### GENERAL SECTION ##################\n"
> gen=gen "BATCH_NAME=BlueCoat-ProxySG\n"
> gen=gen "CLIENTS_NUM_START=10\n"
> gen=gen "CLIENTS_RAMPUP_INC=10\n"
> gen=gen "CLIENTS_NUM_MAX=8192\n"
> gen=gen "REQ_RATE=800\n"
> gen=gen "INTERFACE=eth0\n"
> gen=gen "NETMASK=16\n"
> gen=gen "IP_ADDR_MIN=10.99.0.2\n"
> gen=gen "IP_ADDR_MAX=10.99.255.253\n"
> gen=gen "USER_AGENT=\"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3;
> en-us) AppleWebKit/531.22.7 (KHTML, like Gecko) Version/4.0.5
> Safari/531.22.7\"\n"
> gen=gen "CYCLES_NUM=-1"
> print gen
> }{
> url+=1
> urls=urls "URL=" $3 "\n"
> if (fetch==100) fetch=0 ; fetch+=1
> urls=urls "URL_SHORT_NAME=\"" url "\"\n"
> urls=urls "FETCH_PROBABILITY=" fetch "\n"
> urls=urls "REQUEST_TYPE=GET\n"
> urls=urls "HEADER=\"Accept:
> text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\"\n"
> urls=urls "HEADER=\"Accept-Language: en-us,en;q=0.5\"\n"
> urls=urls "HEADER=\"Accept-Encoding: gzip,deflate\"\n"
> urls=urls "HEADER=\"Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\"\n"
> urls=urls "HEADER=\"Keep-Alive: 115\"\n"
> urls=urls "HEADER=\"Connection: keep-alive\"\n"
> urls=urls "TIMER_URL_COMPLETION=3000\n"
> urls=urls "TIMER_AFTER_URL_SLEEP=0-2000\n"
> urls=urls "RANDOM_SEED=10\n\n"
> } END {
> print "URLS_NUM=" url "\n\n########### URLs SECTION
> #######################\n\n" urls
> }' 2>&1 | tee ProxySG.conf
>
> ls -l |egrep -v 'curl-loader' |awk '$0 ~ /^d/ {print "rm -rf " $8}' |sh
> curl-loader -x 10.30.30.16:8080 -f ProxySG.conf
>
>
> many thks for your help.
>
> Vincent
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> curl-loader-devel mailing list
> cur...@li...
> https://lists.sourceforge.net/lists/listinfo/curl-loader-devel
>
This bug may happen only if you've requested a fixed rate,
gen=gen "REQ_RATE=800\n"
and it happens here:
/*****************************************************************************
* Function name - put_free_client
*
* Description - Puts a client on the list of clients free to send
* a fixed rate request
*
* Input - *cctx - pointer to the client context
* Return Code/Output - On success 0, on error -1
******************************************************************************/
int put_free_client (client_context* cctx)
{
batch_context *bctx = cctx->bctx;
if (bctx->free_clients_count >= bctx->client_num_max)
/* Debugging, should not happen :-) */
{
fprintf (stderr,"%s - error: no room in free client client list.\n",
__func__);
return -1;
}
int free_client_no = cctx - bctx->cctx_array + 1;
if (free_client_no < 0 || free_client_no > bctx->client_num_max)
/* Debugging, should not happen :-) */
{
fprintf (stderr,"%s - error: invalid free client number %d.\n",
__func__, free_client_no);
return -1;
}
if (bctx->free_clients[bctx->free_clients_count])
/* Debugging, should not happen :-) */
{
fprintf (stderr,
"%s - error: non-empty free client list entry at count %d.\n",
__func__, bctx->free_clients_count);
return -1;
}
bctx->free_clients[bctx->free_clients_count++] = free_client_no;
return 0;
}
Val, could you look into how it might happen?
Thanks!
--
Truly,
Robert Iakobashvili, Ph.D.
......................................................................
www.ghotit.com
Assistive technology that understands you
......................................................................
|