Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | [SERVER] Make signal handling more POSIX | Simon Rettberg | 2019-08-28 | 1 | -5/+17 |
| | | | | | | | | | | | | | | | According to POSIX, a signal sent to a PID can be delivered to an arbitrary thread of that process that hasn't the signal blocked. This seens to never happen on Linux, but would mess things up since the code expected the main signal handler to only be executed by the main thread. This should now be fixed by examining the destination PID of the signal as well as the ID of the thread currently running the signal handler. If we notice the signal wasn't sent by our own PID and the handler is not currently run by the main thread, we re-send the signal to the main thread. Otherwise, if the signal was sent by our own PID but the handler is not run in the main thread, do nothing. This way we can use pthread_kill() to wake up threads that might be stuck in a blocking syscall when it's time to shut down. | ||||
* | [SERVER] Add timer infrastructure | Simon Rettberg | 2019-08-27 | 1 | -9/+133 |
| | | | | To be used by "close unused fd" checks, and others... | ||||
* | [SERVER] Fix warnings, simplify locking | Simon Rettberg | 2019-08-26 | 1 | -1/+1 |
| | |||||
* | [SERVER] Get rid of alt-servers thread, per-uplink rtt history | Simon Rettberg | 2019-08-22 | 1 | -3/+5 |
| | | | | | | | | | | Alt-Server checks are now run using the threadpool, so we don't need a queue and dedicated thread anymore. The rtt history is now kept per uplink, so many uplinks won't overwhelm the history, making its time window very short. Also the fail counter is now split up; a global one for when the server actually isn't reachable, a local (per-uplink) one for when the server is reachable but doesn't serve the requested image. | ||||
* | [SERVER] Better lock debugging: Always check lock order | Simon Rettberg | 2019-08-07 | 1 | -7/+0 |
| | | | | | | Lock order is predefined in locks.h. Immediately bail out if a lock with lower priority is obtained while the same thread already holds one with higher priority. | ||||
* | [SERVER] Reload server config on SIGHUP | Simon Rettberg | 2018-07-10 | 1 | -0/+1 |
| | | | | | | | Most config settings can now be changed at runtime using SIGHUP. This currently excludes the basePath, listenPort, and the client and image count limits, as well as vmdkLegacyMode. | ||||
* | [SERVER] Refactor uplink/cache handling, improve crc checking | Simon Rettberg | 2018-07-04 | 1 | -1/+1 |
| | | | | | | | | | | | | | The cacheFd is now moved to the uplink data structure and will only be handled by the uplink thread. The integrity checker now supports checking all blocks of an image. This will be triggered automatically whenever a check for a single block failed. Also, if a crc check on startup fails, the image won't be discarded anymore, but rather a full check will be initiated. Furthermore, when calling image_updateCacheMap() on an image that was previously complete, the cache map will now be re-initialized, and a new uplink connection created. | ||||
* | [SERVER] Print info about signal sender | Simon Rettberg | 2018-05-03 | 1 | -5/+46 |
| | |||||
* | [SERVER] Proper exit code and message when shutting down due to error or signal | Simon Rettberg | 2018-04-27 | 1 | -2/+6 |
| | |||||
* | [SERVER] Ignore SIGPIPE | Simon Rettberg | 2018-04-10 | 1 | -0/+1 |
| | |||||
* | [SERVER] Add --errormsg to only serve HTTP-JSON error code | Simon Rettberg | 2017-11-02 | 1 | -29/+51 |
| | | | | | This could have been an external tool, but this didn't add much code and has the benefit of honoring the config file for port and bind address. | ||||
* | [SERVER] Clean up arguments, show version on startup | Simon Rettberg | 2017-11-02 | 1 | -13/+8 |
| | |||||
* | [SERVER] Add AFL support | Simon Rettberg | 2017-10-30 | 1 | -3/+36 |
| | | | | | | | | | | | AFL is an instrumenting fuzzer. It expects to pass input to the program to be tested via command line (file name) or via stdin. This adds support for reading messages that normally would arrive via network directly from stdin. In this mode, the server is pretty useless otherwise. http://lcamtuf.coredump.cx/afl/ | ||||
* | [SERVER] Missed occurence of AF_INET(6) -> HOST_IP[46] | Simon Rettberg | 2017-10-30 | 1 | -3/+6 |
| | |||||
* | [SERVER] Fix types or add explicit casts everywhere we might have type ↵ | Simon Rettberg | 2017-10-24 | 1 | -1/+1 |
| | | | | conversion problems | ||||
* | [SERVER] Use monotonic clock for measuring time | Simon Rettberg | 2017-10-19 | 1 | -4/+8 |
| | | | | | Introduces new shared source unit timing.[ch] Closes #3214 | ||||
* | [SERVER] Refactor: Move client list to net.* and isolate | Simon Rettberg | 2017-09-07 | 1 | -125/+15 |
| | |||||
* | [SERVER] Fix formatting | Simon Rettberg | 2016-03-22 | 1 | -15/+15 |
| | |||||
* | dnbd3server build success on freebsd :) | Sebastian | 2016-02-11 | 1 | -10/+15 |
| | |||||
* | cleanup commits | Sebastian | 2016-02-11 | 1 | -18/+10 |
| | |||||
* | [SERVER] Fix a lot of (mostly harmless) data races | Simon Rettberg | 2016-01-11 | 1 | -7/+6 |
| | |||||
* | [SERVER] Cancel scanning of image dir if _shutdown is set | Simon Rettberg | 2015-12-16 | 1 | -2/+4 |
| | | | | So you can cancel image loading on startup via Ctrl-C | ||||
* | [SERVER] More fine grained locking for RPC; better error logging | Simon Rettberg | 2015-12-16 | 1 | -1/+6 |
| | |||||
* | [SERVER] Make listen port configurable | Simon Rettberg | 2015-12-14 | 1 | -1/+1 |
| | |||||
* | [SERVER] Free memory on exit to get new valgrind high score | Simon Rettberg | 2015-12-14 | 1 | -1/+4 |
| | |||||
* | [SERVER] Update includes for moved log.h | Simon Rettberg | 2015-12-02 | 1 | -1/+1 |
| | |||||
* | [FUSE] Mid-refactoring, does not compile | Simon Rettberg | 2015-11-24 | 1 | -1/+1 |
| | |||||
* | [SERVER] Reload images in another thread when triggered by signal | Simon Rettberg | 2015-05-12 | 1 | -6/+12 |
| | | | | | | | The server used to reload all images on the main thread, which is also responsible for accepting connections. While reloading the list, no new connections were accepted, which lead to clients marking the server as bad during their RTT measurements, then switching away from it. | ||||
* | [Server] Added statistics of images and uptime to json. | Stephan Schwaer | 2015-05-05 | 1 | -1/+0 |
| | |||||
* | Removed dnbd3_printClients, added clients to statistics json in rpc. | Stephan Schwaer | 2015-05-04 | 1 | -15/+0 |
| | |||||
* | [SERVER] Added counters for received and sent bytes. | Stephan Schwaer | 2015-04-27 | 1 | -1/+3 |
| | |||||
* | [SERVER] printf -> logadd, make USR2 trigger a log cycle, remove old fake ↵ | Simon Rettberg | 2015-02-23 | 1 | -34/+20 |
| | | | | delay feature | ||||
* | [SERVER] Overhauled logging | Simon Rettberg | 2015-02-22 | 1 | -21/+18 |
| | | | | | | - Added message type parameter - Log to file and stdout, no more logging in memory - Added options to server.conf to filter which messages show up where | ||||
* | [SERVER] Set client connection timeout in client thread | Simon Rettberg | 2015-01-07 | 1 | -2/+0 |
| | |||||
* | [SERVER] Big code cleanup, refactoring, minor bugfixing | Simon Rettberg | 2015-01-06 | 1 | -52/+51 |
| | |||||
* | [SERVER] Use a thread pool for client connections | Simon Rettberg | 2015-01-05 | 1 | -7/+7 |
| | |||||
* | [SERVER] Use stdbool.h for booleans; minor refactoring of variable and ↵ | Simon Rettberg | 2014-12-31 | 1 | -15/+15 |
| | | | | function names | ||||
* | [SERVER] Minor tweaks and improvements | Simon Rettberg | 2014-12-31 | 1 | -2/+2 |
| | |||||
* | [SERVER] Configurable client timeout, adaptive replication speed (to be ↵ | Simon Rettberg | 2014-12-22 | 1 | -2/+2 |
| | | | | tested against varying bw/latency), retry sendfile call if ret <= len | ||||
* | Improve uplink handling, add code to debug thread creation/destruction, ↵ | Simon Rettberg | 2014-06-16 | 1 | -5/+6 |
| | | | | change stupid convention of freeDiskSpace returning 0 on error, which is ambiguous to the disk simply being full... | ||||
* | [SERVER] Thread and uplink handling | Simon Rettberg | 2014-02-13 | 1 | -4/+3 |
| | |||||
* | [*] Add automatic version string generationv2.0 | Simon Rettberg | 2014-01-13 | 1 | -0/+1 |
| | |||||
* | [SERVER] Don't wait forever on shutdown | Simon Rettberg | 2014-01-13 | 1 | -1/+2 |
| | |||||
* | [SERVER] SIGHUP triggers reload aswell. Some changes to server shutdown ↵ | Simon Rettberg | 2014-01-02 | 1 | -21/+18 |
| | | | | function. | ||||
* | [SERVER] Fix possible deadlock through printf usage in signal handler | Simon Rettberg | 2013-12-10 | 1 | -15/+21 |
| | |||||
* | [SERVER] Once again rework locking in uplink and freeing of resources to ↵ | Simon Rettberg | 2013-11-15 | 1 | -1/+1 |
| | | | | fight messups when the uplink is shut down | ||||
* | [SERVER] Create client threads detached instead of detaching them after ↵ | Simon Rettberg | 2013-11-14 | 1 | -5/+4 |
| | | | | creation to prevent a race condition where a thread dies faster than we can call pthread_detach, which leads to a use-after-free | ||||
* | [SERVER] Shut down altservers finder properly | Simon Rettberg | 2013-11-12 | 1 | -0/+2 |
| | |||||
* | Joey style commit | Simon Rettberg | 2013-11-07 | 1 | -1/+1 |
| | |||||
* | [SERVER] Add --bind parameter to specify bind interface (currently IPv4 only) | Simon Rettberg | 2013-11-07 | 1 | -2/+8 |
| |