RE: [squid-users] file descriptor problem

From: <alireza@dont-contact.us>
Date: Tue, 8 Jun 2004 20:52:38 +0430 (IRST)

in some linuxes like redhat 9 that line "#define __FD_SETSIZE " is in
/usr/include/bits/typesize.h .any how you can use this command "ulimt
-HSn 32768" before compiling your squid.

> However, the error message is clear, the pb comes from your
> /usr/include/bits/types.h
> Did you check the lines before line 128? I've looked at mine
> and it's in these lines that __FD_SETSIZE is defined so...
>
> P-E
>
>
> -----Message d'origine-----
> De : Hement Gopal [mailto:hementg@cns.wits.ac.za]
> Envoyé : lundi 7 juin 2004 17:18
> À : SXB6300 Mailing; squid-users
> Objet : Re: [squid-users] file descriptor problem
>
>
> i had a FD_SETSIZE line which i have now removed...but it made no
> difference
> i also removed the FD_SETSIZE edit from my typesizes.h file
>
>
> :(
>
>
>
> SXB6300 Mailing wrote:
>
>> Nothing to do with the modification you've done in main.c
>> Looks like something wrong in types.h, are you sure of the
>> changes you've done in that file?
>>
>> P-E
>>
>> -----Message d'origine-----
>> De : Hement Gopal [mailto:hementg@cns.wits.ac.za]
>> Envoyé : lundi 7 juin 2004 16:22
>> À : CORVI Pierre emmanuel; squid-users
>> Objet : Re: [squid-users] file descriptor problem
>>
>>
>> hi all
>>
>> have changed value in squid/src/main.c file
>>
>> now my make ends with errors....:(
>>
>>
>>>[root@athena2 squid-2.5.STABLE5]# make
>>>Making all in lib
>>>make[1]: Entering directory `/home/squid-2.5.STABLE5/lib'
>>>source='Array.c' object='Array.o' libtool=no \
>>>depfile='.deps/Array.Po' tmpdepfile='.deps/Array.TPo' \
>>>depmode=gcc3 /bin/sh ../cfgaux/depcomp \
>>>gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include -g
>>> -O2 -Wall -c `test -f Array.c || echo './'`Array.c
>>>In file included from /usr/include/bits/string2.h:53,
>>> from /usr/include/string.h:375,
>>> from Array.c:50:
>>>/usr/include/bits/types.h:128: parse error before '<' token
>>>/usr/include/bits/types.h:132: parse error before "__uid_t"
>>>/usr/include/bits/types.h:133: parse error before "__gid_t"
>>>/usr/include/bits/types.h:134: parse error before "__ino_t"
>>>/usr/include/bits/types.h:135: parse error before "__ino64_t"
>>>/usr/include/bits/types.h:136: parse error before "__mode_t"
>>>/usr/include/bits/types.h:137: parse error before "__nlink_t"
>>>/usr/include/bits/types.h:138: parse error before "__off_t"
>>>/usr/include/bits/types.h:139: parse error before "__off64_t"
>>>/usr/include/bits/types.h:140: parse error before "__pid_t"
>>>/usr/include/bits/types.h:141: parse error before "__fsid_t"
>>>/usr/include/bits/types.h:142: parse error before "__clock_t"
>>>/usr/include/bits/types.h:143: parse error before "__rlim_t"
>>>/usr/include/bits/types.h:144: parse error before "__rlim64_t"
>>>/usr/include/bits/types.h:145: parse error before "__id_t"
>>>/usr/include/bits/types.h:146: parse error before "__time_t"
>>>/usr/include/bits/types.h:147: parse error before "__useconds_t"
>>>/usr/include/bits/types.h:148: parse error before "__suseconds_t"
>>>/usr/include/bits/types.h:150: parse error before "__daddr_t"
>>>/usr/include/bits/types.h:151: parse error before "__swblk_t"
>>>/usr/include/bits/types.h:152: parse error before "__key_t"
>>>/usr/include/bits/types.h:155: parse error before "__clockid_t"
>>>/usr/include/bits/types.h:158: parse error before "__timer_t"
>>>/usr/include/bits/types.h:161: parse error before "__blksize_t"
>>>/usr/include/bits/types.h:166: parse error before "__blkcnt_t"
>>>/usr/include/bits/types.h:167: parse error before "__blkcnt64_t"
>>>/usr/include/bits/types.h:170: parse error before "__fsblkcnt_t"
>>>/usr/include/bits/types.h:171: parse error before "__fsblkcnt64_t"
>>>/usr/include/bits/types.h:174: parse error before "__fsfilcnt_t"
>>>/usr/include/bits/types.h:175: parse error before "__fsfilcnt64_t"
>>>/usr/include/bits/types.h:181: parse error before "__loff_t"
>>>In file included from /usr/include/libio.h:32,
>>> from /usr/include/stdio.h:72,
>>> from ../include/util.h:38,
>>> from Array.c:52:
>>>/usr/include/_G_config.h:28: parse error before "__off_t"
>>>/usr/include/_G_config.h:30: parse error before '}' token
>>>/usr/include/_G_config.h:33: parse error before "__off64_t"
>>>/usr/include/_G_config.h:35: parse error before '}' token
>>>In file included from /usr/include/stdio.h:72,
>>> from ../include/util.h:38,
>>> from Array.c:52:
>>>/usr/include/libio.h:292: parse error before "__off_t"
>>>/usr/include/libio.h:311: parse error before "_offset"
>>>/usr/include/libio.h:324: parse error before '}' token
>>>/usr/include/libio.h:367: parse error before "__off64_t"
>>>/usr/include/libio.h:469: parse error before "_IO_seekoff"
>>>/usr/include/libio.h:469: parse error before "__off64_t"
>>>/usr/include/libio.h:470: parse error before "_IO_seekpos"
>>>/usr/include/libio.h:470: parse error before "__off64_t"
>>>In file included from ../include/util.h:38,
>>> from Array.c:52:
>>>/usr/include/stdio.h:88: parse error before "fpos_t"
>>>In file included from ../include/util.h:38,
>>> from Array.c:52:
>>>/usr/include/stdio.h:549: parse error before "fpos_t"
>>>/usr/include/stdio.h:552: parse error before '*' token
>>>In file included from /usr/include/stdio.h:676,
>>> from ../include/util.h:38,
>>> from Array.c:52:
>>>/usr/include/bits/stdio.h: In function `getc_unlocked':
>>>/usr/include/bits/stdio.h:52: dereferencing pointer to incomplete type
>>>/usr/include/bits/stdio.h:52: dereferencing pointer to incomplete type
>>>/usr/include/bits/stdio.h:52: dereferencing pointer to incomplete type
>>>/usr/include/bits/stdio.h: In function `getchar_unlocked':
>>>/usr/include/bits/stdio.h:59: dereferencing pointer to incomplete type
>>>/usr/include/bits/stdio.h:59: dereferencing pointer to incomplete type
>>>/usr/include/bits/stdio.h:59: dereferencing pointer to incomplete type
>>>/usr/include/bits/stdio.h: In function `fputc_unlocked':
>>>/usr/include/bits/stdio.h:77: dereferencing pointer to incomplete type
>>>/usr/include/bits/stdio.h:77: dereferencing pointer to incomplete type
>>>/usr/include/bits/stdio.h:77: dereferencing pointer to incomplete type
>>>/usr/include/bits/stdio.h: In function `putc_unlocked':
>>>/usr/include/bits/stdio.h:87: dereferencing pointer to incomplete type
>>>/usr/include/bits/stdio.h:87: dereferencing pointer to incomplete type
>>>/usr/include/bits/stdio.h:87: dereferencing pointer to incomplete type
>>>/usr/include/bits/stdio.h: In function `putchar_unlocked':
>>>/usr/include/bits/stdio.h:94: dereferencing pointer to incomplete type
>>>/usr/include/bits/stdio.h:94: dereferencing pointer to incomplete type
>>>/usr/include/bits/stdio.h:94: dereferencing pointer to incomplete type
>>>/usr/include/bits/stdio.h: In function `feof_unlocked':
>>>/usr/include/bits/stdio.h:114: dereferencing pointer to incomplete type
>>>/usr/include/bits/stdio.h: In function `ferror_unlocked':
>>>/usr/include/bits/stdio.h:121: dereferencing pointer to incomplete type
>>>In file included from ../include/util.h:39,
>>> from Array.c:52:
>>>/usr/include/time.h: At top level:
>>>/usr/include/time.h:60: parse error before "clock_t"
>>>/usr/include/time.h:76: parse error before "time_t"
>>>/usr/include/time.h:92: parse error before "clockid_t"
>>>/usr/include/time.h:104: parse error before "timer_t"
>>>/usr/include/time.h:120: parse error before "__time_t"
>>>/usr/include/time.h:122: parse error before '}' token
>>>/usr/include/time.h:161: field `it_interval' has incomplete type
>>>/usr/include/time.h:162: field `it_value' has incomplete type
>>>/usr/include/time.h:163: confused by earlier errors, bailing out
>>>make[1]: *** [Array.o] Error 1
>>>make[1]: Leaving directory `/home/squid-2.5.STABLE5/lib'
>>>make: *** [all-recursive] Error 1
>>>
>>
>>
>>
>> CORVI Pierre emmanuel wrote:
>>
>>
>>>Hi,
>>>
>>>Something more simple : modify directly squid sources.
>>>Go to src/ and open main.c ; look for
>>>"if (Fnd D_SETSIZE < Squid_MaxFD)
>>> Squid_MaxFD = FD_SETSIZE;"
>>>and add
>>>"Squid_MaxFD = the_number_of_file_descriptor_you_want;"
>>>below.
>>>Note that when you'll compile it, you'll still get :
>>>checking Default FD_SETSIZE value... 1024
>>>checking Maximum number of filedescriptors we can open... 1024
>>>(1024 beeing my default value).
>>>Dont forget to add ulimit -Hsn in squid's startup script (as said
>>>int the faq), start squid and then check in cachemgr (in General
>>>runtime info). It should be ok.
>>>
>>> P-E
>>>
>>>
>>>-----Message d'origine-----
>>>De : Hement Gopal [mailto:hementg@cns.wits.ac.za]
>>>Envoyé : vendredi 4 juin 2004 12:32
>>>À : squid-users
>>>Objet : Re: [squid-users] file descriptor problem
>>>
>>>
>>>
>>>
>>>Muthukumar wrote:
>>>
>>> >>i ran this command again, verified with ulimit -HSn (correct output)
>>> >>recompiled, and still got the ff warning
>>> >>
>>> >>
>>> >
>>> > Okie. Did you change the contents of the /usr/include/bits/types.h
>>>file for _FD_SETSIZE value.
>>> >
>>>
>>>
>>>here's teh funnt bit
>>>
>>>i see both a types.h file and a typesizes.h file
>>>
>>>the SETSIZE option appears in the typesizes.h file which i have edited
>>>already
>>>[root@athena2 bits]# grep SETSIZE typesizes.h
>>>#define __FD_SETSIZE 1024
>>>define __FD_SETSIZE 32768
>>>
>>>but i also inserted this entry in types.h file even though it shouldn't
>>>be there ( i think)...but it made no difference
>>>
>>>
>>>[root@athena2 bits]# grep SETSIZE types.h
>>>define __FD_SETSIZE 32768
>>>
>>>
>>>
>>>
>>>
>>> >
>>> >>checking Default FD_SETSIZE value... 256
>>> >>checking Maximum number of filedescriptors we can open... 256
>>> >>WARNING: 256 may not be enough filedescriptors if your
>>> >> cache will be very busy. Please see the FAQ page
>>> >> http://www.squid-cache.org/FAQ/FAQ-11.html#filedescriptors
>>> >> on how to increase your filedescriptor limit
>>> >>
>>> >
>>> > Which linux you are using (#uname -a). I hope you are compiling and
>>>logged as root.
>>> > Check the configuration informations for limits of the user on
>>>/etc/security/limits.conf file.
>>> >
>>>
>>>
>>>
>>>
>>>
>>>Linux athena2.wits.ac.za 2.4.20-31.9smp #1 SMP Tue Apr 13 17:40:10 EDT
>>>2004 i686 i686 i386 GNU/Linux
>>>
>>>and yes i am running everything as root
>>>
>>>here is my limits.conf file
>>>
>>>[root@athena2 security]# more limits.conf
>>># /etc/security/limits.conf
>>>#
>>>#Each line describes a limit for a user in the form:
>>>#
>>>#<domain> <type> <item> <value>
>>>#
>>>#Where:
>>>#<domain> can be:
>>># - an user name
>>># - a group name, with @group syntax
>>># - the wildcard *, for default entry
>>>#
>>>#<type> can have the two values:
>>># - "soft" for enforcing the soft limits
>>># - "hard" for enforcing hard limits
>>>#
>>>#<item> can be one of the following:
>>># - core - limits the core file size (KB)
>>># - data - max data size (KB)
>>># - fsize - maximum filesize (KB)
>>># - memlock - max locked-in-memory address space (KB)
>>># - nofile - max number of open files
>>># - rss - max resident set size (KB)
>>># - stack - max stack size (KB)
>>># - cpu - max CPU time (MIN)
>>># - nproc - max number of processes
>>># - as - address space limit
>>># - maxlogins - max number of logins for this user
>>># - priority - the priority to run user process with
>>># - locks - max number of file locks the user can hold
>>>#
>>>#<domain> <type> <item> <value>
>>>#
>>>
>>>#* soft core 0
>>>#* hard rss 10000
>>>#@student hard nproc 20
>>>#@faculty soft nproc 20
>>>#@faculty hard nproc 50
>>>#ftp hard nproc 0
>>>#@student - maxlogins 4
>>>
>>># End of file
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> >
>>> >>i'm getting desperate :(
>>> >>
>>> >
>>> > It will be getting solved soon :)
>>>
>>>
>>>
>>>i hope so :(....thanks for your help muthukumar
>>>
>>>
>>> >
>>> >
>>> > Regards,
>>> > Muthukumar.
>>> >
>>> >
>>> >
>>> > ---
>>> > =============== It is a "Virus Free Mail" ==============>> > Checked
>>> by AVG anti-virus system (http://www.grisoft.com).
>>> > Version: 6.0.698 / Virus Database: 455 - Release Date: 6/2/2004
>>> >
>>> >
>>> >
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>
>
>
Received on Tue Jun 08 2004 - 10:23:12 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Jul 01 2004 - 12:00:02 MDT