Re: [squid-users] Squid 3.4 refresh_pattern bungled config

2013-08-03 Thread Tyler Sweet
On Thu, Aug 1, 2013 at 4:57 AM, Eliezer Croitoru  wrote:
> On 08/01/2013 06:42 AM, Amos Jeffries wrote:
>> On 2013-08-01 09:46, Tyler Sweet wrote:
>>> Hello,
>>>
>>> I'm having an odd issue with Squid 3.4 on FreeBSD 9.1, compiled from
>>> source. I'm not sure if this is a good place to ask for general
>>> support for 3.4 or not, but I figured I would try.
>>
>> squid-dev are working on this right now. 3.4.0.2 will be out as soon as
>> we have a good fix for it.
>>
>> Amos
> The new RPM will be ready once 3.4.0.2 will be out..
>
> Eliezer

Awesome! Once I get back home I will try out the new version on my
homelab and see if I run into any other problems.

Thanks for the speedy responses!
-Tyler Sweet


Re: [squid-users] Squid 3.4 refresh_pattern bungled config

2013-08-01 Thread Eliezer Croitoru
On 08/01/2013 06:42 AM, Amos Jeffries wrote:
> On 2013-08-01 09:46, Tyler Sweet wrote:
>> Hello,
>>
>> I'm having an odd issue with Squid 3.4 on FreeBSD 9.1, compiled from
>> source. I'm not sure if this is a good place to ask for general
>> support for 3.4 or not, but I figured I would try.
> 
> squid-dev are working on this right now. 3.4.0.2 will be out as soon as
> we have a good fix for it.
> 
> Amos
The new RPM will be ready once 3.4.0.2 will be out..

Eliezer


Re: [squid-users] Squid 3.4 refresh_pattern bungled config

2013-07-31 Thread Amos Jeffries

On 2013-08-01 09:46, Tyler Sweet wrote:

Hello,

I'm having an odd issue with Squid 3.4 on FreeBSD 9.1, compiled from
source. I'm not sure if this is a good place to ask for general
support for 3.4 or not, but I figured I would try.


squid-dev are working on this right now. 3.4.0.2 will be out as soon as 
we have a good fix for it.


Amos


Re: [squid-users] Squid 3.4 refresh_pattern bungled config

2013-07-31 Thread Amos Jeffries

On 2013-08-01 09:54, Odhiambo Washington wrote:

Thanks for highlighting this. I have the same problem on FreeBSD 9.1
with same version of Squid, compiled from source. A config file that
works with 3.3.8 does not work with 3.4.0.1 because of the refresh
patterns. Unfortunately, it seems my post about that did not get the
attention of Amos, Eliezer,etc.



Hi, it did get my attention. Sorry for not replying immediately, I was 
hoping it would be a 24hr turnaround on getting the patch out to you.


3.HEAD now has fixes for some of the simple issues that have appeared 
like the percentage value handling. The regex issue and some other edge 
cases that have shown up are currently having patches debated in 
squid-dev. Since the problem is in our backward-compatibility code 
rather than the new config syntax the right solution has been a little 
more complex to find than we would have liked.


The approach has been agreed I think, so I am hopeful that we are close 
to a final patch. 3.4.0.2 should be available in some days.


Amos



Re: [squid-users] Squid 3.4 refresh_pattern bungled config

2013-07-31 Thread Odhiambo Washington
Thanks for highlighting this. I have the same problem on FreeBSD 9.1
with same version of Squid, compiled from source. A config file that
works with 3.3.8 does not work with 3.4.0.1 because of the refresh
patterns. Unfortunately, it seems my post about that did not get the
attention of Amos, Eliezer,etc.

