Commit Graph

40432 Commits (ebe1ffcbf7e7cfd5b5bb49cb771c61d0afd8b10e)

Author SHA1 Message Date
Anchor ebe1ffcbf7 [DRTVWR-476] - temp fix to a test 2020-03-25 18:44:04 -04:00
Nat Goodspeed 4174bb3640 DRTVWR-476: Disable test_httprequest.hpp on Mac Release builds.
For reasons not yet diagnosed, specifically in Mac Release builds, the tests
in test_httprequest.hpp consistently crash with a backtrace suggesting that
the worker thread is calling LLCore::HttpLibcurl::completeRequest() after the
foreground thread calls HttpRequest::destroyService().

Weirdly, even executing a tut::skip() call in every test<n>() function up to
the point of the crash does not eliminate the crash.
2020-03-25 18:44:04 -04:00
Nat Goodspeed 2902f23a41 DRTVWR-476: Remove special llcorehttp test memory manager.
NickyD discovered that the substitute default allocator used for llcorehttp
tests was returning badly-aligned storage, which caused access violations on
alignment-sensitive data such as std::atomic. Thanks Nicky!!

Moreover, the llcorehttp test assertions regarding memory usage, well-
intentioned though they are, have been causing us trouble for years. Many have
already been disabled.

The problem is that use of test_allocator.h affected *everything* defined with
that header file's declarations visible. That inevitably included specific
functions in other subsystems. Those functions then (unintentionally) consumed
the special allocator, throwing off the memory tracking and making certain
memory-related assertions consistently fail.

This is a particular, observable bad effect of One Definition Rule violations.
Within a given program, C++ allows multiple definitions for the same entity,
but requires that all such definitions be the same. Partial visibility of the
global operator new() and operator delete() overrides meant that some
definitions of certain entities used the default global allocator, some used
llcorehttp's. There may have been other, more subtle bad effects of these ODR
violations.

If one wanted to reimplement verification of the memory consumption of
llcorehttp classes:

* Each llcorehttp class (for which memory tracking was desired) should declare
  class-specific operator new() and operator delete() methods. Naturally,
  these would all consume a central llcorehttp-specific allocator, but that
  allocator should *not* be named global operator new().
* Presumably that would require runtime indirection to allow using the default
  allocator in production while substituting the special allocator for tests.
* Recording and verifying the memory consumption in each test should be
  performed in the test-object constructor and destructor, rather than being
  sprinkled throughout the test<n>() methods.
* With that mechanism in place, the test object should provide methods to
  adjust (or entirely disable) memory verification for a particular test.
* The test object should also provide a "yes, we're still consuming llcorehttp
  memory" method to be used for spot checks in the middle of tests -- instead
  of sprinkling in explicit comparisons as before.
* In fact, the llcorehttp test object in each test_*.hpp file should be
  derived from a central llcorehttp test-object base class providing those
  methods.
2020-03-25 18:44:04 -04:00
Nat Goodspeed 3a7d401364 DRTVWR-476: On Mac, copy libhunspell-1.3.0.dylib for test programs. 2020-03-25 18:44:04 -04:00
Nat Goodspeed c56601bc22 DRTVWR-476: Add LLCOREHTTP_TESTS CMake var, OFF by default on Mac.
Hopefully this is temporary until we solve the problem of crashy llcorehttp
test executable on Mac.
2020-03-25 18:44:04 -04:00
Nicky 96e7e92e2e General cleanup. Delete commented out code. 2020-03-25 18:44:04 -04:00
Nicky a27281591d Replace boost::fibers::unbuffered_channel with boost::fibers::buffered_channel.
Using boost::fibers::unbuffered_channel can block the mainthread when calling mPendingCoprocs.push (LLCoprocedurePool::enqueueCoprocedure)
From the documentation:
- If a fiber attempts to send a value through an unbuffered channel and no fiber is waiting to receive the value, the channel will block the sending fiber.

This can happen if LLCoprocedurePool::coprocedureInvokerCoro is running a coroutine and this coroutine calls yield, resuming the viewers main loop. If inside
the main loop someone calls LLCoprocedurePool::enqueueCoprocedure now push will block, as there's no one waiting for a result right now.
The wait would be in LLCoprocedurePool::coprocedureInvokerCoro at the start of the while loop, but we have not reached that yet again as LLCoprocedurePool::coprocedureInvokerCoro
did yield before reaching pop_wait_for.
The result is a deadlock.

