Re: [squid-dev] [RFC] reduce MISS on transients collision

2016-07-17 Thread Alex Rousskov
On 07/17/2016 05:01 AM, Amos Jeffries wrote: > I've just been looking at the Store::Controller::find() implementation > and it struck me that if the transients lookup has an error the object > will fail to HIT on any existing cache entries. If the transients table tells us that the transient objec

Re: [squid-dev] [RFC] reduce MISS on transients collision

2016-07-17 Thread Alex Rousskov
On 07/17/2016 12:59 PM, Alex Rousskov wrote: > On 07/17/2016 05:01 AM, Amos Jeffries wrote: >> I've just been looking at the Store::Controller::find() implementation >> and it struck me that if the transients lookup has an error the object >> will fail to HIT on any exist

Re: [squid-dev] [RFC] "Splicing" bumped requests to resolve\workaround WebSockets issues.

2016-07-17 Thread Alex Rousskov
On 07/15/2016 04:29 AM, Eliezer Croitoru wrote: > The issue: > > Clients are issuing secured connections which contains WebSockets > internally and squid HTTP parsing breaks these connections. > Another related issue which deserves attention: > > Certificate pinning and connection breakage. > >

Re: [squid-dev] [PATCH] Some failed transactions are not logged

2016-07-18 Thread Alex Rousskov
On 07/17/2016 03:34 AM, Amos Jeffries wrote: > On 16/07/2016 2:40 a.m., Eduard Bagdasaryan wrote: >> +// do not log connections that sent us no bytes (TODO: make >> configurable) >> +// do not log connections that closed after a transaction (those are >> normal) >> +// XXX: We assume

Re: [squid-dev] Broken trunk after r14735, r14726

2016-07-18 Thread Alex Rousskov
On 07/18/2016 08:49 AM, Christos Tsantilas wrote: > On 07/18/2016 02:12 PM, Christos Tsantilas wrote: >> On 07/16/2016 03:56 PM, Amos Jeffries wrote: >>> On 16/07/2016 7:02 a.m., Alex Rousskov wrote: >>>> * After r14726 (GnuTLS: support for TLS session resume):

Re: [squid-dev] [RFC] "Splicing" bumped requests to resolve\workaround WebSockets issues.

2016-07-18 Thread Alex Rousskov
On 07/17/2016 02:34 PM, Eliezer Croitoru wrote: > I remember something's vaguely and this is why I didn't quote anything. > I tried searching for something in the squid-dev list or irc but I couldn't > found it. For the future, I hope you will document your vague memories without saying that someb

Re: [squid-dev] Broken trunk after r14735, r14726

2016-07-18 Thread Alex Rousskov
On 07/18/2016 05:12 AM, Christos Tsantilas wrote: > I must say that I am worrying a lot for all of these changes. > It is very difficult for me to follow them, and already I have > difficulties to read and debug squid openSSL relate code. > > We are using our own naming scheme for openSSL structu

Re: [squid-dev] Broken trunk after r14735, r14726

2016-07-19 Thread Alex Rousskov
On 07/19/2016 12:52 AM, Amos Jeffries wrote: > 4) designing our code to use an abstraction API that renames all the > library structures and functions to some thing we understand easier **. If multi-library support is needed, and there is no existing usable generic wrapper, then this is the only

Re: [squid-dev] [PATCH] Some failed transactions are not logged

2016-07-19 Thread Alex Rousskov
On 07/19/2016 08:10 AM, Amos Jeffries wrote: > On 20/07/2016 1:44 a.m., Eduard Bagdasaryan wrote: >> 2016-07-19 16:17 GMT+03:00 Amos Jeffries: >>> Is this patch going to include the new config option to prevent logging >>> the new things? or do it in a followup? >> >> For now we are not planning to

Re: [squid-dev] Broken trunk after r14735, r14726

2016-07-19 Thread Alex Rousskov
On 07/19/2016 01:14 AM, Amos Jeffries wrote: > PS. Alex is the other r14735 issue still present in current trunk now > that r14726 is reverted? No, same problem with trunk r14748: > terminate called after throwing an instance of 'std::bad_function_call' > what(): bad_function_call > > Progra

Re: [squid-dev] [PATCH] Some failed transactions are not logged

2016-07-20 Thread Alex Rousskov
On 07/19/2016 10:36 PM, Amos Jeffries wrote: > On 20/07/2016 5:01 a.m., Alex Rousskov wrote: >> On 07/19/2016 08:10 AM, Amos Jeffries wrote: >>> On 20/07/2016 1:44 a.m., Eduard Bagdasaryan wrote: >>>> 2016-07-19 16:17 GMT+03:00 Amos Jeffries: >>>>>

Re: [squid-dev] [PATCH] Some failed transactions are not logged

2016-07-20 Thread Alex Rousskov
On 07/20/2016 09:06 AM, Amos Jeffries wrote: > On 21/07/2016 2:44 a.m., Eduard Bagdasaryan wrote: >> Amos, >> just to clarify: any more touches from my side? > There are the bits where Alex and I agreed on a change. I think that was > all cosmetic documentation stuff. In summary: 1. Rename the e

Re: [squid-dev] [PATCH] Collapse internal revalidation requests (SMP-unaware caches)

2016-07-20 Thread Alex Rousskov
On 07/20/2016 07:21 AM, Amos Jeffries wrote: > Probably more a question for Alex; > whats the point of UsingSmp() in determining transients > initialization? I would expect collapsing to be doable in both SMP and > non-SMP modes. You are correct: Basic collapsed forwarding works in both SMP and

