Re: Starting SQUID/IPv6 tests...

2005-06-20 Thread Rafael Martinez Torres
>
> Obviously !. I have top update rfc1035.cc to include  records,
> specified at RFC1886
>

We are using SQUID/IPv6 as cache for http protocol...

One only thing left to make it minimum mergeable into HEAD branch.

- Arrange the "any_addr" (0.0.0.0) and "no_adddr" (255.255.255.255)
literal symbols in the config default file.





Re: Starting SQUID/IPv6 tests...

2005-06-15 Thread Rafael Martinez Torres


>
> I can download an  http URL on IPv6 via SQUID, but only if the host is
> recorded at /etc/hosts.
>
> So, I guess ipcache.cc is not recording/grabing DNS queries properly...

Obviously !. I have top update rfc1035.cc to include  records,
specified at RFC1886



Re: Starting SQUID/IPv6 tests...

2005-06-15 Thread Rafael Martinez Torres

I can download an  http URL on IPv6 via SQUID, but only if the host is
recorded at /etc/hosts.

So, I guess ipcache.cc is not recording/grabing DNS queries properly...
Please, to save time,

could you tell me how to inspect/debug ipcache ? I mean, at ipcache.cc
there are
code to print statistics and to purge items, but I don't know how to force
Squid to use them ...

Yes, I'm having a look into the User's Guide...

--
PGP public key: http://www.ngn.euro6ix.org/IPv6/rafael.martinez.gpg




Re: Starting SQUID/IPv6 tests...

2005-06-14 Thread Henrik Nordstrom

On Tue, 14 Jun 2005, Rafael Martinez Torres wrote:


/* No default for mcast_groups */
default_line("udp_incoming_address 0.0.0.0");


These (the ones using 0.0.0.0) should be abstracted using the keyword 
"any" or "unspecified" or similar.



default_line("udp_outgoing_address 255.255.255.255");
/* No default for cache_peer */


The second one is really a cludge. The 255.255.255.255 is a magic address 
meaning "not specified, use the same as udp_incoming_address". This is 
confusing to a lot of people and is better expressed using a keyword 
rather than a magic address.



On this tip,

all 0.0.0.0/0.0.0.0

must be

all ::/::

Actually I change it by hand on squid.conf...
My opinion should be to be hardcoded as the previous


As I said before the "all" ACL should be changed to not be a src type acl, 
but a hardcoded acl which is always true. It should not be possible to 
change this from squid.conf imho.


Regards
Henrik


Re: Starting SQUID/IPv6 tests...

2005-06-14 Thread Rafael Martinez Torres

