From owner-freebsd-current@FreeBSD.ORG Wed Feb 11 18:06:14 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4D3F592 for ; Wed, 11 Feb 2015 18:06:14 +0000 (UTC) Received: from mail.made4.biz (mail.made4.biz [IPv6:2001:41d0:2:c018::1:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9720B333 for ; Wed, 11 Feb 2015 18:06:14 +0000 (UTC) Received: from 2a02-8428-011b-e000-0290-f5ff-fe9d-b78c.rev.sfr.net ([2a02:8428:11b:e000:290:f5ff:fe9d:b78c] helo=magellan.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YLbfw-000GIG-Bk for freebsd-current@freebsd.org; Wed, 11 Feb 2015 19:06:12 +0100 Message-ID: <54DB9A0C.1010806@FreeBSD.org> Date: Wed, 11 Feb 2015 19:06:04 +0100 From: =?windows-1252?Q?Jean-S=E9bastien_P=E9dron?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: freebsd-current@freebsd.org Subject: Re: unbound crashes on bootup References: <1264.1423227963@critter.freebsd.dk> In-Reply-To: <1264.1423227963@critter.freebsd.dk> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gBsnx3NctEGr71F9p6j2N52KkERfEUbMp" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 18:06:14 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --gBsnx3NctEGr71F9p6j2N52KkERfEUbMp Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 06.02.2015 14:06, Poul-Henning Kamp wrote: > I just updated my -current to r278283, and unbound (still) croaks > during bootup: Hi! I have a similar problem. Also, unbound crashes each time I start/stop OpenVPN. I suppose the problem is the same in both cases. The crash happens in the config_lookup_uid() in contrib/unbound/util/config_file.c. Here's the code: struct passwd *pwd; if((pwd =3D getpwnam(cfg->username)) =3D=3D NULL) log_err("user '%s' does not exist.", cfg->username); cfg->uid =3D pwd->pw_uid; getpwnam(3) returns NULL: an error message is logged but the function doesn't return. Therefore, the program segfaults on "pwd->pw_uid" on the next line. But why did getpwnam(3) return NULL in the first place? It looks for the "unbound" user which exists. getpwnam() calls _nsdispatch() which fails. I have the default nsswitch.conf. I didn't look at the problem more deeply yet, but could getpwnam()/_nsdispatch() be unhappy with the absence of a working DNS resolver (unbound is being (re)started)? --=20 Jean-S=E9bastien P=E9dron --gBsnx3NctEGr71F9p6j2N52KkERfEUbMp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJU25oUXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NzA4N0ZEMUFFQUUwRTEyREJDNkE2RjAz OUU5OTc2MUE1RkQ5NENDAAoJEDnpl2Gl/ZTMLusP/3LeUB1r1tsTtCeCriyckQ0d HQQBD+ixL4tyhrcqB2PSxNP7f+zQaPxu5bDhBGxtZj8l5yD3Kf2gXw0TaKqK+sAW WpStLDbGOLUDqdR3h9jvtpOTWmfAXHsISflndks1xXQaJuGrtscyEis2QpGfQNHP ptR2s44MOEUZRW6Uu7Yk+YGa740PWcmJRTNUkeIv8s9gLURodZrOddT7PVBcdHUc qjhQ/5TMHGxVrtnQHu8ty2acQq8ZWsKKmIE9ybhAgoMg/r4MOP8DSxs2ZgkrKUlp Vvok55MVnR/TShGwTuxxNaTxGWrb9sS+zG1n4YR3PBQgGUEjPTnjo3ER9xh+oRIO W3enqq0vjEacQA9BRz0IqMKfc8EV1+zfeGZEjNuRObwIQJmibpXZ5jXb0za2MccM PFFGnbEuWivZ7H72unSIWyKCEZ/BZwNVACPj/CzuSxtrgoo8wJTtfdEzi0GALSLS WQaIwj8wxWMtMlpLpDzFmJtxafLZhu5XywaSELn9V6mgVy6Tni+IEPcRoKrvfWGY hVZRQrcZu86VFdR5+JpY7Q9btZT5SXoazcTrKdew5n0C+svEcShnw89+vkp5faRX Mzyl6zvKr41P223EVqtaR9es7O2pnFc/ZhaImE/sp2ieG5zZHtOJboJRGvEjuOpe ltIesC50BPwCszM6mOHu =jToW -----END PGP SIGNATURE----- --gBsnx3NctEGr71F9p6j2N52KkERfEUbMp--