aboutsummaryrefslogtreecommitdiff
path: root/src/util/scheduler.c
Commit message (Collapse)AuthorAge
* better task orderingChristian Grothoff2020-02-15
|
* fix task prioritization with recent hackChristian Grothoff2020-02-04
|
* speed up running of tasks via GNUNTE_SCHEDULER_add_now() by a factor of at ↵Christian Grothoff2020-02-04
| | | | least 5
* tighten formatting rulesChristian Grothoff2019-10-31
|
* global reindent, now with uncrustify hook enabledChristian Grothoff2019-10-05
|
* remove CYGWIN codeblocks, drop vendored Windows openvpn, drop win32 specific ↵ng02019-09-10
| | | | | | | | | files. configures and builds okay. testsuite wasn't checked, will be checked. diff including the plibc removal is now around 14370 lines of code less.
* uncrustify as demanded.ng02019-09-08
|
* Implement asynchronous scope identifiers.Florian Dold2019-05-10
| | | | | | | | | | | Without entering an asynchronous scope, logs are the same before. When entering an asynchronous scope (either thread-based of scheduler/task-based), all log lines within an asynchronous scope contain its ID. Currently this is only used in GNU Taler, for debugging requests across multiple services. This allows us to get all log lines pertaining to a particular request for a user or another service.
* misc work on TNGChristian Grothoff2019-04-15
|
* Florian Weimer writes:Christian Grothoff2019-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Christian Grothoff: > I'm seeing some _very_ odd behavior with processes hanging on exit (?) > with GNU libc 2.28-6 on Debian (amd64 threadripper). This seems to > happen at random (for random tests, with very low frequency!) in the > GNUnet (Git master) testsuite when a child process is about to exit. It looks like you call exit from a signal handler, see src/util/scheduler.c: /** * Signal handler called for signals that should cause us to shutdown. */ static void sighandler_shutdown () { static char c; int old_errno = errno; /* backup errno */ if (getpid () != my_pid) exit (1); /* we have fork'ed since the signal handler was created, * ignore the signal, see https://gnunet.org/vfork discussion */ GNUNET_DISK_file_write (GNUNET_DISK_pipe_handle (shutdown_pipe_handle, GNUNET_DISK_PIPE_END_WRITE), &c, sizeof (c)); errno = old_errno; } In general, this results in undefined behavior because exit (unlike _exit) is not an async-signal-safe function. I suspect you either call the exit function while a fork is in progress, or since you register this signal handler multiple times for different signals: sh->shc_int = GNUNET_SIGNAL_handler_install (SIGINT, &sighandler_shutdown); sh->shc_term = GNUNET_SIGNAL_handler_install (SIGTERM, &sighandler_shutdown); one call to exit might interrupt another call to exit if both signals are delivered to the process. The deadlock you see was introduced in commit 27761a1042daf01987e7d79636d0c41511c6df3c ("Refactor atfork handlers"), first released in glibc 2.28. The fork deadlock will be gone (in the single-threaded case) if Debian updates to the current release/2.28/master branch because we backported commit 60f80624257ef84eacfd9b400bda1b5a5e8e7816 ("nptl: Avoid fork handler lock for async-signal-safe fork [BZ #24161]") there. But this will not help you. Even without the deadlock, I expect you still experience some random corruption during exit, but it's going to be difficult to spot. Thanks, Florian
* src: for every AGPL3.0 file, add SPDX identifier.ng02019-01-14
|
* GNUNET_SCHEDULER_do_work: always check if shutdown is necessary and update ↵lurchi2018-07-29
| | | | | | wakeup time
* Remove restrictive and unnecessary assertlurchi2018-07-24
| | | | Using the SCHEDULER_add* functions is now allowed before the first call to GNUNET_SCHEDULER_do_work.
* paragraph for gnunet devs that don't know how to use the webpsyc://loupsycedyglgamf.onion/~lynX2018-06-07
|
* glitch in the license text detected by hyazinthe, thank you!psyc://loupsycedyglgamf.onion/~lynX2018-06-07
|
* first batch of license fixes (boring)psyc://loupsycedyglgamf.onion/~lynX2018-06-05
|
* make some functions static, ensure shutdown tasks could be run repeatedly if ↵Christian Grothoff2018-03-31
| | | | 1st shutdown did not finish the process
* disable debug instrumentation againChristian Grothoff2018-03-08
|
* better error reporting from schedulerChristian Grothoff2018-03-08
|
* fix loggingChristian Grothoff2018-03-03
|
* fix newline, reduce verbosityChristian Grothoff2018-03-03
|
* improve documentationlurchi2018-02-01
|
* scheduler API change to allow use with js event looplurchi2018-02-01
| | | | | | | | | - GNUNET_SCHEDUELR_run_with_driver has been replaced with GNUNET_SCHEDULER_driver_init and GNUNET_SCHEDUELR_driver_done - GNUNET_SCHEDULER_run_from_driver has been renamed to GNUNET_SCHEDULER_do_work (as it's no longer being called from a driver callback) - documentation has been updated
* really make GNUNET_SCHEDULER_run_from_driver more graceful (must have been late)lurchi2018-01-27
|
* make GNUNET_SCHEDULER_run_from_driver more gracefullurchi2018-01-24
| | | | | | | GNUNET_SCHEDULER_run_from_driver may now be called without any tasks being ready if the timeout has not been reached yet. A warning is printed because it may be a programming error in the driver (see comments)
* catch early return of select before call to GNUNET_SCHEDULER_run_from_driverlurchi2018-01-23
|
* Revert "add assertion for debugging"lurchi2018-01-23
| | | | This reverts commit d45c008e677fa2fbff03e22745390d4775b031d2.
* add assertion for debugginglurchi2018-01-23
|
* remove unnecessary checklurchi2018-01-22
| | | | The reason field of tasks in the pending_timeout queue is never modified while the tasks are in the queue
* use absolute times in driverlurchi2018-01-22
| | | | this shouldn't change anything but makes debugging easier.
* indentation fixesChristian Grothoff2018-01-21
|
* check if no tasks are left after the driver looplurchi2018-01-21
| | | | | | - add assertions to make sure all tasks have been run or cancelled - don't cancel all pending tasks during shutdown, only cancel the two internal tasks scheduled in GNUNET_SCHEDULER_run_with_driver
* fix loop responsible for finding tasks with expired timeoutlurchi2018-01-18
|
* always check priority given by userslurchi2018-01-17
|
* return now if we found a task that is ready (optimization)lurchi2018-01-16
|
* only check fdsets when select selected something (optimization)lurchi2018-01-16
|
* Revert "call GNUNET_abort_ directly for debugging purposes"lurchi2018-01-16
| | | | This reverts commit 5c4ae18d2e58c8bf3ba60a4f69251e304fbb9915.
* call GNUNET_abort_ directly for debugging purposeslurchi2018-01-16
|
* remove duplicate timeout checklurchi2018-01-16
| | | | | There's no need of checking for timeouts in GNUNET_SCHEDULER_task_ready, as the check is done in GNUNET_SCHEDULER_run_from_driver.
* remove unused variableslurchi2018-01-15
|
* gracefully accept empty FD set that claim to contain FDslurchi2018-01-10
|
* properly detect calling add_select without descriptors; simplify extract_handleslurchi2018-01-10
|
* fix scheduler when add_select is called with 0 ready fdsSchanzenbach, Martin2018-01-10
|
* fix dereferencing uninitialized rs/ws; assert non-NULL before dereferencing ↵lurchi2018-01-07
| | | | network/file handles
* Revert "fix dereferencing uninitialized pointer"lurchi2018-01-07
| | | | This reverts commit 201a67be13ae31b4eb7fb8ad38b349fe287c0baf.
* fix dereferencing uninitialized pointerlurchi2018-01-06
|
* simplify driver_add_multiplelurchi2018-01-04
|
* fix misc compiler warningsChristian Grothoff2018-01-04
|
* fix more warningsChristian Grothoff2018-01-04
|
* Fix memory leak in select_loopDavid Barksdale2018-01-01
|