(I'have been busy, Sorry delay )

> > Does cf.data format accept #ifdef directives ? Any idea on how to
> > selectively add default IPv6 address ?
>
> Hmm.. everything in cf.data.pre can be overridden by squid.conf. If just
> provides defaults where suitable.
>
>

Rigth, at a first time I thougth so, then I overwrote the lines to
be overriden , but these defaults provided are not
SUITABLE for IPv6 ... I mean

At generated cf_parser.h, the systen will load by default:

#if USE_SSL
/* No default for sslpassword_program */
#endif
default_line("icp_port 0");
#if USE_HTCP
default_line("htcp_port 4827");
#endif
/* No default for mcast_groups */
default_line("udp_incoming_address 0.0.0.0");
default_line("udp_outgoing_address 255.255.255.255");
/* No default for cache_peer */

And clearly, these addresses are not suitable for IPv6 ...
They must be

default_line("udp_incoming_address ::");
default_line("udp_outgoing_address 
::::::f:");

So, when booting Squid, the programm BEFORE overriding with squid.conf

fails with

Default configuration file: udp_incoming_address 0.0.0.0.

For the time beeing, I'm changing cf_parser.h by-hand, but this is
generated on compile-time ...!
So I have to make clean, I have to re-type by-hand
That's why my question...


> What requires you to provide some default IPv6 address?
>

udp_incoming_address , outgoing and some others else


> Some of the directives like tcp_outgoing_address etc needs to be extended
> with an IPv6 variant, but no default is really needed for either IP
> version.
>


> The acl "all" probably should be redefined to really mean "all" regardless
> of the IP version of the client. I am fine with having this acl
> hardcoded, or actually the "all" and "none" acls hardcoded to always true
> or false respectively.  Today there is a lot of user confusion by
> redefining the "all" acl wrongly causing problems in other directives
> relying on "all" for their default settings..
>

On this tip,

all 0.0.0.0/0.0.0.0

must be

all ::/::

Actually I change it by hand on squid.conf...
My opinion should be to be hardcoded as the previous

> What else do you have problems with the defaults of?
>
> Regards
> Henrik
>

Status:We are closer to make Squid3/IPv6 minimum runable...
Actually problems with ipcache.cc



Re: Starting SQUID/IPv6 tests...

2005-06-09 Thread Serassio Guido

Hi Henrik,

At 23.59 08/06/2005, Henrik Nordstrom wrote:


On Wed, 8 Jun 2005, Serassio Guido wrote:


If there aren't any opposition, I like to commit the patch to Squid 3.0 HEAD.


You are welcome.


Done.


 As long as we remember that this should be redone more proper later on.


I'have changed the bug #1201 to a code enhancement request, living it open.

Regards

Guido



-

Guido Serassio
Acme Consulting S.r.l. - Microsoft Certified Partner
Via Lucia Savarino, 1   10098 - Rivoli (TO) - ITALY
Tel. : +39.011.9530135  Fax. : +39.011.9781115
Email: [EMAIL PROTECTED]
WWW: http://www.acmeconsulting.it/



Re: Starting SQUID/IPv6 tests...

2005-06-08 Thread Henrik Nordstrom

On Wed, 8 Jun 2005, Serassio Guido wrote:


If there aren't any opposition, I like to commit the patch to Squid 3.0 HEAD.


You are welcome. As long as we remember that this should be redone more 
proper later on.


Regards
Henrik


Re: Starting SQUID/IPv6 tests...

2005-06-08 Thread Serassio Guido

Hi,

At 13.45 08/06/2005, Rafael Martinez Torres wrote:


>
> Rafael, you can try the patch in bug #1201, it should fix the problem
> before the acl refactoring.
>
> http://www.squid-cache.org/bugs/show_bug.cgi?id=1201
>
> Regards
>
> Guido
>

The patch works... As it is transient, should I commit my private branch ?


If there aren't any opposition, I like to commit the patch to Squid 3.0 HEAD.

Henrik, your opinion ?

Regards

Guido



-

Guido Serassio
Acme Consulting S.r.l. - Microsoft Certified Partner
Via Lucia Savarino, 1   10098 - Rivoli (TO) - ITALY
Tel. : +39.011.9530135  Fax. : +39.011.9781115
Email: [EMAIL PROTECTED]
WWW: http://www.acmeconsulting.it/



Re: Starting SQUID/IPv6 tests...

2005-06-08 Thread Henrik Nordstrom

On Wed, 8 Jun 2005, Rafael Martinez Torres wrote:


2.- Just a question... cf_parser.h is generating by cf_gen preprocessing
cf.data...  I need to insert some default IPv6 addresses ( actually I
modifiy on hand cf_parser.h )

Does cf.data format accept #ifdef directives ? Any idea on how to
selectively add default IPv6 address ?


Hmm.. everything in cf.data.pre can be overridden by squid.conf. If just 
provides defaults where suitable.


What requires you to provide some default IPv6 address?

Some of the directives like tcp_outgoing_address etc needs to be extended 
with an IPv6 variant, but no default is really needed for either IP 
version.


The acl "all" probably should be redefined to really mean "all" regardless 
of the IP version of the client. I am fine with having this acl 
hardcoded, or actually the "all" and "none" acls hardcoded to always true 
or false respectively.  Today there is a lot of user confusion by 
redefining the "all" acl wrongly causing problems in other directives 
relying on "all" for their default settings..


What else do you have problems with the defaults of?

Regards
Henrik


Re: Starting SQUID/IPv6 tests...

2005-06-08 Thread Rafael Martinez Torres
>
> Rafael, you can try the patch in bug #1201, it should fix the problem
> before the acl refactoring.
>
> http://www.squid-cache.org/bugs/show_bug.cgi?id=1201
>
> Regards
>
> Guido
>

The patch works... As it is transient, should I commit my private branch ?

1.- Squid server runs and processes a query on IPv6, but the ACL system
seems to fail...

Yes, I know.   debug_options 88,9 28,4  at squid.conf


2.- Just a question... cf_parser.h is generating by cf_gen preprocessing
cf.data...  I need to insert some default IPv6 addresses ( actually I
modifiy on hand cf_parser.h )

Does cf.data format accept #ifdef directives ? Any idea on how to
selectively add default IPv6 address ?

I will check... Just to advance time



Re: Starting SQUID/IPv6 tests...

2005-06-07 Thread Henrik Nordstrom

On Tue, 7 Jun 2005, Rafael Martinez Torres wrote:


Squid is single-threaded... I tried to use the gdb, but at
least there are three "fork()" system-calls, and you must prompt gdb
to choose between the parent or child process...
The trace I follow (on main.cc) is:


I use the following:

% gdb /path/to/squid
(gdb) handle SIGPIPE pass noprint nostop
(gdb) run -DNYCd3


The -N and -C is the most important. -N disables the daemon mode, and -C 
disables the signal handlers.


SIGPIPE needs to be ignored if your have some real-life clients as SIGPIPE 
is delivered each time a client aborts while Squid is sending data to 
it...



You can also attach to a already runing Squid if you prefer this:

% gdb /path/to/squid `cat /path/to/squid.pid`
(gdb) handle SIGPIPE pass noprint nostop
(gdb) continue

Regards
Henrik


Re: Starting SQUID/IPv6 tests...

2005-06-07 Thread Rafael Martinez Torres
>
> Maybe I'm not an expert on gbd... If you have an URL on the Squid3 website
> talking on debugging matters, I will read it.
>

OK. Just in the page for #1201. Thanks.

> For the time beeing I will try the patch for the bug #1201 as Guido
> suggested...
>
>
>



Re: Starting SQUID/IPv6 tests...

2005-06-07 Thread Rafael Martinez Torres


--
PGP public key: http://www.ngn.euro6ix.org/IPv6/rafael.martinez.gpg

>
> All cbdata classes is allocated via cbdataInternalAlloc which initializes
> these fields proper.
>
Yes, I saw it... they call it from the macro "cbdataAlloc"...


> I said, a stack trace showing exacly which error you are looking at would
> help a lot in trying to identify the cause. Without a stack trace all we
> can do is guess.. and my best guess is the known acl related problem (see
> bugzilla). Not technically a "problem", more like code partway thru
> refactoring and currently in an inconsistent state..
>

Squid is single-threaded... I tried to use the gdb, but at
least there are three "fork()" system-calls, and you must prompt gdb
to choose between the parent or child process...
The trace I follow (on main.cc) is:

first fork: child:  (setsid() call)
second fork: parent:  (cpid variable )
third fork: child: (around openlogname)

Then, after "execvp(prog,argc)" I cannot track any more the code waiting
for requests...

Maybe I'm not an expert on gbd... If you have an URL on the Squid3 website
talking on debugging matters, I will read it.

For the time beeing I will try the patch for the bug #1201 as Guido
suggested...




Re: Starting SQUID/IPv6 tests...

2005-06-06 Thread Serassio Guido

Hi,

At 22.21 06/06/2005, Henrik Nordstrom wrote:


On Mon, 6 Jun 2005, Rafael Martinez Torres wrote:


This could be a known bug in Squid-3 where many acls crashes if used
outside of http_access.


I think I know were is the bug... The c->locks attribute is not properly
iniatalized to 0 on C++ cbdata class. So, when cbdataLocl increases it, if
it was randomly negative cbdataUnlock will find it not possitive...


All cbdata classes is allocated via cbdataInternalAlloc which initializes 
these fields proper.


I said, a stack trace showing exacly which error you are looking at would 
help a lot in trying to identify the cause. Without a stack trace all we 
can do is guess.. and my best guess is the known acl related problem (see 
bugzilla). Not technically a "problem", more like code partway thru 
refactoring and currently in an inconsistent state..


Rafael, you can try the patch in bug #1201, it should fix the problem 
before the acl refactoring.


http://www.squid-cache.org/bugs/show_bug.cgi?id=1201

Regards

Guido



-

Guido Serassio
Acme Consulting S.r.l. - Microsoft Certified Partner
Via Lucia Savarino, 1   10098 - Rivoli (TO) - ITALY
Tel. : +39.011.9530135  Fax. : +39.011.9781115
Email: [EMAIL PROTECTED]
WWW: http://www.acmeconsulting.it/



Re: Starting SQUID/IPv6 tests...

2005-06-06 Thread Henrik Nordstrom

On Mon, 6 Jun 2005, Rafael Martinez Torres wrote:


This could be a known bug in Squid-3 where many acls crashes if used
outside of http_access.


I think I know were is the bug... The c->locks attribute is not properly
iniatalized to 0 on C++ cbdata class. So, when cbdataLocl increases it, if
it was randomly negative cbdataUnlock will find it not possitive...


All cbdata classes is allocated via cbdataInternalAlloc which initializes 
these fields proper.


I said, a stack trace showing exacly which error you are looking at would 
help a lot in trying to identify the cause. Without a stack trace all we 
can do is guess.. and my best guess is the known acl related problem (see 
bugzilla). Not technically a "problem", more like code partway thru 
refactoring and currently in an inconsistent state..


Regards
Henrik



Re: Starting SQUID/IPv6 tests...

2005-06-06 Thread Rafael Martinez Torres

> On Wed, 1 Jun 2005, Rafael Martinez Torres wrote:
>
> > 2005/06/01 19:21:58| storeLateRelease: released 0 objects
> > 2005/06/01 19:23:21| assertion failed: cbdata.cc:402: "c->locks > 0"
>
> This could be a known bug in Squid-3 where many acls crashes if used
> outside of http_access.

I think I know were is the bug... The c->locks attribute is not properly
iniatalized to 0 on C++ cbdata class. So, when cbdataLocl increases it, if
it was randomly negative cbdataUnlock will find it not possitive...

This can be a patch for cbdata.cc on the HEAD branch , but I need
understand this module. Now invstigating



>
> Make sure your squid.conf is a bare minimum only. Also get a stack trace
> of the error so we can see where it is crashing.
>
> Regards
> Henrik
>



Re: Starting SQUID/IPv6 tests...

2005-06-03 Thread Henrik Nordstrom

On Wed, 1 Jun 2005, Rafael Martinez Torres wrote:


2005/06/01 19:21:58| storeLateRelease: released 0 objects
2005/06/01 19:23:21| assertion failed: cbdata.cc:402: "c->locks > 0"


This could be a known bug in Squid-3 where many acls crashes if used 
outside of http_access.


Make sure your squid.conf is a bare minimum only. Also get a stack trace 
of the error so we can see where it is crashing.


Regards
Henrik