summaryrefslogtreecommitdiff
path: root/indra/llmessage
AgeCommit message (Collapse)Author
2020-03-25[DRTVWR-476] - temp fix to test. comment it out. access violation in releaseAnchor
2020-03-25[DRTVWR-476] - temp fix to a testAnchor
2020-03-25General cleanup. Delete commented out code.Nicky
2020-03-25Replace boost::fibers::unbuffered_channel with boost::fibers::buffered_channel.Nicky
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[DRTVWR-476] - fix compiler errors 32 bit windows buildAnchor
2020-03-25Do not use string/chrono literals, sadly that won't work with GCC (4.9)Nicky
2020-03-25[DRTVWR-476] - update cef, fix mergeAnchor
2020-03-25[DRTVWR-476] - conflicts with a mac macroAnchor
2020-03-25Implemented some code review suggested cleanups.Brad Kittenbrink
2020-03-25Improved aggregate init syntax for DefaultPoolSizes map.Brad Kittenbrink
2020-03-25Improved shutdown behavior of LLCoprocedureManagerBrad Kittenbrink
2020-03-25First draft of boost::fibers::unbuffered_channel based implementation of ↵Brad Kittenbrink
LLCoprocedureManager
2020-03-25Lint fixes on new test file.Brad Kittenbrink
2020-03-25Attempt to close LLEventCoro's LLBoundListener connection when promise has ↵Brad Kittenbrink
been fulfilled.
2020-03-25Began work for adding a test covering LLCoprocedureManagerBrad Kittenbrink
2020-03-25SL-793: Use Boost.Fiber instead of the "dcoroutine" library.Nat Goodspeed
Longtime fans will remember that the "dcoroutine" library is a Google Summer of Code project by Giovanni P. Deretta. He originally called it "Boost.Coroutine," and we originally added it to our 3p-boost autobuild package as such. But when the official Boost.Coroutine library came along (with a very different API), and we still needed the API of the GSoC project, we renamed the unofficial one "dcoroutine" to allow coexistence. The "dcoroutine" library had an internal low-level API more or less analogous to Boost.Context. We later introduced an implementation of that internal API based on Boost.Context, a step towards eliminating the GSoC code in favor of official, supported Boost code. However, recent versions of Boost.Context no longer support the API on which we built the shim for "dcoroutine." We started down the path of reimplementing that shim using the current Boost.Context API -- then realized that it's time to bite the bullet and replace the "dcoroutine" API with the Boost.Fiber API, which we've been itching to do for literally years now. Naturally, most of the heavy lifting is in llcoros.{h,cpp} and lleventcoro.{h,cpp} -- which is good: the LLCoros layer abstracts away most of the differences between "dcoroutine" and Boost.Fiber. The one feature Boost.Fiber does not provide is the ability to forcibly terminate some other fiber. Accordingly, disable LLCoros::kill() and LLCoprocedureManager::shutdown(). The only known shutdown() call was in LLCoprocedurePool's destructor. We also took the opportunity to remove postAndSuspend2() and its associated machinery: FutureListener2, LLErrorEvent, errorException(), errorLog(), LLCoroEventPumps. All that dual-LLEventPump stuff was introduced at a time when the Responder pattern was king, and we assumed we'd want to listen on one LLEventPump with the success handler and on another with the error handler. We have never actually used that in practice. Remove associated tests, of course. There is one other semantic difference that necessitates patching a number of tests: with "dcoroutine," fulfilling a future IMMEDIATELY resumes the waiting coroutine. With Boost.Fiber, fulfilling a future merely marks the fiber as ready to resume next time the scheduler gets around to it. To observe the test side effects, we've inserted a number of llcoro::suspend() calls -- also in the main loop. For a long time we retained a single unit test exercising the raw "dcoroutine" API. Remove that. Eliminate llcoro_get_id.{h,cpp}, which provided llcoro::get_id(), which was a hack to emulate fiber-local variables. Since Boost.Fiber has an actual API for that, remove the hack. In fact, use (new alias) LLCoros::local_ptr for LLSingleton's dependency tracking in place of llcoro::get_id(). In CMake land, replace BOOST_COROUTINE_LIBRARY with BOOST_FIBER_LIBRARY. We don't actually use the Boost.Coroutine for anything (though there exist plausible use cases).
2020-03-25DRTVWR-494: Use std::thread::id for LLThread::currentID().Nat Goodspeed
LLThread::currentID() used to return a U32, a distinct unsigned value incremented by explicitly constructing LLThread or by calling LLThread:: registerThreadID() early in a thread launched by other means. The latter imposed an unobvious requirement on new code based on std::thread. Using std::thread::id instead delegates to the compiler/library the problem of distinguishing threads launched by any means. Change lots of explicit U32 declarations. Introduce LLThread::id_t typedef to avoid having to run around fixing uses again if we later revisit this decision. LLMutex, which stores an LLThread::id_t, wants a distinguished value meaning NO_THREAD, and had an enum with that name. But as std::thread::id promises that the default-constructed value is distinct from every valid value, NO_THREAD becomes unnecessary and goes away. Because LLMutex now stores LLThread::id_t instead of U32, make llmutex.h #include "llthread.h" instead of the other way around. This makes LLMutex an incomplete type within llthread.h, so move LLThread::lockData() and unlockData() to the .cpp file. Similarly, remove llrefcount.h's #include "llmutex.h" to break circularity; instead forward-declare LLMutex. It turns out that a number of source files assumed that #include "llthread.h" would get the definition for LLMutex. Sprinkle #include "llmutex.h" as needed. In the SAFE_SSL code in llcorehttp/httpcommon.cpp, there's an ssl_thread_id() callback that returns an unsigned long to the SSL library. When LLThread:: currentID() was U32, we could simply return that. But std::thread::id is very deliberately opaque, and can't be reinterpret_cast to unsigned long. Fortunately it can be hashed because std::hash is specialized with that type.
2019-11-12Merged in lindenlab/viewer-releaseAndreyL ProductEngine
2019-09-10Merged in lindenlab/viewer-releaseandreykproductengine
2019-09-04DRTVWR-493 Do not recreate proxy only to destroy itandreykproductengine
2019-08-12Automated merge with file:///Users/nat/linden/viewer-catchNat Goodspeed
2019-08-12DRTVWR-493: Make catch_llerrs() a member of WrapLLErrs.Nat Goodspeed
2019-08-10DRTVWR-493: Introduce test catch_what(), catch_llerrs() functions.Nat Goodspeed
Use them in place of awkward try/catch test boilerplate.
2019-07-24SL-4150 Rename htonmemcpyandreykproductengine
2019-07-03DRTVWR-493 LLAvatarNameCache to singletoneandreykproductengine
2019-04-17Merged in lindenlab/viewer-release (EAM)AndreyL ProductEngine
2019-03-01Merged in lindenlab/viewer-releaseAndreyL ProductEngine
2019-01-15SL-10291 Replace apr_atomic with standard C++11 functionalityandreykproductengine
2019-01-17SL-10291 cleanup-mutexandreykproductengine
2019-01-14SL-10291 Replace apr_mutex with standard C++11 functionalityandreykproductengine
2019-03-01Merged in lindenlab/viewer-release and incremented viewer version to 6.2.0AndreyL ProductEngine
2018-12-14SL-10153: Review and rationalize fetching paths from environment.Nat Goodspeed
Use LLStringUtil::getenv() or getoptenv() whenever we fetch a string that will be used as a pathname. Use LLFile::tmpdir() instead of getenv("TEMP"). As an added extra-special bonus, finally clean up $TMP/llcontrol-test-zzzzzz directories that have been accumulating every time we run a local build!
2018-11-14Merged in lindenlab/viewer-releaseAndreyL ProductEngine
2018-09-27mergeBrad Payne (Vir Linden)
2018-09-27Merged in lindenlab/viewer-releaseAndreyL ProductEngine
2018-08-30Restore the ability for sockets to specify the interface to listen onOz Linden
2018-08-28Backed out changeset: 871c2923afceAndreyL ProductEngine
2018-08-17MAINT-5651 Froce-quit crashandreykproductengine
2019-04-17SL-2797 SOCKS5 not working reliablyandreykproductengine
2018-08-08Add optional hostname param to LLSocket::create() for testing.Nat Goodspeed
This allows the io.cpp test to listen only on the localhost loopback, avoiding the macOS 10.13.6 "allow listening for incoming connections" popup while running build-time tests that might halt an unattended TeamCity build.
2018-06-22Merged lindenlab/viewer-release into defaultAndrey Lihatskiy
2018-06-21mergeBrad Payne (Vir Linden)
2018-05-18MAINT-7626 EOF fixAndreyL ProductEngine
2018-05-08MAINT-7626 Update logging and comments, sync remaining transfer changesandreykproductengine
2018-05-08MAINT-7626 fix merge conflict2andreykproductengine
2018-05-07MAINT-7626 fix merge conflictandreykproductengine
2018-05-04MAINT-7626 Incorporate transfer changes into viewerandreykproductengine
2018-04-19MAINT-7626 Incorporate transfer changes into viewerandreykproductengine
2018-04-14MAINT-8442 Increase the total number of Estate Managers from 10 to 15AndreyL ProductEngine
2018-05-18mergeBrad Payne (Vir Linden)