aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/iomgr
Commit message (Collapse)AuthorAge
* Fix server shutdownGravatar Craig Tiller2015-04-07
| | | | | | | | | A previous fix to make close() occur later can cause socket reuse by servers to fail as previous sockets are left asynchronously open. This change: - adds a callback to TCP server shutdown to signal that the server is completely shutdown - wait for that callback before destroying listeners in the server (and before destroying the server) - handles fallout
* Remove the racy check added in commit i74c14e5ac752edc7e1dc0aaf31abfd1153df1d0a.Gravatar Vijay Pai2015-04-04
| | | | | This is potentially unsafe since checking the deadline involves more than 1 word read.
* Add in a racy check for min deadline in run_some_expired_alarms beforeGravatar Vijay Pai2015-04-02
| | | | | attempting the trylock. This shaves the number of g_mu and g_checker_mu uses dramatically in perf test workload and all tests still pass.
* Various Windows fixes.Gravatar Nicolas Noble2015-03-24
| | | | | | -) Introduce a wait-loop with a 100ms delay on iomgr shutdown, so that background threads have the chance to place last minute callbacks without having to stall for the whole 10 seconds deadline. -) io completion ports will get notifications on socket shutdowns, so we need to delay their deletions for after we get a notification for them. -) we need to keep some sense of how many orphan sockets are in, so we can properly collect them - let's not shutdown the iocp loop until after all orphans have been collected.
* Various Windows fixes.Gravatar Nicolas Noble2015-03-19
| | | | | | | | | | | | | | -) using dupenv_s instead of getenv_s and calling strdup ourselves. -) few impossible-to-obtain if checks. -) various signed/unsigned casting. -) using time_t instead of time32_t -) checking output of FormatMessage for failures. -) don't redefine _WIN32_WINNT without undefining it first. -) fixed msvc's interlocked casting. -) renamed AddPort to AddListeningPort. -) added protobuf's third_party includes to search path. -) added a missing definition for inet_ntop in mingw32. -) removed useless declarations.
* Add a no_barrier_load atomic operation.Gravatar David Klempner2015-03-11
| | | | | Use this to relax the acq_loads in some fd_posix assertions. The primary goal here is to avoid masking potential iomgr races from tsan.
* strcmp: change all !str[n]cmp to str[n]cmp == 0Gravatar Ronnie Sahlberg2015-03-07
| | | | | | | | Change all !str[n]cmp to be str[n]cmp == 0 consistently across the codebase. Issue #231 Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
* Reintroduce sleep on backup threadGravatar Craig Tiller2015-03-06
|
* Manually resolve well-known service namesGravatar Raul Silvera2015-03-04
|
* Merge pull request #916 from dklempner/not_original_vtableGravatar Craig Tiller2015-03-03
|\ | | | | Remove some debugging logs from the unary poll promote path
| * Remove some debugging logs from the unary poll promote pathGravatar David Klempner2015-03-02
| | | | | | | | I put these in while debugging correctness, and forgot to remove them.
* | Tracer registration.Gravatar Craig Tiller2015-03-01
|/ | | | | | | | First: ugh. Second: allow tracer global variables to be registered and then parsed out of a configuration environment variable. Expose TSI trace config variable directly to ease this a little.
* Guard headers tool.Gravatar Nicolas "Pixel" Noble2015-03-01
|
* Merge pull request #602 from dklempner/unary_promotion_with_concurrent_pollGravatar Craig Tiller2015-02-24
|\ | | | | Ensure there is no concurrent poller for unary->multipoll
| * Move close() to when the fd refcount goes to zeroGravatar David Klempner2015-02-24
| | | | | | | | | | | | Instead, we do a shutdown() at the point we are currently closing, to kick off socket teardown while ensuring an fd ref is sufficient to make concurrent syscalls like epoll_ctl safe.
* | Spam cleanupGravatar Craig Tiller2015-02-24
| |
| * Add a shutdown API to pollsetGravatar David Klempner2015-02-24
| | | | | | | | | | | | | | | | This allows us to safely asynchronously add FDs in the possibly-promoting unary add case. Also fix the unary add async path to properly handle more of the extra cases it needs to handle.
| * Merge branch 'master' into unary_promotion_with_concurrent_pollGravatar David Klempner2015-02-23
| |\ | |/ |/|
* | Factorizing out function split_host_port.Gravatar Nicolas "Pixel" Noble2015-02-20
| |
* | Merge branch 'master' of github.com:google/grpc into win32Gravatar Nicolas "Pixel" Noble2015-02-21
|\ \
* | | Fixing Windows port.Gravatar Nicolas "Pixel" Noble2015-02-20
| | |
| * | Check POLLHUP, POLLERR as requiredGravatar Craig Tiller2015-02-20
| | |
| * | sockaddr_un needs the null terminator included in the address lengthGravatar Craig Tiller2015-02-20
|/ /
* | Add a facility to control tracing without recompilingGravatar Craig Tiller2015-02-20
| | | | | | | | This will help greatly when it comes to diagnosing customer issues.
* | Merge pull request #592 from ctiller/chex2Gravatar Nicolas Noble2015-02-20
|\ \ | | | | | | Fix TSAN reported error in fd_posix.c
| | * Ensure there is no concurrent poller for unary->multipollGravatar David Klempner2015-02-18
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | The race here is: Initially unary poller has one FD, FD_1 Thread 1 adds FD_2, promoting to multipoll, entailing epoll_ctl on FD_1 and FD_2. Concurrently, Thread 2 returns from unary poll and executes one of FD_1's callbacks, which ultimately leads to a close(FD_1) which races with the epoll_ctl by thread 1. The solution is to ensure that we don't concurrently poll and promote, which requires a bit of extra care.
* | Fix a race where an fd can be deleted during pollingGravatar Craig Tiller2015-02-18
| |
| * clang-formatGravatar Craig Tiller2015-02-18
| |
| * Fix a TSAN reported errorGravatar Craig Tiller2015-02-18
| | | | | | | | | | | | | | | | | | | | We now pass down pointers to closures instead of (callback, arg) pair elements separately. This allows us to store one word atomically, fixing a race condition. All call sites have been updated to the new API. No new allocations are incurred. grpc_fd_state is deleted to avoid any temptation to ever add anything there again.
* | Correct the comment documenting how to disable having multiple threadsGravatar David Klempner2015-02-18
|/ | | | in epoll wait.
* Add missing new-lines at end of fileGravatar Craig Tiller2015-02-18
|
* Update copyright to 2015Gravatar Craig Tiller2015-02-18
|
* Merge github.com:grpc/grpc into c++apiGravatar Craig Tiller2015-02-17
|\
| * UDS FixGravatar Craig Tiller2015-02-17
| | | | | | | | Remove existing UDS listeners IFF they are a socket before trying to create a new socket.
| * Add missing refGravatar Craig Tiller2015-02-17
| | | | | | | | | | This prevents a bug whereby not all fds were destroyed at application exit.
| * Add checking on fd_posix refcountsGravatar Craig Tiller2015-02-17
| |
* | Merge github.com:grpc/grpc into c++apiGravatar Craig Tiller2015-02-17
|\|
| * Fix aliasingGravatar Craig Tiller2015-02-17
| |
* | Merge github.com:grpc/grpc into c++apiGravatar Craig Tiller2015-02-17
|\| | | | | | | | | Conflicts: Makefile
* | Merge github.com:grpc/grpc into c++apiGravatar Craig Tiller2015-02-16
|\ \
| | * Merge github.com:grpc/grpc into udsGravatar Craig Tiller2015-02-16
| | |\ | | |/ | |/|
| | * clang-formatGravatar Craig Tiller2015-02-13
| | |
| | * Unix domain socket supportGravatar Craig Tiller2015-02-13
| | |
| * | Cleaning up our posix definition / usage.Gravatar Nicolas "Pixel" Noble2015-02-14
| |/ | | | | | | | | | | | | -) Let's not use _POSIX_SOURCE. It usually implies too much C99. _BSD_SOURCE would be the right thing to do here. -) _BSD_SOURCE is getting deprecated by glibc, so we also have to define _DEFAULT_SOURCE under Linux. -) accept4 and eventfd arn't as old as we may think; let's detect for it. -) stdint.h interferes with all these definitions if included too early; let's move it down.
* / Multi-completion-queue-serverGravatar Craig Tiller2015-02-12
|/ | | | | | Allow binding a different completion queue to each registered method. This will allow multiplexing for the C++ server between sync & async methods more easily.
* Destroy the wakeup fd in the right functionGravatar David Klempner2015-02-11
|
* Clean up the epoll wakeup fd too.Gravatar David Klempner2015-02-11
|
* Address pull request thread commentsGravatar David Klempner2015-02-11
| | | | | | | 1. Close the epoll_fd at destroy 2. Finish the comment about signal/broadcast on the cv 3. Rename GPR_POSIX_MULTIPOLL_WITH_EPOLL to GPR_LINUX_MULTIPOLL_WITH_EPOLL
* Remove now unnecessary check that incoming epoll fds are not orphanedGravatar David Klempner2015-02-11
|
* Merge branch 'master' into epollGravatar David Klempner2015-02-11
|\