Commit Graph

156 Commits (e46ba2a7068c19ae827df0a4f4eaeade472ee967)

Author SHA1 Message Date
Tonya Souther 6bee4b07a9 Fixing whitespace my last commit screwed up. No code change. 2015-05-21 08:09:28 -05:00
Tonya Souther 266ac37b6f Fix cURL library API usage bug: the library expects a long, not an int. 2015-05-20 23:48:01 -05:00
Nicky 006190f2a1 Merge with tools update. 2015-05-05 13:09:27 +02:00
Oz Linden 6f3cf79a3a merge changes for 3.7.24-release 2015-01-13 13:46:45 -05:00
Nat Goodspeed e13259ae7a Remove a couple tests for unsigned long < 0.
clang correctly notes that such tests add nothing to the runtime behavior of a
program. Unfortunately, clang notes that in the form of a compile error.
2014-11-14 14:24:58 -05:00
Nat Goodspeed 6be2f0ba2b Automated merge with ssh://bitbucket.org/lindenlab/viewer-release 2014-11-14 08:49:08 -05:00
Monty Brandenberg de9689e39b BUG-7698, BUG-7688, BUG-7694 (others) CDN connection issues.
Under pipelining, requests were given a 5x timeout factor due to the
way that the timeout clock works in libcurl.  Under CDN load,
connections were not being torn down quickly and it was only
this timer that led to disconnect and retry.  So, we want to
break a connection that isn't making progress but that isn't
immediately possible.  We'll compromise with a 60S timeout that
(we hope) will be neither too long for stalled connections nor
too short for large asset transfer requests.
2014-11-06 16:39:40 -05:00
Nicky bb200a23b0 Make GCC happy about some functions never used. 2015-02-03 17:35:32 +01:00
Ansariel 3fa8d2c301 Merge LL V3.7.24 2015-01-15 15:46:06 +01:00
Tank_Master 4a6ff8c50d Merge LL 3.6.19 2015-01-14 20:20:35 -08:00
Ansariel f4bfb1aadf Merge LL V3.7.9 (AIS3 + SSA) 2014-10-22 02:02:08 +02:00
callum_linden 217556cbaa Update to build on Xcode 6.0: remove unused code 2014-10-17 16:11:04 -07:00
callum_linden 6a15d2d95d Update to build on Xcode 6.0: clang detecting unsigned int (size_t) comparison with <0 [-Wtautological-compare] 2014-10-17 16:08:25 -07:00
callum_linden bc49197ea8 Update to build on Xcode 6.0: interesting - clang doesn't like it if you specify extra components of a format string that aren't populated in snprintf 2014-10-17 16:07:11 -07:00
Monty Brandenberg ec4fd2f0e2 MAINT-4564 HTTP Pipelining is not happening in Drano HTTP Phase 4
Incorporate the new libcurl 7.38.0 build with curl bug 1420
workaround.  Add developer-centric testing code to evaluate
the workaround or a future fix for 1420.
2014-10-10 16:43:04 -04:00
Monty Brandenberg 329608d246 Tuning and documentation. Use a fast poll frequency (0.05S)
on the HTTP requests for inventory.  We'll benchmark with that
and see how it goes.  Document some of the history of the
background fetcher for future devs.  Suggest some future
projects to make things faster.  Pointers on using LLSD with
the llcorehttp library in the readme.  And restructured
the LLSD onCompleted() processing phases using do{}while(false)
which produced a code flow that is fairly attractive.
2014-09-22 18:49:45 -04:00
Monty Brandenberg 79ab7c2070 Introduce libcurl handle cache. Create a private cache
of used handles and a fast handle factory that's thread-
correct.
2014-09-19 15:34:09 -04:00
Monty Brandenberg 3057d246f0 Documentation. Describe curl bug 1420 testing and how to
reproduce data corruption via timeouts.
2014-09-18 18:42:30 -04:00
Monty Brandenberg 0c20beda68 Pipelining work. Extend transfer timeout by the pipeline depth
as transfers can appear delayed with deep pipelining and more
requests in the pool.  Added bad HTTP status error (typically
getting a 0 back as HTTP status from libcurl) to the list of
retryable errors.  There's a response stream problem with libcurl
and pipelining that induces this problem.  Retrying helps but
may not be entirely safe.  Watch bug 1420 on the libcurl sourceforge
bug tracker.  Extend options of test/example program to include
un-ranged requests.  Document the excessive data transfer induced
when ranged requests are disabled.  This is an abnormal mode for
very rare users so we'll just eat that for now.
2014-09-04 16:57:44 -04:00
Monty Brandenberg e79a88c8cc Better support for dynamic option changes in llcorehttp. Libcurl has
some problems disabling pipelining on a multi handle with outstanding
requests so build a more conservative system that allows requests
to drain before setting curl multi options.  Would rather not have
this but it is significantly safer.  "HttpPipelining" debug setting
is now fully dynamic.  Connection limits can also be made dynamic
in the near future.  Upped the default connection count back to 8 for
now but will revisit this in the tuning phase.  It might be time to
combine mesh and textures into a single asset class.  For normal
server operations that would be a clear path, but for server under
load, the current scheme may be better.  Minor cleanup in logging
to elminate some redundant strings.  Might add some more tracing to the
stall logic 'just in case'.
2014-08-12 18:21:26 -04:00
Monty Brandenberg 9fb96b416f Add pipelining and tracing command line options to the test program. 2014-07-03 19:44:02 -04:00
Monty Brandenberg 5cca78e718 First HTTP pipelining viewer. Enable pipelining for
GetTexture and GetMesh2 at a pipeline depth of 5.  Create
global debug option, HttpPipelining, to enable and disable
HTTP pipelining (defaults to true).  Tweak texture and
mesh low- and high-water request levels based on pipelining
status and depth.  Fixup texture console which was damaged
in a recent release.  Split logging of the no-request
HTTP error case into two cases:  one for missing URL in
HTTP request, one for HTTP request not created.  A refactor
in llcorehttp is coming:  I will be moving all libcurl-
using code into libcurl-specific modules.
2014-06-23 14:23:33 -04:00
Brad Payne (Vir Linden) 7b9708a2e3 sunshine-external merge WIP 2014-05-13 10:02:26 -04:00
Cinder 46fde22a7a *sigh* more size fixes 2014-06-22 21:10:06 -06:00
Tank_Master 6babf8abd2 Merge LL 3.7.7 2014-06-09 11:29:57 -07:00
Brad Payne (Vir Linden) 895d52a399 merge viewer-release to sunshine-external 2014-02-25 13:25:40 -05:00
Richard Linden 80b4a4a1f5 merge with release 2014-02-24 18:45:59 -08:00
Tank_Master 8ba6b4803b Merge HTTP 2014-02-12 18:58:40 -08:00
Richard Linden 516061275b fixed unit tests being generated as Windows GUI projects instead of console projects 2014-01-09 12:18:34 -08:00
Brad Payne (Vir Linden) 1f8b37e9ad merge 2013-10-16 11:52:43 -04:00
Richard Linden 80dfbbaacd merge from viewer-release 2013-10-08 11:59:24 -07:00
Monty Brandenberg 6d405e2d01 Convert one more unit test over to improved waiting scheme to avoid build failures. 2013-10-04 18:24:59 -04:00
Monty Brandenberg 6f5790da38 Merge. Pull in viewer-release after 3.6.7 release. 2013-10-04 15:36:52 -04:00
Monty Brandenberg 56e2f11417 Up the transfer timeout of small meshes to 120S. This matches
the change made for MAINT-2347.  Large transfers are still
10 minutes.  Add/update to-do list and add some more info to
the FAQ in the Readme.
2013-09-27 17:22:31 -04:00
Monty Brandenberg 200bea5b41 SH-3690 SH-4505 Cleanup pass through code.
Start using DNS cache in legacy LLCurl code.  Go to 15 seconds
particularly as we're using threaded resolver at this point.
Documentation cleanup.  Add libcurl status checking and logging
for curl_easy_setopt() operations that fail.  Shouldn't happen
and we'll just continue anyway but there's info in the logs to
track these down now.  Cleaned up logic around FASTTIMER enable
defines used to evaluate pipeline stalls in main thread.
Removed long-standing thread race around caps strings and
URL construction.  Not a significant risk but refactoring the
code to get rid of them removed one huge eyesore.  It can be
made even slicker if desired (see notes).
2013-09-24 14:49:26 -04:00
Monty Brandenberg 195d319f65 SH-4492 Create a useful README for llcorehttp
Last bit for this release.  Describe stream adapters and how
to select a policy class.  Slight changes to setup code to
make reality reflect documentation.
2013-09-18 18:44:41 -04:00
Monty Brandenberg dab920c26b SH-4492 Create a useful README for llcorehttp.
First edit complete.  Use the library in 15 minutes.  Describe the
code.  Refinements to the initial try.  Describe that code.  Still
to do:  more refinements, how to choose a policy class, FAQ.
2013-09-17 21:55:44 +00:00
Monty Brandenberg 622eae6555 SH-4490 More 'humane' error code presentation from llcorehttp callers
Added toTerseString() conversion on HttpStatus to generate a string
that's more descriptive than the hex value of the HttpStatus value
but still forms a short, searchable token (e.g. "Http_503" or
"Core_7").  Using this throughout the viewer now, no live cases
of toHex(), I believe.
2013-09-11 19:21:31 -04:00
Monty Brandenberg 2e8e40cf79 SH-4489 New debug/dev settings for control over new mesh behavior
Added 'MeshUseGetMesh1' and 'MeshUseHttpRetryAfter' debug settings
to control mesh transport behavior.  First forces the use of the
legacy mesh fetch style with high concurrency and connection churn.
The second, on by default, honors Retry-After values if they are
reasonable.  If off or unreasonable, internal delay times are used.
2013-09-11 18:00:55 -04:00
Monty Brandenberg 146a5c3f6c Add 'internal'/'external' token to DEBUG retry message so that dev/QA
can know exactly where a retry value was sourced.
2013-08-19 12:01:26 -04:00
Monty Brandenberg e764a2a565 SH-4407 Tuning to get new code working as well.
Do some runtime code avoidance and skip unnecessary libcurl and
syscall invocations.
2013-08-16 18:07:49 -04:00
Monty Brandenberg f3927c6ca2 SH-4371 Reduce 22mS inter-connection latency.
This really extended into the client-side request throttling.
Moved this from llmeshrepository (which doesn't really want
to do connection management) into llcorehttp.  It's now a
class option with configurable rate.  This still isn't the
right thing to do as it creates coupling between viewer
and services.  When we get to pipelining, this notion becomes
invalid.
2013-07-30 15:21:31 -04:00
Monty Brandenberg 46dd3df733 Reduce HTTP request retry log spam. Thought I'd done this in an
earlier maintenance branch but the code never showed up.  I'll do
it again.  Spam is still available by bumping 'CoreHttp' tag up
to DEBUGS level logging.  Needed for QA.  Can also get this data
from tracing.
2013-07-29 16:26:02 -04:00
Monty Brandenberg eb2869bd7f SH-4371 Reduce 22mS inter-conenction latency on HTTP operations.
Simple change dropped this value by 7-10mS or so.  Any time we
complete an operation on a transport pass, arrange to skip the
run-loop sleep so that we fill a possible empty slot as quickly
as possible.  With pipelining, this kind of thing should become
unnecessary but for now, we'll do this to increase throughput.
2013-07-29 16:09:22 -04:00
Monty Brandenberg c9e64823c0 SH-4368 Adjust upload timeout parameters for slow networks.
Generally sorted the mesh timeout parameters for maximum
transport time (staying with default 30 for connect).  60S
for normal meshes, 600S for large.  Also documented default
option values in httpoptions.h.  Useful to have these.  In
the future, the timeouts might go into standard llsd options
where they can be tracked a bit more.
2013-07-29 12:42:27 -04:00
Monty Brandenberg eff651cffc SH-4312 Configuration data between viewer and llcorehttp is clumsy.
Much improved.  Unified the global and class options into a single
option list.  Implemented static and dynamic setting paths as much
as possible.  Dynamic path does require packet/RPC but otherwise
there's near unification.  Dynamic modes can't get values back yet
due to the response/notifier scheme but this doesn't bother me.
Flatten global and class options into simpler struct-like entities.
Setter/getter available on these when needed (external APIs) but code
can otherwise fiddle directly when it knows what to do.  Much duplicated
options/state removed from HttpPolicy.  Comments cleaned up.  Threads
better described and consistently mentioned in API docs.  Integration
test extended for 503 responses with Reply-After headers.
2013-07-12 15:00:24 -04:00
Monty Brandenberg fb734d621e Found the memory corruptor. String trimmer didn't have a valid
termination test.  Sheesh.  Also get some more numbers out of the
example/load test program which drives traffic.  This should
give some useful insights into how the current http throttle
works (or doesn't) with varying client demands.
2013-07-08 20:31:09 +00:00
Monty Brandenberg d8e32c58ce Update the example program so it handles meshes as well. Fix the
request feed logic to use high/low-water level logic as is done
in viewer code.
2013-07-03 15:17:26 -04:00
Monty Brandenberg 2cdddab384 SH-4310/BUG-2810/MAINT-2794 Better status checking and error logging in Mesh code.
Pay correct attention to status codes coming back from services.  Generate
better and consistent error messages when problems arise.  There's more to
do in error handling, need a way to cleanly fail all request types, only
have that for LOD at this point.  Do better keeping the HTTP pipeline between
the low and high water marks.  This was made challenging because the outer
most code couldn't really see what's going on internally (whose actions are
delayed in a worker thread).  More to do here, the debug-like requests don't
honor limits, that will come later.  Made retry counts available from llcorehttp
which can be used by the throttle-anticipating logic to advance the count.
It helps but it reinforces the coupling between viewer and server which I
do not like.
2013-06-27 13:55:05 -04:00
Monty Brandenberg d6cbcd591a SH-4257 Preparation for a new cap grant: GetMesh2
Mesh repo is using three policy classes now:  one for
large objects, one for GetMesh2 regions, one for
GetMesh regions.  It's also detecting the presence
of the cap and using the correct class.  Class
initialization cleaned up significantly in llappcorehttp
using data-directed code.  Pulled in the changes to
HttpHeader done for sunshine-internal then did a
refactoring pass on the header callback which now
uses a unified approach to clean up and deliver
header information to all interested parties.  Added
support for using Retry-After header information on
503 retries.
2013-06-20 19:18:39 -04:00