all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw@netris.org>
Cc: 20816@debbugs.gnu.org
Subject: bug#20816: Excessive negative cache time for DNS lookups
Date: Mon, 15 Jun 2015 22:02:50 +0200	[thread overview]
Message-ID: <874mm891ud.fsf@inria.fr> (raw)
In-Reply-To: <87si9titcm.fsf@netris.org>

[-- Attachment #1: Type: text/plain, Size: 3735 bytes --]

Mark H Weaver <mhw@netris.org> skribis:

> On my GuixSD system, DNS lookup failures (due to lack of network) are
> cached for at least 4 minutes, and possibly much longer (I've not had
> the patience to wait until it expires).
>
> Even after restarting nscd, the negative cache entry persists for about
> another 20 seconds.

To reproduce it, I ran ‘guix system vm’ on this:

--8<---------------cut here---------------start------------->8---
(use-modules (gnu) (guix))
(use-package-modules base)

(operating-system
  (host-name "komputilo")
  (timezone "Europe/Berlin")
  (locale "en_US.UTF-8")
  (bootloader (grub-configuration (device "/dev/sdX")))
  (file-systems (cons (file-system
                        (device "root")
                        (title 'label)
                        (mount-point "/")
                        (type "ext4"))
                      %base-file-systems))
  (packages (cons* (canonical-package glibc) %base-packages))
  (services (map (lambda (mservice)
                   (mlet %store-monad ((service mservice))
                     (if (memq 'nscd (service-provision service))
                         (nscd-service (nscd-configuration
                                        (debug-level 10)))
                         mservice)))
                 %base-services)))
--8<---------------cut here---------------end--------------->8---

Then I had one console running “tail -f /var/log/nscd.log”, and another
one where I would run “ping www.gnu.org.”

Initially looking up www.gnu.org fails (because the network is down),
and nscd.log indeed shows:

--8<---------------cut here---------------start------------->8---
Mon Jun 15 21:04:20 2015 - 276: handle_request: request received (Version = 2) from PID 296
Mon Jun 15 21:04:20 2015 - 276: 	GETAI (www.gnu.org)
Mon Jun 15 21:04:20 2015 - 276: Haven't found "www.gnu.org" in hosts cache!
Mon Jun 15 21:04:20 2015 - 276: add new entry "www.gnu.org" of type GETAI for hosts to cache (first)
--8<---------------cut here---------------end--------------->8---

For subsequent requests, it shows fewer details, meaning that the cached
failure is used:

--8<---------------cut here---------------start------------->8---
Mon Jun 15 21:04:25 2015 - 276: handle_request: request received (Version = 2) from PID 297
Mon Jun 15 21:04:25 2015 - 276: 	GETFDHST
Mon Jun 15 21:04:25 2015 - 276: provide access to FD 6, for hosts
--8<---------------cut here---------------end--------------->8---

Twenty seconds after the original failure, we see:

--8<---------------cut here---------------start------------->8---
Mon Jun 15 21:04:40 2015 - 276: pruning hosts cache; time 1434395080
Mon Jun 15 21:04:40 2015 - 276: considering GETAI entry "www.gnu.org", timeout 1434395080
--8<---------------cut here---------------end--------------->8---

So cache expiry seems to be working as expected.

Now, if we enable networking with “dhclient -v eth0” and see what
happens, we get again a series of lookup failures, even after the
www.gnu.org entry has been removed from cache; apparently new failures
get cached.  Eventually, after a bunch of cache prunes (so a few times
20 seconds), lookup succeeds.

The situation is different if you use ‘getent hosts’ instead of ‘ping’–
note that the latter uses getaddrinfo whereas the former uses
gethostbyname{,v6}, which is cached differently.  Here we get a
successful lookup within 20 seconds after networking has been put up.

So my guess is that the GETAI cache is racy or something.

I’ve run nscd with Helgrind, which reports a few things (see attached
file), but I suspect most of it are false positives.

Ludo’.


[-- Attachment #2: Helgrind log --]
[-- Type: text/plain, Size: 26276 bytes --]

==336== Helgrind, a thread error detector
==336== Copyright (C) 2007-2013, and GNU GPL'd, by OpenWorks LLP et al.
==336== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==336== Command: nscd -f /gnu/store/8mhn4b3r0pg18lycwnnn9ms5jwr9wvfm-nscd.conf
==336== Parent PID: 291
==336== 
==337== Warning: invalid file descriptor 1024 in syscall close()
==337== Warning: invalid file descriptor 1025 in syscall close()
==337== Warning: invalid file descriptor 1026 in syscall close()
==337== Warning: invalid file descriptor 1027 in syscall close()
==337==    Use --log-fd=<number> to select an alternative log fd.
==337== Warning: invalid file descriptor 1028 in syscall close()
==337== Warning: invalid file descriptor 1029 in syscall close()
==336== 
==336== For counts of detected and suppressed errors, rerun with: -v
==336== Use --history-level=approx or =none to gain increased speed, at
==336== the cost of reduced accuracy of conflicting-access information
==336== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==337== ---Thread-Announcement------------------------------------------
==337== 
==337== Thread #1 is the program's root thread
==337== 
==337== ----------------------------------------------------------------
==337== 
==337== Thread #1: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread
==337==    at 0x4C2A963: pthread_cond_signal_WRK (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4C2E18C: pthread_cond_signal@* (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x10E89A: fd_ready (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10F81E: main_loop_epoll (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x111E57: start_threads (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10D79D: main (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337== 
==337== ---Thread-Announcement------------------------------------------
==337== 
==337== Thread #7 was created
==337==    at 0x5352E9E: clone (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libc-2.21.so)
==337==    by 0x4E3E1D7: create_thread (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337==    by 0x4E3FBB4: pthread_create@@GLIBC_2.2.5 (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337==    by 0x4C2C55B: pthread_create_WRK (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4C2D49B: pthread_create@* (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x111DD7: start_threads (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10D79D: main (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337== 
==337== ----------------------------------------------------------------
==337== 
==337== Thread #7: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread
==337==    at 0x4C2A963: pthread_cond_signal_WRK (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4C2E18C: pthread_cond_signal@* (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x118A9C: cache_add (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x11AD6D: addhstaiX (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x11BB43: addhstai (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10FF76: nscd_run_worker (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x4C2C6E1: mythread_wrapper (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4E3F463: start_thread (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337== 
==337== ---Thread-Announcement------------------------------------------
==337== 
==337== Thread #4 was created
==337==    at 0x5352E9E: clone (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libc-2.21.so)
==337==    by 0x4E3E1D7: create_thread (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337==    by 0x4E3FBB4: pthread_create@@GLIBC_2.2.5 (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337==    by 0x4C2C55B: pthread_create_WRK (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4C2D49B: pthread_create@* (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x111DD7: start_threads (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10D79D: main (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337== 
==337== ---Thread-Announcement------------------------------------------
==337== 
==337== Thread #5 was created
==337==    at 0x5352E9E: clone (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libc-2.21.so)
==337==    by 0x4E3E1D7: create_thread (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337==    by 0x4E3FBB4: pthread_create@@GLIBC_2.2.5 (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337==    by 0x4C2C55B: pthread_create_WRK (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4C2D49B: pthread_create@* (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x111DD7: start_threads (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10D79D: main (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337== 
==337== ----------------------------------------------------------------
==337== 
==337== Possible data race during read of size 1 at 0x329990 by thread #4
==337== Locks held: none
==337==    at 0x115CDA: getservbyname_r (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116198: lookup (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116C36: addservbyX (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116D33: addservbyname (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10FF40: nscd_run_worker (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x4C2C6E1: mythread_wrapper (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4E3F463: start_thread (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337== 
==337== This conflicts with a previous write of size 1 by thread #5
==337== Locks held: none
==337==    at 0x115E6E: getservbyname_r (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116198: lookup (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116C36: addservbyX (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116D33: addservbyname (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10FF40: nscd_run_worker (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x4C2C6E1: mythread_wrapper (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4E3F463: start_thread (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337==  Address 0x329990 is 0 bytes inside data symbol "startp_initialized.11280"
==337== 
==337== ----------------------------------------------------------------
==337== 
==337== Possible data race during read of size 8 at 0x329980 by thread #4
==337== Locks held: none
==337==    at 0x115CF0: getservbyname_r (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116198: lookup (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116C36: addservbyX (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116D33: addservbyname (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10FF40: nscd_run_worker (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x4C2C6E1: mythread_wrapper (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4E3F463: start_thread (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337== 
==337== This conflicts with a previous write of size 8 by thread #5
==337== Locks held: none
==337==    at 0x115E4E: getservbyname_r (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116198: lookup (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116C36: addservbyX (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116D33: addservbyname (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10FF40: nscd_run_worker (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x4C2C6E1: mythread_wrapper (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4E3F463: start_thread (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337==  Address 0x329980 is 0 bytes inside data symbol "start_fct.11282"
==337== 
==337== ----------------------------------------------------------------
==337== 
==337== Possible data race during read of size 8 at 0x329988 by thread #4
==337== Locks held: none
==337==    at 0x115CF7: getservbyname_r (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116198: lookup (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116C36: addservbyX (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116D33: addservbyname (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10FF40: nscd_run_worker (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x4C2C6E1: mythread_wrapper (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4E3F463: start_thread (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337== 
==337== This conflicts with a previous write of size 8 by thread #5
==337== Locks held: none
==337==    at 0x115E67: getservbyname_r (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116198: lookup (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116C36: addservbyX (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116D33: addservbyname (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10FF40: nscd_run_worker (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x4C2C6E1: mythread_wrapper (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4E3F463: start_thread (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337==  Address 0x329988 is 0 bytes inside data symbol "startp.11281"
==337== 
==337== ----------------------------------------------------------------
==337== 
==337==  Lock at 0x3295F0 was first observed
==337==    at 0x4C2D7E9: pthread_mutex_init (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x110927: nscd_init (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10D798: main (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==  Address 0x3295f0 is 1392 bytes inside data symbol "dbs"
==337== 
==337== Possible data race during write of size 4 at 0x8449030 by thread #4
==337== Locks held: 1, at address 0x3295F0
==337==    at 0x11A64A: mempool_alloc (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x11692F: cache_addserv (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116C70: addservbyX (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116D33: addservbyname (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10FF40: nscd_run_worker (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x4C2C6E1: mythread_wrapper (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4E3F463: start_thread (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337== 
==337== This conflicts with a previous read of size 4 by thread #5
==337== Locks held: none
==337==    at 0x4E46C1D: ??? (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337==    by 0x1169BE: cache_addserv (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116C70: addservbyX (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116D33: addservbyname (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10FF40: nscd_run_worker (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x4C2C6E1: mythread_wrapper (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4E3F463: start_thread (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337==  Address 0x8449030 is not stack'd, malloc'd or on a free list
==337== 
==337== ----------------------------------------------------------------
==337== 
==337== Thread #5: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread
==337==    at 0x4C2A963: pthread_cond_signal_WRK (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4C2E18C: pthread_cond_signal@* (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x118A9C: cache_add (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116868: cache_addserv (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116C70: addservbyX (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116D33: addservbyname (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10FF40: nscd_run_worker (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x4C2C6E1: mythread_wrapper (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4E3F463: start_thread (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337== 
==337== ----------------------------------------------------------------
==337== 
==337==  Lock at 0x3295F0 was first observed
==337==    at 0x4C2D7E9: pthread_mutex_init (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x110927: nscd_init (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10D798: main (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==  Address 0x3295f0 is 1392 bytes inside data symbol "dbs"
==337== 
==337== Possible data race during write of size 4 at 0x8449030 by thread #4
==337== Locks held: 1, at address 0x3295F0
==337==    at 0x11A64A: mempool_alloc (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x118967: cache_add (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x11661C: cache_addserv (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116C70: addservbyX (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116D33: addservbyname (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10FF40: nscd_run_worker (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x4C2C6E1: mythread_wrapper (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4E3F463: start_thread (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337== 
==337== This conflicts with a previous read of size 4 by thread #5
==337== Locks held: none
==337==    at 0x118999: cache_add (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116868: cache_addserv (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116C70: addservbyX (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116D33: addservbyname (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10FF40: nscd_run_worker (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x4C2C6E1: mythread_wrapper (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4E3F463: start_thread (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337==  Address 0x8449030 is not stack'd, malloc'd or on a free list
==337== 
==337== ----------------------------------------------------------------
==337== 
==337== Possible data race during write of size 8 at 0x8449050 by thread #4
==337== Locks held: none
==337==    at 0x118A0B: cache_add (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x11661C: cache_addserv (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116C70: addservbyX (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116D33: addservbyname (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10FF40: nscd_run_worker (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x4C2C6E1: mythread_wrapper (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4E3F463: start_thread (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337== 
==337== This conflicts with a previous read of size 8 by thread #5
==337== Locks held: none
==337==    at 0x4E46C1D: ??? (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337==    by 0x118AC1: cache_add (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116868: cache_addserv (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116C70: addservbyX (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116D33: addservbyname (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10FF40: nscd_run_worker (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x4C2C6E1: mythread_wrapper (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4E3F463: start_thread (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337==  Address 0x8449050 is not stack'd, malloc'd or on a free list
==337== 
==337== ----------------------------------------------------------------
==337== 
==337== Possible data race during read of size 4 at 0x8449038 by thread #4
==337== Locks held: none
==337==    at 0x118A17: cache_add (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x11661C: cache_addserv (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116C70: addservbyX (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116D33: addservbyname (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10FF40: nscd_run_worker (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x4C2C6E1: mythread_wrapper (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4E3F463: start_thread (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337== 
==337== This conflicts with a previous write of size 4 by thread #5
==337== Locks held: none
==337==    at 0x118A23: cache_add (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116868: cache_addserv (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116C70: addservbyX (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116D33: addservbyname (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10FF40: nscd_run_worker (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x4C2C6E1: mythread_wrapper (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4E3F463: start_thread (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337==  Address 0x8449038 is not stack'd, malloc'd or on a free list
==337== 
==337== ----------------------------------------------------------------
==337== 
==337== Possible data race during write of size 4 at 0x8449038 by thread #4
==337== Locks held: none
==337==    at 0x118A23: cache_add (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x11661C: cache_addserv (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116C70: addservbyX (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116D33: addservbyname (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10FF40: nscd_run_worker (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x4C2C6E1: mythread_wrapper (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4E3F463: start_thread (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337== 
==337== This conflicts with a previous write of size 4 by thread #5
==337== Locks held: none
==337==    at 0x118A23: cache_add (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116868: cache_addserv (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116C70: addservbyX (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x116D33: addservbyname (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10FF40: nscd_run_worker (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x4C2C6E1: mythread_wrapper (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4E3F463: start_thread (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337==  Address 0x8449038 is not stack'd, malloc'd or on a free list
==337== 
==337== ----------------------------------------------------------------
==337== 
==337== Thread #4: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread
==337==    at 0x4C2A963: pthread_cond_signal_WRK (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4C2E18C: pthread_cond_signal@* (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x118A9C: cache_add (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x11AD6D: addhstaiX (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x11BB43: addhstai (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x10FF76: nscd_run_worker (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/sbin/nscd)
==337==    by 0x4C2C6E1: mythread_wrapper (in /gnu/store/apnmjac0aa0q6y78ynvasmlkljdfjcxv-valgrind-3.10.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==337==    by 0x4E3F463: start_thread (in /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libpthread-2.21.so)
==337== 
==337== 
==337== For counts of detected and suppressed errors, rerun with: -v
==337== Use --history-level=approx or =none to gain increased speed, at
==337== the cost of reduced accuracy of conflicting-access information
==337== ERROR SUMMARY: 124 errors from 12 contexts (suppressed: 14313 from 349)

      parent reply	other threads:[~2015-06-15 20:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-15  2:43 bug#20816: Excessive negative cache time for DNS lookups Mark H Weaver
2015-06-15 13:15 ` Thompson, David
2015-06-15 20:02 ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874mm891ud.fsf@inria.fr \
    --to=ludo@gnu.org \
    --cc=20816@debbugs.gnu.org \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.