Date: Fri, 23 Apr 2010 16:40:36 +0200 From: Jilles Tjoelker <jilles@stack.nl> To: freebsd-hackers@freebsd.org, gabor@freebsd.org Subject: Re: libc NLS, NFS mounted /usr/local, DHCP, no default route causes hangs Message-ID: <20100423144035.GB41934@stack.nl> In-Reply-To: <20100423141735.GA41934@stack.nl> References: <20100423141735.GA41934@stack.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 23, 2010 at 04:17:36PM +0200, Jilles Tjoelker wrote: > The changes to use NLS for strerror sometimes cause one of my virtual > machines to deadlock. This virtual machine runs 9-CURRENT, acquires its > IP address via DHCP (virtualbox host-only networking), has no default > route and has /usr/local and /usr/home NFS mounted. > When the DHCP lease expires such as by resetting the date after a VM > save&restore, one of the route(8) commands executed by > dhclient-script(8) fails and calls strerror(3). Following the default > NLSPATH, catopen(3) looks in /usr/share/nls first; because the catalog > is not there it then tries in /usr/local/share/nls which deadlocks > because the network is not available. > I currently use the attached patch which returns failure on any attempt > to open a catalog for language "C", but I think this is not correct. > Am I using a configuration that is not supposed to work (NFS mounted > /usr/local with DHCP in particular), or should this be fixed in some > other way? The patch: Index: lib/libc/nls/msgcat.c =================================================================== --- lib/libc/nls/msgcat.c (revision 206760) +++ lib/libc/nls/msgcat.c (working copy) @@ -138,6 +138,9 @@ lang = "C"; } + if (strcmp(lang, "C") == 0) + NLRETERR(ENOENT); + /* Try to get it from the cache first */ RLOCK(NLERR); SLIST_FOREACH(np, &cache, list) { -- Jilles Tjoelker
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100423144035.GB41934>