Re: [squid-dev] [PATCH] Collapse internal revalidation requests (SMP-unaware caches)

2016-07-20 Thread Alex Rousskov
On 07/17/2016 08:05 AM, Eduard Bagdasaryan wrote: > +/// whether this storage is capable of serving multiple workers > +virtual bool smpAware() const = 0; The description is correct, but let's also document that smpAware()ness does not say anything about non-SMP support, in case somebody t

Re: [squid-dev] [PATCH] Collapse internal revalidation requests (SMP-unaware caches)

2016-07-20 Thread Alex Rousskov
On 07/20/2016 09:48 AM, Alex Rousskov wrote: > * Transients are needed for SMP caching to work. Correction for the first line, splitting it into two lines: - Caching is needed for collapsed forwarding to work. - Transients are needed for SMP collapsed forwarding to work. Adjusted summary,

Re: [squid-dev] [RFC] [PREVIEW] LockingPointer round 3.

2016-07-20 Thread Alex Rousskov
On 07/19/2016 10:45 PM, Amos Jeffries wrote: > On 19/07/2016 7:14 p.m., Amos Jeffries wrote: >> On 19/07/2016 6:58 a.m., Christos Tsantilas wrote: >>> On 07/18/2016 08:32 PM, Alex Rousskov wrote: >>>> I can only repeat my earlier suggestions to hide that danger

Re: [squid-dev] Broken trunk after r14735, r14726

2016-07-20 Thread Alex Rousskov
On 07/20/2016 10:04 AM, Christos Tsantilas wrote: > Why do we need common types for both SDKs? You have answered your own question below: > The only type needed by squid for openSSL is the "SSL *" which is stored > inside fde class. And the gnutls_session_int for gnutls. These are > should be e

Re: [squid-dev] [RFC] [PREVIEW] LockingPointer round 3.