boost::fibers::buffered_channel will not block as long as there's space in the channel. A size of 4096 (DEFAULT_QUEUE_SIZE) should be plenty enough for this.
2020-03-25 18:44:04 -04:00
Anchor 32f1dfa531 [DRTVWR-476] - fix compiler errors 32 bit windows build 2020-03-25 18:44:04 -04:00
Nat Goodspeed a9191a83d9 SL-1968: Extend lllogin_test login-failed cases for new sync timing.
On login failure, LLLogin now tries to sync up with SLVersionChecker. It waits
for up to 10 seconds before shrugging and giving up. Since that coroutine can
now block for that long, make the llogin_test failure cases wait at least that
long too.
2020-03-25 18:44:04 -04:00
Nicky cb4ca2e41e Ignore build-vc150-* directories as those are the VS2017 build dirs (n.b. due to the rather strange version numbering of VS this really should be build-vc141-*; as VS2017 is vc141 internally). 2020-03-25 18:44:04 -04:00
Nicky dc8d2779ab Do not use string/chrono literals, sadly that won't work with GCC (4.9) 2020-03-25 18:40:45 -04:00
Nicky 69de6ece31 Use reinterpret_cast to pass pthread_self (pthread_t) into CRYPTO_THREADID_set_pointer (void*). 2020-03-25 18:40:45 -04:00
Anchor 690909716b [DRTVWR-476] - fix compiler error 2020-03-25 18:40:45 -04:00
Anchor 16453005bb [DRTVWR-476] - update cef, fix merge 2020-03-25 18:40:45 -04:00
Anchor f0b07eafa2 [DRTVWR-476] - temporary skip failing llinstancetracker tests to get TC build working 2020-03-25 18:40:45 -04:00
Anchor ff810f5cfb [DRTVWR-476] - suppress dbghelp.h compiler warnings 2020-03-25 18:40:44 -04:00
Anchor ca66cea70d [DRTVWR-476] - revert 2020-03-25 18:40:44 -04:00
Anchor cc230eef30 [DRTVWR-476] - disable llcorehttp test on mac 2020-03-25 18:40:44 -04:00
Anchor 201ff48cb1 [DRTVWR-476] - temporarily disable llcorehttptest on mac 2020-03-25 18:40:44 -04:00
Anchor 244e0dc001 [DRTVWR-476] - conflicts with a mac macro 2020-03-25 18:40:44 -04:00
Anchor e36eaa685c [DRTVWR-476] - update googlemock,boost,colladom 2020-03-25 18:40:44 -04:00
Anchor 00437298d0 [DRTVWR-476] - update breakpad 2020-03-25 18:39:21 -04:00
Brad Kittenbrink 828223bf1b Implemented some code review suggested cleanups. 2020-03-25 18:39:21 -04:00
Brad Kittenbrink 6ffbed484a Fix stall during login by yielding when needed from the LLXXMLRPCListener's Poller. 2020-03-25 18:39:21 -04:00
Brad Kittenbrink 6419c6e279 Removed unnecessary disconnection of listener in postAndSuspendSetup 2020-03-25 18:39:21 -04:00
Brad Kittenbrink c26c2bc3f0 Improved aggregate init syntax for DefaultPoolSizes map. 2020-03-25 18:39:21 -04:00
Brad Kittenbrink 8013a81adc Switched LL_ERRS to LL_WARNS for case where promise is fulfilled multiple times by multiple events. 2020-03-25 18:39:21 -04:00
Brad Kittenbrink b09aa6a2bf Improved shutdown behavior of LLCoprocedureManager 2020-03-25 18:39:21 -04:00
Brad Kittenbrink 997bdfc886 First draft of boost::fibers::unbuffered_channel based implementation of LLCoprocedureManager 2020-03-25 18:39:21 -04:00
Brad Kittenbrink a6f31e9167 Fixed variadic macro usage in LL_ERRS_IF and LL_WARNS_IF and improved LLError::shouldLogToStderr() behavior under xcode. 2020-03-25 18:39:21 -04:00
Brad Kittenbrink 6992ad457c Lint fixes on new test file. 2020-03-25 18:39:21 -04:00
Brad Kittenbrink 66abe4ccab Attempt to close LLEventCoro's LLBoundListener connection when promise has been fulfilled. 2020-03-25 18:39:21 -04:00
Brad Kittenbrink a26905b0c5 Added try/catch closer to source of error so LL_ERRS fatal can be more useful for debugging; 2020-03-25 18:39:21 -04:00
Brad Kittenbrink 96639a8d09 Fix failure when building packages-info.txt when autobuild can't be found in xcode's PATH 2020-03-25 18:39:21 -04:00
Brad Kittenbrink 09b29a7fde Began work for adding a test covering LLCoprocedureManager 2020-03-25 18:39:21 -04:00
Anchor b09770946a [DRTVWR-476] - disable dbghelp.h warnings 2020-03-25 18:39:20 -04:00
Anchor 476721e48a Backed out changeset: de49423bb5ae 2020-03-25 18:39:20 -04:00
Anchor 8dff5a257f Backed out changeset: 02ef251a64b5 2020-03-25 18:39:20 -04:00
Anchor 3327447f95 [DRTVWR-476] - skip a math test 2020-03-25 18:39:20 -04:00
Anchor 6e69cb4852 [DRTVWR-476] - update libpng, libndo, xmlrpc 2020-03-25 18:39:20 -04:00
Anchor b98c392864 [DRTVWR-476] - update kdu 2020-03-25 18:39:20 -04:00
Anchor b5bb0794f0 [DRTVWR-476] - fix linking 2020-03-25 18:39:20 -04:00
Anchor 761d9aa3bf [DRTVWR-476] - test adding at beginiing of list 2020-03-25 18:39:20 -04:00
Anchor e039f5e29e [DRTVWR-476] - legacy_stdio_definitions shld be the last library linked 2020-03-25 18:39:20 -04:00
Anchor 0ed3724c95 [DRTVWR-476] - add legacy_stdio_definitions 2020-03-25 18:39:20 -04:00
Anchor 554e12ef15 [DRTVWR-476] - update apr and kdu 2020-03-25 18:39:20 -04:00
Anchor 636989c139 [DRTVWR-476] - target windows 10 2020-03-25 18:39:20 -04:00
Anchor 1ea42d88f7 [DRTVWR-476] - compile error fix 2020-03-25 18:39:20 -04:00
Anchor 243b111565 [DRTVWR-476] - compile error fix 2020-03-25 18:39:20 -04:00
Anchor fc09af763c [DRTVWR-476] - update openjpeg 2020-03-25 18:39:20 -04:00