[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 21/61: libports: work around bugs in server termination
From: |
Samuel Thibault |
Subject: |
[hurd] 21/61: libports: work around bugs in server termination |
Date: |
Tue, 27 May 2014 08:32:10 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit c62117165e685beba2f210f87d7d88f578a9322e
Author: Justus Winter <address@hidden>
Date: Thu Apr 17 15:43:11 2014 +0200
libports: work around bugs in server termination
Some servers use ports_manage_port_operations_one_thread to process
requests and terminate when it returns. Since many of them don't detach
before shutting down, a client may receive an error if its request
arrived while the server is shutting down. Prevent those spurious errors
by forcing ports_manage_port_operations_one_thread not to return.
This is the same change as 235491231bdd1fd93507c835767503f047e10b91
introduced for ports_manage_port_operations_multithread.
* libports/manage-one-thread.c
(ports_manage_port_operations_one_thread): Force timeout to 0.
---
libports/manage-one-thread.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/libports/manage-one-thread.c b/libports/manage-one-thread.c
index 4ea740b..cbd2df7 100644
--- a/libports/manage-one-thread.c
+++ b/libports/manage-one-thread.c
@@ -85,7 +85,14 @@ ports_manage_port_operations_one_thread (struct port_bucket
*bucket,
return status;
}
-
+
+ /* XXX It is currently unsafe for most servers to terminate based on
+ inactivity because a request may arrive after a server has
+ started shutting down, causing the client to receive an error.
+ Prevent the service loop from terminating by setting TIMEOUT to
+ zero. */
+ timeout = 0;
+
do
err = mach_msg_server_timeout (internal_demuxer, 0, bucket->portset,
timeout ? MACH_RCV_TIMEOUT : 0, timeout);
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 08/61: hurd: add a new type interrupt_t for the interrupt protocol, (continued)
- [hurd] 08/61: hurd: add a new type interrupt_t for the interrupt protocol, Samuel Thibault, 2014/05/27
- [hurd] 09/61: libports: fix receiver lookup, Samuel Thibault, 2014/05/27
- [hurd] 06/61: libdiskfs: fix receiver lookup, Samuel Thibault, 2014/05/27
- [hurd] 11/61: boot: remove the ourdevice hack, Samuel Thibault, 2014/05/27
- [hurd] 01/61: libpager: fix receiver lookups, Samuel Thibault, 2014/05/27
- [hurd] 03/61: Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurd, Samuel Thibault, 2014/05/27
- [hurd] 19/61: Add missing receiver lookup fix, Samuel Thibault, 2014/05/27
- [hurd] 13/61: libpager: fix notify_port_t receiver lookups, Samuel Thibault, 2014/05/27
- [hurd] 20/61: libdiskfs: set the default sync interval to 30 seconds, Samuel Thibault, 2014/05/27
- [hurd] 12/61: console: fix notify_port_t receiver lookups, Samuel Thibault, 2014/05/27
- [hurd] 21/61: libports: work around bugs in server termination,
Samuel Thibault <=
- [hurd] 18/61: Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurd, Samuel Thibault, 2014/05/27
- [hurd] 16/61: build: Remove configure check for libcrypt., Samuel Thibault, 2014/05/27
- [hurd] 28/61: fatfs: improve diskfs_node_iterate, Samuel Thibault, 2014/05/27
- [hurd] 26/61: fatfs: simplify expression, Samuel Thibault, 2014/05/27
- [hurd] 29/61: tmpfs: improve diskfs_node_iterate, Samuel Thibault, 2014/05/27
- [hurd] 07/61: libports: fix notify_port_t receiver lookups, Samuel Thibault, 2014/05/27
- [hurd] 14/61: libpager: fix notify_port_t receiver lookups, Samuel Thibault, 2014/05/27
- [hurd] 34/61: libihash: reduce the default maximum load factor to 75%, Samuel Thibault, 2014/05/27
- [hurd] 17/61: Add TODO about fork() making rpctrace emit an error, Samuel Thibault, 2014/05/27
- [hurd] 33/61: ext2fs: cache the superblock, Samuel Thibault, 2014/05/27