2016-07-21 Thread Alex Rousskov
On 07/21/2016 07:58 AM, Amos Jeffries wrote: > void resetWithoutLocking(T *t) { > +#if USE_OPENSSL > +assert(!t || t->references > 0); > +assert(!raw || raw->references > 0); > +if (raw && t == raw) { > +assert(raw->references > 1); // us plus caller locks >

Re: [squid-dev] [PATCH] Some failed transactions are not logged

2016-07-21 Thread Alex Rousskov
On 07/20/2016 05:27 PM, Eduard Bagdasaryan wrote: > We do not have a 'getter' for receivedFirstByte_. It easy to add it > of course, but I assume the current receivedFirstByte() should be > refactored then and renamed. Adding a getter is not going to be easy, is outside your project scope, and is

Re: [squid-dev] [PATCH] Collapse internal revalidation requests (SMP-unaware caches)

2016-07-24 Thread Alex Rousskov
On 07/23/2016 08:55 AM, Amos Jeffries wrote: > Applied to trunk as rev.14755 And thank you for fixing the override inconsistency bug. Alex. ___ squid-dev mailing list squid-dev@lists.squid-cache.org http://lists.squid-cache.org/listinfo/squid-dev

Re: [squid-dev] Broken trunk after r14735

2016-07-25 Thread Alex Rousskov
On 07/24/2016 01:04 AM, Amos Jeffries wrote: > does replacing "BIO_free" with "BIO_vfree" in the ssl/gadgets.h > definition of BIO_POinter fix this one? Same startup exception (quoted below) after patching trunk revision 14756 with > -typedef std::unique_ptr> BIO_Pointer; > +typedef std::uniqu

Re: [squid-dev] [PATCH] Deletors for std::unique_ptr WAS: Re: Broken trunk after r14735

2016-07-29 Thread Alex Rousskov
On 07/29/2016 09:27 AM, Amos Jeffries wrote: >>> typedef std::unique_ptr> BIO_Pointer; > I got this config parsing crash replicated here and tried a dozen or so > combinations. It does seem to keep coming back to my earlier approach of > using per-type Functors as the most reliable solution. AFAI

Re: [squid-dev] [PATCH] Deletors for std::unique_ptr fixing r14735

2016-07-29 Thread Alex Rousskov
On 07/29/2016 12:29 PM, Alex Rousskov wrote: > If possible, we should avoid macros and should learn how to use C++11 > correctly. In general, it makes little sense to suffer the pains of > switching to C++11 and then use macros for things C++11 is supposed to > provide or supp

Re: [squid-dev] [PATCH] Deletors for std::unique_ptr fixing r14735

2016-07-29 Thread Alex Rousskov
On 07/29/2016 04:56 PM, Alex Rousskov wrote: > On 07/29/2016 12:29 PM, Alex Rousskov wrote: > I found two macro-free ways to do this. The so called "smart" one does > most of the work for us, but requires repeating the function name twice, > once with decltype() and once wit

Re: [squid-dev] [PATCH] Deletors for std::unique_ptr WAS: Re: Broken trunk after r14735

2016-07-30 Thread Alex Rousskov
On 07/30/2016 07:03 AM, Amos Jeffries wrote: > On 30/07/2016 6:29 a.m., Alex Rousskov wrote: >> On 07/29/2016 09:27 AM, Amos Jeffries wrote: >>>>> typedef std::unique_ptr> >>>>> BIO_Pointer; >> >>> I got this config parsing crash replicat

[squid-dev] [PREVIEW] Fixed reporting of NULL header characters

2016-08-04 Thread Alex Rousskov
Hello, Our Level-1 "WARNING: HTTP header contains NULL characters" messages were broken as was the level-7 reporting of the headers being parsed. Level-2 reporting of "HTTP Server RESPONSE" headers (and probably raw data in other contexts) was and still is broken. These lying-debugging problem

Re: [squid-dev] [PATCH] GnuTLS session redo

2016-08-05 Thread Alex Rousskov
On 08/03/2016 11:57 PM, Amos Jeffries wrote: > +Security::SetSessionResumeData(const Security::SessionPointer &s, const > Security::SessionStatePointer &data) > +{ > +if (data) { > +#if USE_OPENSSL > +(void)SSL_set_session(s.get(), data.get()); > +#elif USE_GNUTLS > +(void)gnut

Re: [squid-dev] [PATCH] GnuTLS session redo

2016-08-05 Thread Alex Rousskov
On 08/05/2016 02:13 PM, Amos Jeffries wrote: > On 6/08/2016 6:37 a.m., Alex Rousskov wrote: >> On 08/03/2016 11:57 PM, Amos Jeffries wrote: >>> +Security::SetSessionResumeData(const Security::SessionPointer &s, const >>> Security::SessionStatePointer &data) &

Re: [squid-dev] [PATCH] GnuTLS session redo

2016-08-05 Thread Alex Rousskov
On 08/04/2016 03:40 AM, Amos Jeffries wrote: > On 4/08/2016 5:57 p.m., Amos Jeffries wrote: > I'm also wondering if it would be useful to add debugs() in the Get/Set > functions for debugging session resume usage. If we do not have that already, I think it would be very useful to add debugging th

Re: [squid-dev] [PATCH] Broken trunk rev14778

2016-08-08 Thread Alex Rousskov
On 08/08/2016 04:43 AM, Amos Jeffries wrote: > r14778: Move static member Last into change() method to avoid > initialization order > errors when a caller uses a global InstanceId object before the library > instantiating its template is initialized. Have you seen these Last errors? Consta

Re: [squid-dev] [PATCH] Broken trunk rev14778

2016-08-08 Thread Alex Rousskov
On 08/08/2016 01:19 PM, Amos Jeffries wrote: > On 9/08/2016 6:01 a.m., Alex Rousskov wrote: >> On 08/08/2016 04:43 AM, Amos Jeffries wrote: >> >>> r14778: Move static member Last into change() method to avoid >>> initialization order >>> errors whe

Re: [squid-dev] [RFC] eCAP auto-enable

2016-08-08 Thread Alex Rousskov
On 08/08/2016 08:06 AM, Amos Jeffries wrote: > IMO, eCAP has pretty much stabilized. We will need a new major eCAP version/release to accommodate backwards-incompatible C++11 builds as discussed at http://bugs.squid-cache.org/show_bug.cgi?id=4376#c19 https://bugs.launchpad.net/ecap/+bug/15954

Re: [squid-dev] [PATCH] Ipc::MemMap::ttl removal

2016-08-08 Thread Alex Rousskov
On 08/08/2016 08:12 AM, Amos Jeffries wrote: > Coverity Scan latest checks are reporting that the ttl member of > Ipc::MemMap is being left uninitialized. > > It sounds like something which would lead to major bugs. Except that it > turns out, AFAICS, that this ttl member is never actually being u

Re: [squid-dev] [PATCH] Make Squid death due to overloaded helpers optional

2016-08-09 Thread Alex Rousskov
On 08/09/2016 05:38 AM, Eduard Bagdasaryan wrote: > On 08/08/2016 02:17 PM, Amos Jeffries wrote: >> * helper::SubmissionFailure is also changing what was previously > Helper::Unknown result codes to Helper::Error. > - Helper::Error is one of the helper output codes, it means success. > Obviousy wh

Re: [squid-dev] [PATCH] Make Squid death due to overloaded helpers optional

2016-08-09 Thread Alex Rousskov
On 08/09/2016 11:39 AM, Amos Jeffries wrote: > On 10/08/2016 4:41 a.m., Alex Rousskov wrote: >> On 08/09/2016 05:38 AM, Eduard Bagdasaryan wrote: >>> On 08/08/2016 02:17 PM, Amos Jeffries wrote: >>>> * helper::SubmissionFailure is also changing what was previously &g

Re: [squid-dev] [PATCH] Make Squid death due to overloaded helpers optional

2016-08-10 Thread Alex Rousskov
On 08/09/2016 06:19 PM, Henrik Nordström wrote: > tis 2016-08-09 klockan 11:47 -0600 skrev Alex Rousskov: >> >> Yep, that matches both my understanding and motivation to return ERR >> in the explicitly configured on-persistent-overload=err case. > I'd say make it con

Re: [squid-dev] [PATCH] Make Squid death due to overloaded helpers optional

2016-08-11 Thread Alex Rousskov
On 08/11/2016 06:53 AM, Amos Jeffries wrote: > On 11/08/2016 11:50 p.m., Eduard Bagdasaryan wrote: >> 2016-08-10 19:03 GMT+03:00 Alex Rousskov >> : >> >>> As Amos has noted, we do need to restore the old "unknown" behavior when >>> the helper

Re: [squid-dev] [PATCH] Incorrect processing of long URIs

2016-08-22 Thread Alex Rousskov
On 08/22/2016 04:24 PM, Eduard Bagdasaryan wrote: > -// Limit to 32 characters to prevent overly long sequences of non-HTTP > -// being sucked in before mismatch is detected. 32 is itself annoyingly > -// big but there are methods registered by IANA that reach 17 bytes: > -// http

Re: [squid-dev] [PATCH] Incorrect processing of long URIs

2016-08-23 Thread Alex Rousskov
On 08/23/2016 03:26 AM, Eduard Bagdasaryan wrote: > 2016-08-23 3:08 GMT+03:00 Alex Rousskov: >> I do not understand why you decided to use maxMethodLength in >> parseRequestFirstLine(). AFAICT, parseMethodField() already does >> everything we need: It logs an error message and

Re: [squid-dev] [PATCH] Incorrect processing of long URIs

2016-08-23 Thread Alex Rousskov
On 08/23/2016 08:08 AM, Amos Jeffries wrote: > A followup patch can be done to give skipDelimiter a 'const char* which' > parameter that takes a description/name for the delimiter to improve > that debug output. > > so: > skipDelimiter(blah, "method") > > produces: > invalid request-line: miss

Re: [squid-dev] Coding standards

2016-08-23 Thread Alex Rousskov
On 08/23/2016 05:48 AM, Adam Majer wrote: > What are the coding standards for Squid? Just to add to Kinkie's correct response: We do not have a comprehensive standard, unfortunately, but you can find a few requirements at http://wiki.squid-cache.org/SquidCodingGuidelines (which should be upda

Re: [squid-dev] [PATCH] Revalidate without Last-Modified

2016-08-23 Thread Alex Rousskov
On 08/23/2016 09:17 AM, Amos Jeffries wrote: > On 24/08/2016 12:07 a.m., Eduard Bagdasaryan wrote: >> 2016-08-21 15:58 GMT+03:00 Amos Jeffries : >>> To change anything between those markers we have to do a full cache >>> versioning and up/down-grade compatibility dance. >> Could you please clarify

Re: [squid-dev] [PATCH] Incorrect processing of long URIs

2016-08-24 Thread Alex Rousskov
On 08/24/2016 06:36 AM, Eduard Bagdasaryan wrote: > 2016-08-23 18:01 GMT+03:00 Alex Rousskov > : > >> invalid request-line: missing delimiter before "HTTP/1" > > In order to generate "where" with such detalization (i.e. the specific > protocol version

Re: [squid-dev] [PATCH] Incorrect processing of long URIs

2016-08-24 Thread Alex Rousskov
On 08/24/2016 08:30 AM, Amos Jeffries wrote: > On 25/08/2016 12:36 a.m., Eduard Bagdasaryan wrote: >> 2016-08-23 18:01 GMT+03:00 Alex Rousskov: >> >>> invalid request-line: missing delimiter before "HTTP/1" >> >> In order to generate "where&quo

Re: [squid-dev] [PATCH] Older response must not update

2016-08-24 Thread Alex Rousskov
On 08/24/2016 09:20 AM, Amos Jeffries wrote: > in src/HttpReply.h: > * please use doxygen syntax "\returns" instead of "returns" in the > comment text. No objection, but please note that the "returns..." phrase in isolation does not fully describe what the method returns in this case. Only the me

Re: [squid-dev] [PATCH] Revalidate without Last-Modified

2016-08-25 Thread Alex Rousskov
On 08/25/2016 04:04 AM, Eduard Bagdasaryan wrote: > Therefore, we could use the timestamp if Last-Modified is unavailable. I do not understand why the patch hides the lastmod field behind a basic getter. If we assert that a timestamp-based last modification value should be used in many cases, the

Re: [squid-dev] [PATCH] Older response must not update

2016-08-25 Thread Alex Rousskov
On 08/25/2016 08:18 AM, Eduard Bagdasaryan wrote: > 2016-08-24 18:20 GMT+03:00 Amos Jeffries : > >> in src/LogTags.cc: >> * instead of adding new enum entry please extend LogTags with a new bool >> flag and the c_str() to append the "IGNORED" when that flag is true. > Added a new LogTags::ignored

Re: [squid-dev] [PATCH] Incorrect processing of long URIs

2016-08-25 Thread Alex Rousskov
On 08/25/2016 10:26 AM, Amos Jeffries wrote: > 2016-08-23 17:50 GMT+03:00 Alex Rousskov: >> I wonder whether we should make this variable static to avoid repeated >> function calls on a performance-sensitive code path. > The output of DelimiterCharacters() cannot be stored i

Re: [squid-dev] [PATCH] Incorrect processing of long URIs

2016-08-25 Thread Alex Rousskov
On 08/25/2016 10:26 AM, Amos Jeffries wrote: > About > the only further optimization we can do there is make the > "CharacterSet::SP" that it outputs in the sensitive path be a local > static *within* DelimiterCharacters() itself and return a reference to > that instead of constructing a new Charat

[squid-dev] Sad performance trend

2016-08-26 Thread Alex Rousskov
Hello, Factory ran a bunch of micro-level Polygraph tests, targeting several Squid subsystems: header parsing, connection management, and SSL (but no SslBump). We tested a few Squid versions going back to v3.1: W1 W2 W3 W4 W5 W6 v3.1 32% 38% 16% 48% 16+ 9% v3.3 23% 31% 14%

Re: [squid-dev] [PATCH] Revalidate without Last-Modified

2016-08-27 Thread Alex Rousskov
On 08/27/2016 05:22 AM, Eduard Bagdasaryan wrote: > 2016-08-25 18:52 GMT+03:00 Alex Rousskov > : > >> 3. Sending an HTCP message to another service. >> >> > -hdr.putTime(Http::HdrType::LAST_MODIFIED, e->lastmod); >> >

Re: [squid-dev] [PATCH] Revalidate without Last-Modified

2016-08-27 Thread Alex Rousskov
On 08/27/2016 08:33 AM, Amos Jeffries wrote: > If the response Squid would emit to the client proxy would contain a > synthesized Last-Modified header - then the same synthetic value should > be sent in HTCP. I agree with that decision logic. > I think Squid should be emitting a synthetic L-M h

Re: [squid-dev] [PATCH] Older response must not update

2016-08-27 Thread Alex Rousskov
On 08/27/2016 08:23 AM, Amos Jeffries wrote: > On 26/08/2016 5:05 a.m., Alex Rousskov wrote: >> I recommend renaming and re-documenting that subclass: >> >> /// Things that may happen to a transaction while it is being >> /// processed according to its LOG_* cat

Re: [squid-dev] [PATCH] Revalidate without Last-Modified

2016-08-30 Thread Alex Rousskov
On 08/30/2016 04:35 AM, Eduard Bagdasaryan wrote: > 2016-08-28 1:12 GMT+03:00 Alex Rousskov : >> Not all HTCP clients are Squids, but how does Squid code treat such an >> HTCP TST response? > It seems that Squid does not care whether HTCP response contains LMT or > not. Mo

[squid-dev] [PATCH] Reject or sanitize more problematic Content-Length values

2016-09-01 Thread Alex Rousskov
Hello, Squid is violating HTTP MUSTs by forwarding messages with problematic Content-Length values. Some of those bugs were fixed in trunk r14215. This change handles multiple Content-Length values inside one header field, negative values, and trailing garbage. Handling the former required a c

Re: [squid-dev] [PATCH] Reject or sanitize more problematic Content-Length values

2016-09-02 Thread Alex Rousskov
On 09/02/2016 09:05 AM, Amos Jeffries wrote: > On 2/09/2016 11:21 a.m., Alex Rousskov wrote: >> This change handles multiple Content-Length values inside >> one header field, negative values, and trailing garbage. Handling the >> former required a change in the o

Re: [squid-dev] [PATCH] Reject or sanitize more problematic Content-Length values

2016-09-02 Thread Alex Rousskov
On 09/02/2016 09:11 PM, Amos Jeffries wrote: > I would realy like it to be under Http:: and in http/ the rest is okay > to skip. Sounds good. I have no problems with moving that code into http/ and Http::. It is certainly appropriate, especially if you expect HTTP/2 code to benefit from this clas

Re: [squid-dev] Sad performance trend

2016-09-06 Thread Alex Rousskov
On 09/06/2016 08:27 AM, Amos Jeffries wrote: > On 27/08/2016 12:32 p.m., Alex Rousskov wrote: >> W1 W2 W3 W4 W5 W6 >> v3.1 32% 38% 16% 48% 16+ 9% >> v3.3 23% 31% 14% 42% 15% 8% >> v3.5 11% 16% 12% 36% 7% 6% >> v4.0 11% 15% 9% 30% 14%

Re: [squid-dev] [PATCH] Reject or sanitize more problematic Content-Length values

2016-09-06 Thread Alex Rousskov
On 09/05/2016 09:31 PM, Amos Jeffries wrote: > On 6/09/2016 8:52 a.m., Amos Jeffries wrote: >> On 3/09/2016 5:48 p.m., Alex Rousskov wrote: >>> On 09/02/2016 09:11 PM, Amos Jeffries wrote: >>> >>>> I would realy like it to be under Http:: and in http/ the re

Re: [squid-dev] New Defects reported by Coverity Scan for Squid after IndependentRunner

2016-09-09 Thread Alex Rousskov
On 09/09/2016 07:34 AM, Christos Tsantilas wrote: > On 09/09/2016 02:21 PM, Amos Jeffries wrote: >> These issues are caused by the new RegisterRunner() design using >> GetRidOfRunner(rr) if shutdown has already begun. That can potentially >> result in the constructor of a class inheriting from Inde

Re: [squid-dev] New Defects reported by Coverity Scan for Squid after IndependentRunner

2016-09-09 Thread Alex Rousskov
On 09/09/2016 11:21 AM, Christos Tsantilas wrote: > On 09/09/2016 07:00 PM, Alex Rousskov wrote: >> On 09/09/2016 07:34 AM, Christos Tsantilas wrote: >>> On 09/09/2016 02:21 PM, Amos Jeffries wrote: >>>> Also the IndependentRunner::registerRunner() method is not used

Re: [squid-dev] New Defects reported by Coverity Scan for Squid after IndependentRunner

2016-09-10 Thread Alex Rousskov
On 09/10/2016 06:54 AM, Amos Jeffries wrote: > On 10/09/2016 7:26 a.m., Alex Rousskov wrote: >> On 09/09/2016 11:21 AM, Christos Tsantilas wrote: >>> On 09/09/2016 07:00 PM, Alex Rousskov wrote: >>>> On 09/09/2016 07:34 AM, Christos Tsantilas wrote: >>>&

Re: [squid-dev] Sad performance trend

2016-09-12 Thread Alex Rousskov
On 09/12/2016 07:25 AM, Kinkie wrote: > > On 27/08/2016 12:32 p.m., Alex Rousskov wrote: > >> W1 W2 W3 W4 W5 W6 > >> v3.1 32% 38% 16% 48% 16+ 9% > >> v3.3 23% 31% 14% 42% 15% 8% > >> v3.5 11% 16% 12% 36% 7%

Re: [squid-dev] Sad performance trend

2016-09-12 Thread Alex Rousskov
On 09/12/2016 09:38 AM, Amos Jeffries wrote: > On 7/09/2016 5:43 a.m., Alex Rousskov wrote: >> On 09/06/2016 08:27 AM, Amos Jeffries wrote: >>> On 27/08/2016 12:32 p.m., Alex Rousskov wrote: >>>> W1 W2 W3 W4 W5 W6 >>>> v3.1 32% 38% 16% 48%

Re: [squid-dev] Squid-4 release checklist

2016-09-12 Thread Alex Rousskov
On 09/12/2016 09:54 AM, Amos Jeffries wrote: > * > Windows Update works via interception ptoxy on 3.5.17, and no works > via transparent proxy on Squid 4.x. > > - FWIW; others have been mentioning various issues with various Squid > versions e

Re: [squid-dev] [PATCH] Incorrect logging of request size

2016-09-12 Thread Alex Rousskov
On 09/01/2016 03:44 PM, Eduard Bagdasaryan wrote: > Hello, > > This patch fixes logged request size (%http::>st) and other size-related > %codes. > > The %[http::]>st logformat code should log the actual number of > [dechunked] bytes received from the client. However, for requests with > Content-

Re: [squid-dev] [PATCH] Incorrect logging of request size

2016-09-13 Thread Alex Rousskov
On 09/12/2016 10:06 PM, Amos Jeffries wrote: > Just the new cf.data.pre docs for icap_log contradicting itself: > > " > http::>h... > HTTP response headers in RESPMOD) ... > currently does not support logging of HTTP response headers in > RESPMOD ... > " > > I think that should

Re: [squid-dev] Squid-4 release checklist

2016-09-13 Thread Alex Rousskov
On 09/13/2016 12:02 AM, Amos Jeffries wrote: > On 13/09/2016 6:22 a.m., Alex Rousskov wrote: >> On 09/12/2016 09:54 AM, Amos Jeffries wrote: >> >>> * <http://bugs.squid-cache.org/show_bug.cgi?id=4514> >>> Windows Update works via interception ptoxy on 3

Re: [squid-dev] [PATCH] Incorrect logging of request size

2016-09-13 Thread Alex Rousskov
On 09/13/2016 10:02 AM, Amos Jeffries wrote: > On 14/09/2016 2:52 a.m., Alex Rousskov wrote: >>> http::>h >>> To-be-adapted HTTP message headers sent by Squid to >>> the ICAP service (HTTP request headers in REQMOD; HTTP >>> response headers in RESPMOD).

[squid-dev] [RFC] dns_wait_for_all

2016-09-14 Thread Alex Rousskov
Hello, Currently, when connecting to an origin server, Squid sends concurrent DNS A and queries and waits for both answers before proceeding with the HTTP transaction. If the authoritative DNS server (or something on its path) breaks or significantly delays IPv6 () transactions, then

Re: [squid-dev] [RFC] dns_wait_for_all

2016-09-14 Thread Alex Rousskov
On 09/14/2016 07:26 PM, Amos Jeffries wrote: > On 15/09/2016 8:15 a.m., Alex Rousskov wrote: >> Any better ideas or objections to adding dns_wait_for_all? > In principle okay. However, I was intending to redesign the object we > store DNS RR results in to achieve this is a more u

Re: [squid-dev] [RFC] dns_wait_for_all

2016-09-15 Thread Alex Rousskov
On 09/15/2016 03:50 AM, Amos Jeffries wrote: > On 15/09/2016 5:11 p.m., Alex Rousskov wrote: >> On 09/14/2016 07:26 PM, Amos Jeffries wrote: >>> On 15/09/2016 8:15 a.m., Alex Rousskov wrote: >>>> Any better ideas or objections to adding dns_wait_for_all? >> >

Re: [squid-dev] [PATCH] Incorrect logging of request size

2016-09-15 Thread Alex Rousskov
On 09/15/2016 12:25 PM, Eduard Bagdasaryan wrote: > 2016-09-13 20:42 GMT+03:00 Alex Rousskov > : >> Committed to trunk (r14838) > > I am attaching v3.5 port of this r14838 and also r14839 and r14840, > containing several related fixes. Amos, are you willing to include th

Re: [squid-dev] FYI: trunk ContextPtr changes

2016-09-19 Thread Alex Rousskov
On 09/18/2016 08:04 PM, Amos Jeffries wrote: > I have split the work into batches to prevent it being one huge hairy > change diff that nobody can read. AFAICT, the correct way to achieve your goals is to merge a branch containing those "batches" as commits. That way, you get a single top-level tr

[squid-dev] [PATCH] Bug 3819: "fd >= 0" assertion in file_write() during reconfiguration

2016-09-19 Thread Alex Rousskov
Hello, The attached trunk patch fixes bug 3819 in our tests. Please note that the underlying problem may lead to other assertions, including "NumberOfUFSDirs" in UFSSwapDir and "fd >= 0" in file_close(). Since trunk r9181.3.1, reconfiguration is done in at least two steps: First, mainReconfi

Re: [squid-dev] [RFC] dns_wait_for_all

2016-09-20 Thread Alex Rousskov
On 09/20/2016 04:41 AM, Amos Jeffries wrote: > On 16/09/2016 3:35 a.m., Alex Rousskov wrote: >> On 09/15/2016 03:50 AM, Amos Jeffries wrote: >>> The serverDestinations not changing (yet). >> I am pretty sure we have to change that field to implement >> dns_wait_f

Re: [squid-dev] [PATCH] Bug 3819: "fd >= 0" assertion in file_write() during reconfiguration

2016-09-20 Thread Alex Rousskov
On 09/20/2016 04:10 AM, Amos Jeffries wrote: > On 20/09/2016 9:52 a.m., Alex Rousskov wrote: >> The attached trunk patch fixes bug 3819 in our tests. > +1. Thank you. Committed with one additional fix to trunk (r14815 and r14816). The bug report has a v3.5 patch providing the sa

Re: [squid-dev] [PATCH] Bug 3819: "fd >= 0" assertion in file_write() during reconfiguration

2016-09-20 Thread Alex Rousskov
On 09/20/2016 11:58 AM, Alex Rousskov wrote: > On 09/20/2016 04:10 AM, Amos Jeffries wrote: >> On 20/09/2016 9:52 a.m., Alex Rousskov wrote: >>> The attached trunk patch fixes bug 3819 in our tests. > >> +1. Thank you. > > Committed with one additiona

Re: [squid-dev] [PATCH] OSX transparent-proxy using pfctl

2016-09-26 Thread Alex Rousskov
On 09/26/2016 12:59 PM, Shively, Gregory wrote: > The patch calls /sbin/pfctl to get the > redirect state information For every intercepted connection, this patch forks Squid to start a shell (which then starts pfctl and awk) and then blocks Squid on that shell output, right? That feels very expe

Re: [squid-dev] [PATCH] OSX transparent-proxy using pfctl

2016-09-28 Thread Alex Rousskov
On 09/28/2016 12:18 PM, Shively, Gregory wrote: > The one-time warning sounds like a good idea. Is there a place that > you have to add the one-time message, or should I just add a static variable > to determine if the warning has been displayed the first time down this code > path? If nobody rec

[squid-dev] [RFC] Support concurrent SBuf::c_str() calls

2016-09-29 Thread Alex Rousskov
Hello, The current trunk code contains at least two serious bugs caused by SBuf::c_str() misuse. Both known bugs looks similar: > storeCreateEntry(storeUri.c_str(), storeUri.c_str(), ...); and > storeCreateEntry(uri.c_str(), uri.c_str(), ...); Both use cases violate safe c_str() use condi

Re: [squid-dev] [PATCH] OSX transparent-proxy using pfctl

2016-09-29 Thread Alex Rousskov
On 09/29/2016 01:12 PM, Shively, Gregory wrote: > Sometimes these mailing lists make me think like I'm talking to one > person :-). Glad we all sound coherent to you :-)! > ERROR: files left in build directory after distclean: > ./src/cf_gen.dSYM/Contents/Info.plist > ./src/cf_gen.dSYM/Contents

Re: [squid-dev] [PATCH] OSX transparent-proxy using pfctl

2016-09-29 Thread Alex Rousskov
On 09/29/2016 03:48 PM, Shively, Gregory wrote: >>> I wasn't sure if I should handle it or let it flow up, since if it was >>> in an overflow state I would doubt I could handle this packet, but >>> maybe the next connection would be successful. >> I recommend temporary adding an exception with Mus

Re: [squid-dev] [PATCH] OSX transparent-proxy using pfctl

2016-09-30 Thread Alex Rousskov
On 09/30/2016 09:04 AM, Shively, Gregory wrote: > How about I get rid of the loop all together All other factors being equal, a single statement is better than a loop with a similar statement inside. > - I should be > only getting one line from pfctl, and if the parsing fails -I should > probabl

Re: [squid-dev] [PATCH] polish Config2 using C++11 features

2016-09-30 Thread Alex Rousskov
On 09/30/2016 09:38 AM, Amos Jeffries wrote: > We now seem to have had several patches successfully use members > declared with default values and/or with the "*this = Foo();" shortcut > for a reset/clear method. The *this assignment works for pre-C++11 v3.5 as well. The default values will not wo

Re: [squid-dev] [RFC] Support concurrent SBuf::c_str() calls

2016-09-30 Thread Alex Rousskov
On 09/29/2016 09:19 PM, Amos Jeffries wrote: > On 30/09/2016 5:03 a.m., Alex Rousskov wrote: >> Should we remove the increment to make concurrent c_str() calls safe? > The reason it exists remember is to prevent other SBuf sharing that > storage MemBuf from thinking they can append

Re: [squid-dev] [PATCH] polish Config2 using C++11 features

2016-09-30 Thread Alex Rousskov
On 09/30/2016 10:58 AM, Amos Jeffries wrote: > On 1/10/2016 5:09 a.m., Alex Rousskov wrote: >> On 09/30/2016 09:38 AM, Amos Jeffries wrote: >>> So I think we can start using these to replace old C-style >>> initialization and clear() functions. >> Agreed. I wonde

Re: [squid-dev] [PATCH] OSX transparent-proxy using pfctl

2016-09-30 Thread Alex Rousskov
On 09/30/2016 10:37 AM, Amos Jeffries wrote: > Please make sure that your code debugs() dumps the full pfctl line(s) > received at level DBG_DATA, and (only) on errors the relevant bit at a > higher level like 2 or 3 - the other functions debug output can give This approach is outdated because Raw

Re: [squid-dev] [PATCH] cleanup removal of needless get()

2016-10-01 Thread Alex Rousskov
On 09/30/2016 11:05 PM, Amos Jeffries wrote: > The SSL code in particular contains a lot of calls to the get() on > various Pointer objects from the general code. > > Now that C++11 gives our Pointer better boolean operators, and > dereference oerators have been added. A bunch of these calls are n

Re: [squid-dev] [PATCH] polish Config2 using C++11 features

2016-10-01 Thread Alex Rousskov
On 09/30/2016 10:55 PM, Amos Jeffries wrote: > On 1/10/2016 6:10 a.m., Alex Rousskov wrote: >> On 09/30/2016 10:58 AM, Amos Jeffries wrote: >>> On 1/10/2016 5:09 a.m., Alex Rousskov wrote: >>>> On 09/30/2016 09:38 AM, Amos Jeffries wrote: >>>>> So I th

Re: [squid-dev] [RFC] Support concurrent SBuf::c_str() calls

2016-10-02 Thread Alex Rousskov
On 10/02/2016 03:25 PM, Kinkie wrote: > On Fri, Sep 30, 2016 at 6:03 PM, Alex Rousskov > wrote: >> On 09/29/2016 09:19 PM, Amos Jeffries wrote: >>> On 30/09/2016 5:03 a.m., Alex Rousskov wrote: >>>> Should we remove the increment to make concurrent c_str() calls

Re: [squid-dev] [PATCH] convert DNS shutdown to runner

2016-10-02 Thread Alex Rousskov
On 10/02/2016 06:35 AM, Amos Jeffries wrote: > This patch adds a Runner to manage the DNS component state on shutdown > (and the matching reconfigure port closures). The actions taken on > reconfigure and shutdown are not changed, just their timing. > +RunRegisteredHere(RegisteredRunner::start

Re: [squid-dev] [RFC] Support concurrent SBuf::c_str() calls

2016-10-03 Thread Alex Rousskov
On 10/02/2016 11:51 PM, Amos Jeffries wrote: > On 3/10/2016 1:03 p.m., Alex Rousskov wrote: >> On 10/02/2016 03:25 PM, Kinkie wrote: >>> On Fri, Sep 30, 2016 at 6:03 PM, Alex Rousskov >>>> Overall, I know of three primary ways to implement c_str(): >>>> &g

[squid-dev] Bug 4527: Missing MemObject::storeId value

2016-10-05 Thread Alex Rousskov
On 10/05/2016 11:17 AM, Amos Jeffries wrote: > ideally also a fix for the missing storeId() bug that has shown up in > 3.5 - if there is anything like a solution in the works for that. I > expect it was the Last-Modified backports. Do you expect it was v3.5 r14090 (the Last-Modified backport)? Al

[squid-dev] [PATCH] Faster SBuf::append

2016-10-06 Thread Alex Rousskov
Hello, The attached optimization patch was inspired be reviewing the following code: > Parser::parse(const SBuf &aBuf) ... > if (preservedData_.isEmpty()) > preservedData_ = aBuf; // avoid needless memory allocation > else > preservedData_.append(aBuf); Supporting this kind of optimi

Re: [squid-dev] [PATCH] Faster SBuf::append

2016-10-06 Thread Alex Rousskov
On 10/06/2016 10:57 AM, Amos Jeffries wrote: > Please add a check to the unit test testSBuf::testAppendSBuf() > to guarantee that the (*this = S) assignment code path updates the store > reference count rather than doing a bit-wise copy of the SBuf. I support that addition but do not have the tim

[squid-dev] [PATCH] Fixed v3.5 bare eCAP build

2016-10-14 Thread Alex Rousskov
Hi Amos, The attached patch is for v3.5. Trunk has the same fix in r14884. TODO: Adjust automated build tests to test bare eCAP configuration (i.e., eCAP without ICAP). HTH, Alex. Fixed v3.5 r14082 build with eCAP but without ICAP support. That is, when ./configured with --enable-ecap --d

Re: [squid-dev] bzr -> git?

2016-10-16 Thread Alex Rousskov
On 10/16/2016 06:36 PM, Kinkie wrote: > I'm currently trying to use recent advancements in Jenkins to > improve our QA via gated commits to trunk. > This raises (again) the issue of bazaar versus git. Remaining on > bazaar is getting more and more painful, as tools such as jenkins > focus on g

Re: [squid-dev] [PATCH] Support tunneling of bumped non-HTTP traffic. Other SslBump fixes.

2016-10-17 Thread Alex Rousskov
On 10/17/2016 01:57 AM, Christos Tsantilas wrote: > On 10/14/2016 02:30 PM, Marcus Kool wrote: >> Squid sends the following line to the URL rewriter: >> (unknown)://173.194.76.188:443 / - NONE > Squid generates internally request to serve the non-HTTP client request, > and this is what you are see

Re: [squid-dev] [PATCH] Support tunneling of bumped non-HTTP traffic. Other SslBump fixes.

2016-10-17 Thread Alex Rousskov
On 10/17/2016 10:56 PM, Amos Jeffries wrote: > On 18/10/2016 7:54 a.m., Christos Tsantilas wrote: >> On 10/17/2016 05:42 PM, Alex Rousskov wrote: >>> On 10/17/2016 01:57 AM, Christos Tsantilas wrote: >>>> On 10/14/2016 02:30 PM, Marcus Kool wrote: >>>>&

<    1   2   3   4   5   6   7   8   9   10   >