On 1 August 2013 00:46, Tyler Sweet  wrote:
> Hello,
>
> I'm having an odd issue with Squid 3.4 on FreeBSD 9.1, compiled from
> source. I'm not sure if this is a good place to ask for general
> support for 3.4 or not, but I figured I would try.
>
> When using the default configuration file included, the service fails
> to start with the error:
> FATAL: Bungled /usr/local/etc/squid/squid.conf line 75:
> refresh_pattern ^ftp:   144020% 10080
>
> As far as I can tell, it's correct. It's the default block of
> refresh_patterns, and they worked in 3.1, 3.2, and 3.3. Running with
> debug shows:
> snipped...
> 2013/07/31 16:42:17.618| Intercept.cc(422) ProbeForTproxy: Detect
> TPROXY support on port [::]:3129
> 2013/07/31 16:42:17.618| Intercept.cc(429) ProbeForTproxy: ...Probing
> for IPv6 TPROXY support.
> 2013/07/31 16:42:17.618| Intercept.cc(461) ProbeForTproxy: ...Probing
> for IPv4 TPROXY support.
> 2013/07/31 16:42:17.618| Intercept.cc(472) ProbeForTproxy: IPv4 TPROXY
> support detected. Using.
> 2013/07/31 16:42:17.618| tools.cc(636) leave_suid: leave_suid: PID 4334 called
> 2013/07/31 16:42:17.618| tools.cc(658) leave_suid: leave_suid: PID
> 4334 giving up root, becoming 'squid'
> 2013/07/31 16:42:17.619| cbdata.cc(419) cbdataInternalLock:
> cbdataLock: 0x8034a4758=1
> 2013/07/31 16:42:17.619| cache_cf.cc(556) parseOneConfigFile:
> Processing: coredump_dir /var/spool/
> 2013/07/31 16:42:17.619| cache_cf.cc(556) parseOneConfigFile:
> Processing: refresh_pattern   ^ftp:   144020%
> 10080
> 2013/07/31 16:42:17.619| ERROR: A percentage value is missing.
> 2013/07/31 16:42:17.619| tools.cc(636) leave_suid: leave_suid: PID 4334 called
> 2013/07/31 16:42:17.619| tools.cc(658) leave_suid: leave_suid: PID
> 4334 giving up root, becoming 'squid'
> FATAL: Bungled /usr/local/etc/squid/squid.conf line 75:
> refresh_pattern ^ftp:   144020% 10080
> Squid Cache (Version 3.4.0.1): Terminated abnormally.
> CPU Usage: 0.012 seconds = 0.012 user + 0.000 sys
> snipped
>
> I'm not sure why this is happening. I tried digging into the source a
> bit, and came to where the error is coming from:
> /*
>  * This function is similar as GetInteger() but the token might contain
>  * the percentage symbol (%) and we check whether the value is in the range
>  * of [0, 100]
>  * So, we accept two types of input: 1. XX% or 2. XX , 0<=XX<=100
>  */
> int
> GetPercentage(void)
> {
> int p;
> char *token = strtok(NULL, w_space);
>
> if (!token) {
> debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "ERROR: A percentage
> value is missing.");
> self_destruct();
> }
>
> //if there is a % in the end of the digits, we remove it and go on.
> char* end = &token[strlen(token)-1];
> if (*end == '%') {
> *end = '\0';
> }
>
> p = xatoi(token);
>
> if (p < 0 || p > 100) {
> debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "ERROR: The value '"
> << token << "' is out of range. A percentage should be within [0,
> 100].");
> self_destruct();
> }
>
> return p;
> }
>
>
> But, with little (and closer to none at all) knowledge of C, I don't
> know how to debug it. Does anyone have any ideas? Has refresh_patterns
> been changed in 3.4 to a new syntax?
>
> My compile options are:
> Squid Cache: Version 3.4.0.1
> configure options:  '--with-default-user=squid'
> '--bindir=/usr/local/sbin' '--sbindir=/usr/local/sbin'
> '--datadir=/usr/local/etc/squid'
> '--libexecdir=/usr/local/libexec/squid' '--localstatedir=/var'
> '--sysconfdir=/usr/local/etc/squid' '--with-logdir=/var/log/squid'
> '--with-pidfile=/var/run/squid/squid.pid'
> '--with-swapdir=/var/squid/cache/squid' '--enable-auth'
> '--enable-build-info' '--enable-loadable-modules'
> '--enable-removal-policies=lru heap' '--disable-epoll'
> '--disable-linux-netfilter' '--disable-translation'
> '--enable-auth-basic=DB MSNT MSNT-multi-domain NCSA PAM POP3 RADIUS
> fake getpwnam NIS' '--enable-auth-digest=file'
> '--enable-external-acl-helpers=file_userip time_quota unix_group'
> '--enable-auth-negotiate=kerberos wrapper' '--enable-auth-ntlm=fake
> smb_lm' '--enable-storeio=diskd rock ufs aufs' '--enable-disk-io=AIO
> Blocking DiskDaemon IpcIo Mmapped DiskThreads'
> '--enable-log-daemon-helpers=file' '--enable-url-rewrite-helpers=fake'
> '--disable-internal-dns' '--enable-htcp' '--disable-forw-via-db'
> '--enable-cache-digests' '--enable-wccp' '--enable-wccpv2'
> '--enable-eui' '--enable-ipfw-transparent' '--enable-pf-transparent'
> '--disable-ipf-transparent' '--disable-follow-x-forwarded-for'
> '--disable-ecap' '--disable-icap-client' '--disable-esi'
> '--enable-kqueue' '--with-large-