]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
13 years agoLog Format token namespace upgrade
Amos Jeffries [Fri, 18 Nov 2011 07:48:25 +0000 (00:48 -0700)] 
Log Format token namespace upgrade

This updates the format parser and storage objects in the Format::
namespace and separates some into separate files.

Add a registration API so components can register themselves an array
of tokens in a namespace. Registering the arbitrary namespace "example"
with some tokens ("a","b") will cause the parser to accept those tokens
in a logging format like so: "%example::a %example::b".

Future work:
 - use runners registry instead of Init() function
 - convert the error pages to use format for the page body macros
 - convert the %ssl_* tokens in src/ssl/* to use format and "ssl::"
 - convert external_acl_type to use formats for its helper input string.

13 years agoUse the right certificate when detailing SSL certificate validation errors.
Mathias Fischer [Thu, 17 Nov 2011 15:31:57 +0000 (08:31 -0700)] 
Use the right certificate when detailing SSL certificate validation errors.

When an _intermediate_ SSL server certificate fails validation, we should
report errors using information in that certificate and not in the top-level
"peer" certificate. Otherwise, our details may make no sense. For example, we
may say that the validation failed due to the expired certificate and then show
an expiration date in the future (because the top-level certificate did not
expire but the intermediate certificate did).

OpenSSL X509_STORE_CTX_get_current_cert() returns the certificate that was
being tested when our certificate validation callback was called.

13 years agoFix Comm::Write closing() assertion when retrying a failed UDP DNS query.
Alex Rousskov [Tue, 15 Nov 2011 18:21:07 +0000 (11:21 -0700)] 
Fix Comm::Write closing() assertion when retrying a failed UDP DNS query.

When we receive a UDP DNS response with a truncation (TC) bit set, we retry
using TCP. Since the retry trigger has nothing to do with the TCP connection,
it is possible that the TCP connection is being closed when we are about to
write to it: A call to our connection close callback has been scheduled but
has not fired yet. We must check for and avoid such race conditions.

13 years agoBug 2910: MemBuf may grow beyond max_capacity
Alex Rousskov [Mon, 14 Nov 2011 06:34:12 +0000 (19:34 +1300)] 
Bug 2910: MemBuf may grow beyond max_capacity

13 years agoBug 3412: External ACL Uses Invalid Cache Entry
Amos Jeffries [Fri, 11 Nov 2011 10:22:02 +0000 (03:22 -0700)] 
Bug 3412: External ACL Uses Invalid Cache Entry

13 years agoLanguage: fr updates
Bernard [Thu, 10 Nov 2011 23:07:22 +0000 (12:07 +1300)] 
Language: fr updates

13 years agoBug 3398: persistent server connection closed after PUT/DELETE
Christos Tsantilas [Thu, 10 Nov 2011 21:49:07 +0000 (10:49 +1300)] 
Bug 3398: persistent server connection closed after PUT/DELETE

13 years agoFix assertion when dstdomain abused in access controls
Amos Jeffries [Thu, 10 Nov 2011 01:35:23 +0000 (14:35 +1300)] 
Fix assertion when dstdomain abused in access controls

This converts an assertion into a logged warning and a failed-match if
dstdomain ACLs are used in places where the HTTP reuqest is not available.

13 years agoLanguage: en updates
Amos [Wed, 9 Nov 2011 23:08:00 +0000 (12:08 +1300)] 
Language: en updates

13 years agoLanguage: en updates
Amos [Wed, 9 Nov 2011 23:06:13 +0000 (12:06 +1300)] 
Language: en updates

13 years agoMaintenance: keep 30 snapshots and detect the new file pattern for removals
Amos Jeffries [Wed, 9 Nov 2011 02:23:14 +0000 (19:23 -0700)] 
Maintenance: keep 30 snapshots and detect the new file pattern for removals

13 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 9 Nov 2011 01:35:19 +0000 (18:35 -0700)] 
SourceFormat Enforcement

13 years agoBug 3408: Wrong header length leads to EFAULTs when cretating UFS swap.log.new.
Matthias Pitzl [Tue, 8 Nov 2011 15:00:17 +0000 (08:00 -0700)] 
Bug 3408: Wrong header length leads to EFAULTs when cretating UFS swap.log.new.

Also localized the header variable as it may be destroyed at any time.

13 years agoDetail SSL handshake failures
Christos Tsantilas [Tue, 8 Nov 2011 13:40:26 +0000 (15:40 +0200)] 
Detail SSL handshake failures

This patch allows Squid to provide details for the %D macro on the secure
connect failed error page when an SSL handshake with the origin server fails.
The default %D text is "Handshake with SSL server failed: XYZ" where XYZ is the
corresponding error string/description returned by OpenSSL if there is any.

This is a Measurement Factory project.

13 years agoDocument and alter the pconn idle timeout directives.
Amos Jeffries [Tue, 8 Nov 2011 10:54:37 +0000 (03:54 -0700)] 
Document and alter the pconn idle timeout directives.

Alters the directive names to clarify what they do and adds some more
description to the config file documentation.

Alters the internal config variables to match the new directive names.

Also alters the well known messages in mgr:filedescriptors report a little
to indicate client/server type and adds a standard "Idle " prefix for
easy automated scanning.

13 years agoDocument and alter the pconn idle timeout directives.
Amos Jeffries [Tue, 8 Nov 2011 09:24:08 +0000 (22:24 +1300)] 
Document and alter the pconn idle timeout directives.

Alters the directive names to clarify what they do and adds some more
description to the config file documentation.

Alters the internal config variables to match the new directive names.

Also alters the well known messages in mgr:filedescriptors report a little
to indicate client/server type and adds a standard "Idle " prefix for
easy automated scanning.

13 years agoTypo in snapshot change
Amos Jeffries [Mon, 7 Nov 2011 10:08:21 +0000 (03:08 -0700)] 
Typo in snapshot change

13 years agoDocs: typo
Amos Jeffries [Mon, 7 Nov 2011 09:57:05 +0000 (02:57 -0700)] 
Docs: typo

13 years agoMaintenance: Reduce snapshot build test cycle to the basic tests
Amos Jeffries [Mon, 7 Nov 2011 09:20:51 +0000 (02:20 -0700)] 
Maintenance: Reduce snapshot build test cycle to the basic tests

13 years agoSupport %% in external ACL format
Amos Jeffries [Sun, 6 Nov 2011 22:52:18 +0000 (11:52 +1300)] 
Support %% in external ACL format

13 years agoAdd a mask on the qos_flows miss configuration value.
Andrew Beverley [Sat, 5 Nov 2011 05:21:11 +0000 (18:21 +1300)] 
Add a mask on the qos_flows miss configuration value.

The reason for this is to allow the preserved mark/TOS value from the
server to be altered slightly rather than overwritten completely.

Example usage. The following will preserve the netfilter mark, but will
ensure that the (9th) bit specified in the miss value will be set to 1
in the preserved mark:

  qos_flows mark miss=0x100/0xF00

13 years agoBug 3367: fix inverted check on host_strict_verify
Amos Jeffries [Fri, 4 Nov 2011 23:28:49 +0000 (12:28 +1300)] 
Bug 3367: fix inverted check on host_strict_verify

13 years agoBug 3299: dnsserver: various undefined references
Amos Jeffries [Fri, 4 Nov 2011 12:30:43 +0000 (01:30 +1300)] 
Bug 3299: dnsserver: various undefined references

13 years agoPortability: add cstdarg as source of var_arg when available
Amos Jeffries [Fri, 4 Nov 2011 07:03:11 +0000 (20:03 +1300)] 
Portability: add cstdarg as source of var_arg when available

13 years agoPolished calculation of the number of needed memory pages for one Store write.
Alex Rousskov [Thu, 3 Nov 2011 21:09:04 +0000 (15:09 -0600)] 
Polished calculation of the number of needed memory pages for one Store write.

The old code was overestimating the number of memory pages required when we
needed to write exactly n*SM_PAGE_SIZE bytes.

13 years agoDocs: correct syntax for UDP/TCP log module parameters
Amos Jeffries [Thu, 3 Nov 2011 11:55:29 +0000 (00:55 +1300)] 
Docs: correct syntax for UDP/TCP log module parameters

13 years agoBug 3364: SNMP Orphans
Amos Jeffries [Thu, 3 Nov 2011 10:02:02 +0000 (23:02 +1300)] 
Bug 3364: SNMP Orphans

13 years agoBug 3406: SSL Log Error in debug
Amos Jeffries [Thu, 3 Nov 2011 09:27:40 +0000 (22:27 +1300)] 
Bug 3406: SSL Log Error in debug

13 years agoLanguage: fr updates
Bernard [Wed, 2 Nov 2011 23:09:23 +0000 (12:09 +1300)] 
Language: fr updates

13 years agoLanguage: fr updates
Bernard [Wed, 2 Nov 2011 23:07:55 +0000 (12:07 +1300)] 
Language: fr updates

13 years agoFixed two more cases of outdated shared memory cache detection
Alex Rousskov [Wed, 2 Nov 2011 21:18:50 +0000 (15:18 -0600)] 
Fixed two more cases of outdated shared memory cache detection
which led to "STORE_DISK_CLIENT == getType()" assertions
when running SMP Squid with non-shared memory caching.

UsingSmp() is not the right condition to detect whether we are using a shared
memory cache because shared memory caching may be disabled and because
Coordinator does not use a shared memory cache even if shared caching is
enabled.

See also: r11821.

13 years agoSource Maintenance: Optimizations and macro fixes
Amos Jeffries [Sun, 30 Oct 2011 02:42:27 +0000 (15:42 +1300)] 
Source Maintenance: Optimizations and macro fixes

* optimize the maintenance script to ony scan for macro problems once

* fix some file macro wrappers not to clash with the OS-macro naming scheme

* fix macro ifdef/ifndef on feature presence macros to use defined() instead

13 years agoSourceFormat Enforcement
Automatic source maintenance [Sat, 29 Oct 2011 02:01:54 +0000 (20:01 -0600)] 
SourceFormat Enforcement

13 years agoadaptation_meta option
Christos Tsantilas [Fri, 28 Oct 2011 20:08:24 +0000 (23:08 +0300)] 
adaptation_meta option

add missing src/tests/testConfigParser[.h,.cc] files

13 years agoadaptation_meta option
Christos Tsantilas [Fri, 28 Oct 2011 19:43:45 +0000 (22:43 +0300)] 
adaptation_meta option

This option allows Squid administrator to add custom ICAP request
headers or eCAP options to Squid ICAP requests or eCAP transactions.
Use it to pass custom authentication tokens and other
transaction-state related meta information to an ICAP/eCAP service.

The addition of a meta header is ACL-driven:
        adaptation_meta name value [!]aclname ...

Processing for a given header name stops after the first ACL list match.
Thus, it is impossible to add two headers with the same name. If no ACL
lists match for a given header name, no such header is added. For example:

        # do not debug transactions except for those that need debugging
        adaptation_meta X-Debug 1 needs_debugging

        # log all transactions except for those that must remain secret
        adaptation_meta X-Log 1 !keep_secret

        # mark transactions from users in the "G 1" group
        adaptation_meta X-Authenticated-Groups "G 1" authed_as_G1

The "value" parameter may be a regular squid.conf token or a "double
quoted string". Within the quoted string, use backslash (\) to escape
any character, which is currently only useful for escaping backslashes
and double quotes. For example,
    "this string has one backslash (\\) and two \"quotes\""

This is a Measurement Factory project

13 years agoDocs: typos in cache_peer text
Amos Jeffries [Fri, 28 Oct 2011 02:41:16 +0000 (15:41 +1300)] 
Docs: typos in cache_peer text

13 years agoPortability fixes for Atomic::WordT API.
Dmitry Kurochkin [Fri, 28 Oct 2011 01:11:23 +0000 (19:11 -0600)] 
Portability fixes for Atomic::WordT API.

Change parameter types for swap_if() and operator==() from int to
Value.  This fixes some GCC warnings in "fake" implementation when
the AtomicWordT template parameter is unsigned.

Polished (waitingToBeFreed == true) test. waitingToBeFreed is
Atomic::WordT<uint8_t> and GCC does not know whether to cast AtomicWord or
boolean when comparing the two.

13 years agoFix "int to double" compiler warnings in IpcIoClaimMemoryNeedsRr::run().
Dmitry Kurochkin [Fri, 28 Oct 2011 01:07:48 +0000 (19:07 -0600)] 
Fix "int to double" compiler warnings in IpcIoClaimMemoryNeedsRr::run().

13 years agoProvide "fake" AtomicWordT implementation for non-SMP configurations.
Dmitry Kurochkin [Fri, 28 Oct 2011 01:01:41 +0000 (19:01 -0600)] 
Provide "fake" AtomicWordT implementation for non-SMP configurations.

While we can not provide real AtomicWordT implementation on the systems where
atomic operations are not available, we can use a "fake" one if Squid is
running in non-SMP mode.  Before the change, the "fake" implementation was
always asserting, which is too restrictive and leads to test failures on
systems without atomic operations.

The new implementation works under conditions similar to "fake" shared memory
segments and allows SMP-using code (e.g. Rock store) to work in non-SMP mode.
In particular, it allows tests to pass on such systems.

AtomicWordT was renamed to WordT and moved to Ipc::Atomic namespace to allow
Ipc::Atomic::Enabled() to be declared outside of the AtomicWordT template
class.  This lets us define the Enabled() method in AtomicWord.cc which avoids
dragging protos.h #include into the AtomicWord.h header.

13 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 28 Oct 2011 00:19:03 +0000 (18:19 -0600)] 
SourceFormat Enforcement

13 years agoBug 3150: do not start useless unlinkd.
Dmitry Kurochkin [Thu, 27 Oct 2011 23:14:28 +0000 (17:14 -0600)] 
Bug 3150: do not start useless unlinkd.

Unlinkd may be used only by UFS storage but, before the change, Squid
always started unlinkd if it was built, even if it was not needed.

Whether a SwapDir may use unlinkd depends on the SwapDir
implementation and DiskIO strategy it uses.  The patch adds
unlinkdUseful() method to SwapDir and DiskIOStrategy to decide if
unlinkd should be started.

After the change, unlinkd may be started during reconfiguration and
unlinkdInit() may be called multiple times.

After the change, unlinkdClose() may be called when unlinkd was never
started.  The patch removes a warning which was printed in this case
on Windows.

13 years agoOptimization: Make read requests in [Rock] IpcIo bypass max-swap-rate limit.
Dmitry Kurochkin [Thu, 27 Oct 2011 22:51:19 +0000 (16:51 -0600)] 
Optimization: Make read requests in [Rock] IpcIo bypass max-swap-rate limit.

Before the change, IpcIoFile::WaitBeforePop() delayed both swap ins
(hits) and swap outs (misses).  This is suboptimal because reads do
not usually accumulate unfinished I/O requests in OS buffers and,
hence, do not eventually require the OS to block all I/O.

Ideally, a disker should probably dequeue all pending disker requests,
satisfy reads ASAP, and then handle writes, but that is difficult for
several reasons.  The patch implements a simpler approach: peek the
next request to be popped, and if it is a swap in (i.e., read or hit),
then pop it without any delay.

When a read is popped, we still adjust the balance member and LastIo,
because we do want to maintain the configured average I/O rate. When a
write request comes in, it will be delayed [longer] if needed.

In the extreme case of a very long stream of read requests (no writes
at all), there will be essentially no I/O rate limit and that is what
we want.

13 years agoDo not allow max-swap-rate and swap-timeout reconfiguration for Rock Store.
Dmitry Kurochkin [Thu, 27 Oct 2011 22:44:20 +0000 (16:44 -0600)] 
Do not allow max-swap-rate and swap-timeout reconfiguration for Rock Store.

These options are used to configure DiskIO module during Rock SwapDir
initialization.  During reconfiguration, the values are updated in Rock
SwapDir, but they do not reach the DiskIO module.  Thus, while Squid says that
option has a new value, the new value is never really used.  This patch fixes
this inconsistency.

In the future, we may support reconfiguration for max-swap-rate and
swap-timeout, but that would require adding reconfiguration support
to DiskIO modules.

13 years agoRename Ipc::FewToFewBiQueue method peek() to findOldest()
Alex Rousskov [Thu, 27 Oct 2011 22:08:28 +0000 (16:08 -0600)] 
Rename Ipc::FewToFewBiQueue method peek() to findOldest()
to better match the method functionality.

13 years agoIndependent shared I/O page limit.
Dmitry Kurochkin [Thu, 27 Oct 2011 21:57:26 +0000 (15:57 -0600)] 
Independent shared I/O page limit.

Shared memory pages are used for shared memory cache and IPC I/O module.
Before this change, the number of shared memory pages needed for IPC I/O
was calculated from the size of shared memory cache.  Moreover, shared
memory cache was required for IPC I/O.

The patch makes the limit for shared I/O pages independent from the
shared memory cache size and presence.  IPC I/O pages limit is calculated
from the number of workers and diskers; it does not depend on cache_dir
configuration.  This may change in the future if we learn how to compute
it (e.g., by multiplying max-swap-rate and swap-timeout if both are
available).

13 years agoBug 3383: store.cc:1631: "new_status != IN_MEMORY" assertion
Alex Rousskov [Thu, 27 Oct 2011 20:39:23 +0000 (14:39 -0600)] 
Bug 3383: store.cc:1631: "new_status != IN_MEMORY" assertion

UsingSmp() is not the right condition to detect whether we are using a shared
cache because shared memory caching may be disabled and because Coordinator
does not use a shared memory cache even if shared caching is enabled.

The assertion was triggered by icons being added to Coordinator local memory
cache. TODO: Coordinator does not need to cache [icons] at all.

13 years agosslBump: Send intermediate CA
Christos Tsantilas [Thu, 27 Oct 2011 15:27:25 +0000 (18:27 +0300)] 
sslBump: Send intermediate CA

SslBump code assumed that it is signing generated certificates with a root CA
certificate. Root certificates are usually not sent along with the server
certificates because clients must have them independently installed or
built-in. Squid was not sending the signing certificate.

In many environments, Squid signing certificate is intermediate (i.e., it
belongs to a non-root CA). If Squid does not send that intermediate signing
certificate with the generated one, the client will not be able to establish a
complete chain of trust from the generated fake to the root CA certificate,
leading to errors.

With this change, Squid may send the signing certificate (along with the
generated one) using the following rules:

   * If the configured signing certificate is self-signed,
     then just send the generated certificate alone.
     Note that root CA certificates are self-signed (by root CA).

   * Otherwise (i.e., if the configured signing certificate is an intermediate
     CA certificate), send both the intermediate CA and the generated fake
     certificate.

   * If Squid sends the intermediate CA certificate, Squid also sends
     all other certificates from the "cert=" file, Sending a chain with
     multiple intermediate CA certificates may be required when the Squid
     signing certificate was signed by another intermediate CA.

This is a Measurement Factory Project

13 years agoBug fix: The multi-language support is broken for Ssl error details
Christos Tsantilas [Thu, 27 Oct 2011 15:22:21 +0000 (18:22 +0300)] 
Bug fix: The multi-language support is broken for Ssl error details

Current Ssl::ErrorDetail::useRequest never sets the ErrorDetail::request
member.The ErrorDetail::request member used to select the correct language
for the web client from Accept-Language header.

13 years agoSimplified code. No functionality changes expected.
Dmitry Kurochkin [Thu, 27 Oct 2011 05:24:19 +0000 (23:24 -0600)] 
Simplified code. No functionality changes expected.

!InDaemonMode() already implies both !UsingSmp() and IamWorkerProcess()
so !InDaemonMode() can be removed from the condition.

13 years agoBug 3383: unhandled exception: theGroupBSize > 0
Alex Rousskov [Thu, 27 Oct 2011 01:00:39 +0000 (19:00 -0600)] 
Bug 3383: unhandled exception: theGroupBSize > 0

Do not create shared queue for IpcIoFile if there are no diskers. The queue
code requires at least one queue reader and writer, and SMP does not imply the
existence of diskers.

13 years agoSourceFormat Enforcement
Automatic source maintenance [Thu, 27 Oct 2011 00:18:23 +0000 (18:18 -0600)] 
SourceFormat Enforcement

13 years agoRemove fake segments from the global Segments array when "unlinking" them.
Alex Rousskov [Wed, 26 Oct 2011 17:17:01 +0000 (11:17 -0600)] 
Remove fake segments from the global Segments array when "unlinking" them.

This change prevents "Duplicate fake segment creation" errors and makes
link/unlink code symmetric.

Also polished fake Segment destruction code.

13 years agoName shared memory segments in a more portable way
Alex Rousskov [Wed, 26 Oct 2011 16:33:46 +0000 (10:33 -0600)] 
Name shared memory segments in a more portable way
to make shm_open() work on FreeBSD and some other OSes.

Linux and friends use "/slashless-name" template for shared memory segment IDs.
HPUX and friends use "/full/path/to/some/file".
FreeBSD uses the former or the latter, depending on version and jail context.

We now distinguish the above cases and prefix the internal segment ID
accordingly. The above analysis and its implementation are based on the
boost::interprocess code.

To make matters worse, the right prefix for path-based OSes depends on whether
we are running an [installed] Squid binary or just a "make check" test case.
For test cases, we cannot use PREFIX-based paths because they may not exist.
Instead, we use the current directory. This is consistent with TESTDIR (i.e.,
cache_dir location) which each fs test case defines to be in the current
directory.

Finally, the segment name may clash with cache_dir name on path-based OSes. We
now append ".shm" to the segment name to reduce the likelihood of a collision.
TODO: Should StoreMap/etc (or their creators) append "map"/etc to their IDs?

13 years agoDetect missing cppunit/extensions/HelperMacros.h for compat
Amos Jeffries [Mon, 24 Oct 2011 01:15:17 +0000 (14:15 +1300)] 
Detect missing cppunit/extensions/HelperMacros.h for compat

13 years agoext_session_acl: updated configure checks
Amos Jeffries [Mon, 24 Oct 2011 00:42:16 +0000 (13:42 +1300)] 
ext_session_acl: updated configure checks

* Drop obsolete check for db_185.h

* Update function check to db_env_create instead of db_open

This enables Squid to skip building of the session helper on systems with
libdb older than 4.0.

13 years agoProduce full list of peer options on maybe-direct forwarding case
Amos Jeffries [Mon, 24 Oct 2011 00:18:26 +0000 (13:18 +1300)] 
Produce full list of peer options on maybe-direct forwarding case

Now that we are generating the set of possible peers before attempting to
connect.  The retry_on_error directive is no longer repeatedly cycling
through the peer selecting process failing on one peer until that peer
works.

The maybe-direct case seems to have been depending on this behaviour to
locate alternative peers before going DIRECT. The attached patch seeks
to make the maybe-direct case produce a list of all available parents
with the specific algorithm choice first.

13 years agoLanguage: it updates
Francesco [Sun, 23 Oct 2011 17:14:33 +0000 (06:14 +1300)] 
Language: it updates

13 years agoLanguage: hy updates
Arthur [Sun, 23 Oct 2011 17:12:50 +0000 (06:12 +1300)] 
Language: hy updates

13 years agoLanguage: he updates
Administrator [Sun, 23 Oct 2011 17:11:10 +0000 (06:11 +1300)] 
Language: he updates

13 years agoBug 1243: Build overrides configured AR setting
Amos Jeffries [Sun, 23 Oct 2011 02:03:09 +0000 (20:03 -0600)] 
Bug 1243: Build overrides configured AR setting

13 years agoext_session_acl: version 1.2
Andrew Beverley [Sun, 23 Oct 2011 01:07:46 +0000 (19:07 -0600)] 
ext_session_acl: version 1.2

This patch makes the following changes to the session helper:

- Removes support for Berkeley DB 1.85
- Adds support for the current Berkeley DB (db.h)
- Adds support for a DB environment (if a directory is specified as
  the path then an environment is created). This gives better
  synchronisation within multiple processes
- Fixes a bug with active mode where LOGIN/LOGOUT did not write to the DB

13 years agoSourceFormat Enforcement
Automatic source maintenance [Sun, 23 Oct 2011 00:16:42 +0000 (18:16 -0600)] 
SourceFormat Enforcement

13 years agoFix fastCheck() default result on multi-line actions.
Amos Jeffries [Sat, 22 Oct 2011 00:42:39 +0000 (13:42 +1300)] 
Fix fastCheck() default result on multi-line actions.

fastCheck() on multiple lines was using the last lines action instead
of the DUNNO state replacement for inversion.

This updated fastCheck() to only use a config lines result state if that
line fully matched. In accordance with documented ACL behaviour.

13 years agoPolished more fatal messages.
Alex Rousskov [Fri, 21 Oct 2011 23:38:50 +0000 (17:38 -0600)] 
Polished more fatal messages.

13 years agoAdded more sources needed by ufs, which some platforms link with testRock
Alex Rousskov [Fri, 21 Oct 2011 23:36:47 +0000 (17:36 -0600)] 
Added more sources needed by ufs, which some platforms link with testRock
via the fs/libfs.la dependency.

13 years agoAdded sources needed by ufs but linked, on some platforms, to testRock
Alex Rousskov [Fri, 21 Oct 2011 22:11:06 +0000 (16:11 -0600)] 
Added sources needed by ufs but linked, on some platforms, to testRock
via the fs/libfs.la dependency.

13 years agoReduced test Rock cache_dir size from 100MB to 10MB to reduce test overheads.
Alex Rousskov [Fri, 21 Oct 2011 22:01:51 +0000 (16:01 -0600)] 
Reduced test Rock cache_dir size from 100MB to 10MB to reduce test overheads.

13 years agoMade fatal shm_open() errors more detailed to triage failing tests/testRock.
Alex Rousskov [Fri, 21 Oct 2011 21:59:16 +0000 (15:59 -0600)] 
Made fatal shm_open() errors more detailed to triage failing tests/testRock.

13 years agoDelete server-side deleteThis()
Christos Tsantilas [Fri, 21 Oct 2011 16:20:42 +0000 (19:20 +0300)] 
Delete server-side deleteThis()

This patch finishes the conversion of ServerStateData into AsyncJob by properly
implementing the doneAll() method and by removing calls to deleteThis() or
replacing with mustStop() calls as appropriate.

The Adaptation::AccessCheck modified to schedule an AsyncJobCall when
access check finishes.

The ServerStateData and ClientHttpRequest classes modified to work with the new
Adaptation::AccessCheck.

This is a Measurement Factory project

13 years agoVarious fixes for Rock store unit tests.
Alex Rousskov [Sun, 16 Oct 2011 04:01:39 +0000 (22:01 -0600)] 
Various fixes for Rock store unit tests.

Also some source maintenance updates.

13 years agoAvoid "double to int" compiler warnings.
Alex Rousskov [Fri, 14 Oct 2011 22:43:20 +0000 (16:43 -0600)] 
Avoid "double to int" compiler warnings.

Could also use integer arithmetic instead of 1e3 double, but it is often safer
to use doubles when it comes to formulas because significant integer rounding
errors are difficult to spot.

13 years agoAdded missing stub to Rock Store test, exposed by layer-02-maximus build test.
Alex Rousskov [Fri, 14 Oct 2011 22:39:03 +0000 (16:39 -0600)] 
Added missing stub to Rock Store test, exposed by layer-02-maximus build test.

13 years agoSMP shared memory cache stats were not collected.
Alex Rousskov [Fri, 14 Oct 2011 16:21:48 +0000 (10:21 -0600)] 
SMP shared memory cache stats were not collected.

"Hot Object" stats were not reported for shared memory cache.

Mean disk object size stats were aggregated inaccurately for SMP.

Moved Store-related stats into a dedicated StoreStats class,
encapsulating memory cache-related (mem), disk cache-related (swap), and
global store (number of objects) stats. Used consistent naming scheme
and a common parent class to make memory and disk stats more alike.

Moved Store stats collection into corresponding Store classes rather
than forcing GetInfo() in stat.cc to know how to deal with all Store stats.

13 years agoAccount for max-swap-rate in swap-timeout handling for Rock.
Alex Rousskov [Fri, 14 Oct 2011 16:00:08 +0000 (10:00 -0600)] 
Account for max-swap-rate in swap-timeout handling for Rock.

Current swap-timeout code does not know about max-swap-rate.  It
simply finds the longest-waiting I/O in disker queues (incoming and
outgoing) and then assumes that the new I/O will wait at least that
long.  The assumption is likely to be wrong when the queue contains
lots of freshly queued requests to disker: Those requests have not
waited long yet, but a max-swap-rate limit will slow them down
shortly.

The patch changes the swap-timeout code to account for max-swap-rate
when dealing with the workers-to-disker queue: If there are N requests
pending, the new one will wait at least N/max-swap-rate seconds.  Also
expected wait time is adjusted based on the queue "balance" member, in
case we have been borrowing time against future I/O already.

13 years agoAdd basic "make check" tests for Rock Store, based on UFS and COSS tests.
Alex Rousskov [Fri, 14 Oct 2011 15:53:02 +0000 (09:53 -0600)] 
Add basic "make check" tests for Rock Store, based on UFS and COSS tests.

13 years agoAdded null pointer guard in HttpStateData::cacheableReply()
Francesco Chemolli [Fri, 14 Oct 2011 14:42:32 +0000 (16:42 +0200)] 
Added null pointer guard in HttpStateData::cacheableReply()

13 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 14 Oct 2011 01:49:17 +0000 (19:49 -0600)] 
SourceFormat Enforcement

13 years agoLog field width polishing
Christos Tsantilas [Thu, 13 Oct 2011 17:05:25 +0000 (20:05 +0300)] 
Log field width polishing

This patch:
 - converts type of the Token::[width|precision]  members from "unsigned int" to "int"
 - renames the Token::[width|precision] members to Token::[widthMin/widthMax]
 - removes unneeded typecastings

This is a Measurement Factory project

13 years agoPrep for 3.2.0.13 and 3.1.16
Amos Jeffries [Thu, 13 Oct 2011 07:47:10 +0000 (01:47 -0600)] 
Prep for 3.2.0.13 and 3.1.16

13 years agoDocs: polish host_very_strict
Alex Rousskov [Wed, 12 Oct 2011 21:22:33 +0000 (15:22 -0600)] 
Docs: polish host_very_strict

13 years agoAllow non-shared memory caching when there are no cache_dirs.
Alex Rousskov [Wed, 12 Oct 2011 20:56:41 +0000 (14:56 -0600)] 
Allow non-shared memory caching when there are no cache_dirs.

Before this change, we destroyed unused/idle StoreEntries if nobody was voting
to keep them in store_table. That blocked non-shared memory cache from getting
new entries if there were no cache_dirs to vote for them, which is wrong. The
new code keeps unused/idle StoreEntries in store_table if nobody objects.

13 years agoBug 3077: '\' in url query strings cause Digest authentication to fail
Amos Jeffries [Tue, 11 Oct 2011 04:27:57 +0000 (22:27 -0600)] 
Bug 3077: '\' in url query strings cause Digest authentication to fail

13 years agoPolished HelperChildConfig methods. No runtime changes expected.
Alex Rousskov [Mon, 10 Oct 2011 16:18:55 +0000 (10:18 -0600)] 
Polished HelperChildConfig methods. No runtime changes expected.

Removed 3 out of 5 constructors as unused.

Prevented silent conversion from int to HelperChildConfig via a
single-parameter constructor.

Removed destructor and assignment operator for being identical to the
compiler-generated ones and for implying that a copy constructor is missing.

13 years agoFixed typos in the host_verify_strict description.
Alex Rousskov [Mon, 10 Oct 2011 14:39:00 +0000 (08:39 -0600)] 
Fixed typos in the host_verify_strict description.

Frankly, the description is likely to still make little sense to
uninitiated because we do not explain what is "Host vs IP validation"
and what the "additional strict validation comparisons" are. There was
an attempt to explain the latter, but I think it failed. Perhaps there
are more typos that hide the intended meaning?

13 years agoBug 3325: option to selectively enable strict host verify checks.
Amos Jeffries [Mon, 10 Oct 2011 12:21:13 +0000 (06:21 -0600)] 
Bug 3325: option to selectively enable strict host verify checks.

13 years agoHost verify: do not pinn destination IP if URL re-write has been done.
Amos Jeffries [Mon, 10 Oct 2011 11:54:04 +0000 (05:54 -0600)] 
Host verify: do not pinn destination IP if URL re-write has been done.

13 years agoBug 3336: assertion failed: helper.cc:701: 'hlp->childs.n_running > 0'
Amos Jeffries [Mon, 10 Oct 2011 03:28:26 +0000 (21:28 -0600)] 
Bug 3336: assertion failed: helper.cc:701: 'hlp->childs.n_running > 0'

13 years agoFix eCAP build failure with --disable-auth
Amos Jeffries [Mon, 10 Oct 2011 03:27:47 +0000 (21:27 -0600)] 
Fix eCAP build failure with --disable-auth

13 years agoBug 3363: never_direct always 'unable to forward this request at this time'
Amos Jeffries [Sun, 9 Oct 2011 07:51:22 +0000 (20:51 +1300)] 
Bug 3363: never_direct always 'unable to forward this request at this time'

never_direct allow test result was mapping to YES insteaad of NO.

13 years agoAdd directive dns_v4_first to make IPv4 connections before IPv6 is tried.
Amos Jeffries [Sun, 9 Oct 2011 05:44:22 +0000 (23:44 -0600)] 
Add directive dns_v4_first to make IPv4 connections before IPv6 is tried.

Default off, to prefer the faster protocol.

The use-case for this is networks which are IPv6-enabled but stuck
behind slow tunnels and whose upstream is not supporting full transit
services over IP.

13 years agoBug 3337: Http status 200 is not accepted for deny_info
Amos Jeffries [Sun, 9 Oct 2011 05:32:46 +0000 (23:32 -0600)] 
Bug 3337: Http status 200 is not accepted for deny_info

13 years agoBug 3237: seq fault in free() from rfc1035RRDestroy
Joerg Lehrke [Sun, 9 Oct 2011 05:16:18 +0000 (23:16 -0600)] 
Bug 3237: seq fault in free() from rfc1035RRDestroy

13 years agoProperly parse HTTP list headers with embedded 8-bit characters
Henrik Nordstrom [Sat, 8 Oct 2011 18:46:19 +0000 (20:46 +0200)] 
Properly parse HTTP list headers with embedded 8-bit characters

MSIE and maybe other browsers sometimes sends 8-bit high characters
in HTTP headers (and URLs). This was mistakenly read as CTL characters
on platforms with signed char type (i.e. x86 etc).

One visible effect of this was that HTTP Digest authentication failed
in MSIE when following a link with embedded 8-bit or UTF-8 characters.

13 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 7 Oct 2011 00:12:29 +0000 (18:12 -0600)] 
SourceFormat Enforcement

13 years agoFixed a typo that broke builds with no HAVE_SHM.
Alex Rousskov [Thu, 6 Oct 2011 22:25:28 +0000 (16:25 -0600)] 
Fixed a typo that broke builds with no HAVE_SHM.

13 years agoFix CertficateDB locking scheme
Christos Tsantilas [Thu, 6 Oct 2011 18:18:24 +0000 (21:18 +0300)] 
Fix CertficateDB locking scheme

Currently we are locking every file going to be accessed by CertificateDB code
even if it is not realy needed, because of a more general lock.

This patch:
   - Replace the old FileLocker class with the pair Lock/Locker classes
   - Remove most of the locks in CertificateDB with only two locks one
     for main database locking and one lock for the file contain the
     current serial number.

This is a Measurement Factory project

13 years agoBug 3349: Bad support for adaptation service URIs with '='
Christos Tsantilas [Thu, 6 Oct 2011 18:12:51 +0000 (21:12 +0300)] 
Bug 3349: Bad support for adaptation service URIs with '='

Currently using URIs  which  include "=" is not supported by
ecap_service/icap_service configuration parameters. Also the squid.conf
documentation about ecap_service is outdated.

This patch
- Fixes the [e|i]cap_service line parser to allow URIs with "="
- Changes the [e|i]cap_service configuration parameter to use the following syntax:
   ecap_service id vectoring_point uri [name=value ...]
- Check for duplicated options
- Fixes the related documentation
- Also the older [e|i]cap_service syntax forms are supported:
   ecap_service id vectoring_point [1|0] uri
   ecap_service id vectoring_point [name=value ...] uri
- The "uri" options is not documented but supported.

This is a Measurement Factory project.

13 years agoAdded missing AtomicWordT::Value typedef to the fake AtomicWord API.
Alex Rousskov [Thu, 6 Oct 2011 17:01:19 +0000 (11:01 -0600)] 
Added missing AtomicWordT::Value typedef to the fake AtomicWord API.

13 years agoPolished SMP caching code, primarily to stay out of the way in non-SMP mode.
Alex Rousskov [Thu, 6 Oct 2011 16:41:46 +0000 (10:41 -0600)] 
Polished SMP caching code, primarily to stay out of the way in non-SMP mode.

Do not start useless diskers. Do not assume Rock cache_dirs are present.
Do not require IpcIo DiskIO module to build Rock store.
Check IPC I/O pages limits in Rock store only when using a disker.
Warn about Rock cache_dir disk space waste.
Warn if shared memory cache is enabled in non-SMP mode.
Fake shared memory segments if needed (e.g., we are using Rock cache_dirs with
  no POSIX shared memory support) and possible (e.g., no SMP).

13 years agoAdded max-swap-rate=swaps/sec option to Rock cache_dir.
Alex Rousskov [Thu, 6 Oct 2011 16:38:03 +0000 (10:38 -0600)] 
Added max-swap-rate=swaps/sec option to Rock cache_dir.

The option limits the rate of Rock disk access to smooth out OS disk commit
activity and to avoid blocking Rock diskers (or even other processes) on I/O.
Should be used when swap demand exceeds disk performance limits but the
underlying file system does not slow down incoming I/Os until the situation
gets out of control.

Warn if Rock disker delays are significant.