From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15021 invoked by alias); 11 Feb 2012 22:53:42 -0000 Received: (qmail 15011 invoked by uid 22791); 11 Feb 2012 22:53:41 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 11 Feb 2012 22:53:30 +0000 From: "pcpa at mandriva dot com.br" To: glibc-bugs@sources.redhat.com Subject: [Bug libc/13594] Crash if nscd is not running in __nscd_get_mapping Date: Sat, 11 Feb 2012 22:53:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pcpa at mandriva dot com.br X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: drepper.fsp at gmail dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2012-02/txt/msg00064.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=3D13594 Paulo C=C3=A9sar Pereira de Andrade changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pcpa at mandriva dot com.br --- Comment #2 from Paulo C=C3=A9sar Pereira de Andrade 2012-02-11 22:52:36 UTC --- I am just starting testing an update from "2.14.90" to "2.15" for mandriva, and I get this randomly, varying from 1 to 4 times every restart of chromium-browser. $ rpm -qf /usr/bin/chromium-browser=20 chromium-browser-unstable-17.0.963.26-1-mdv2012.0.x86_64 $ LD_LIBRARY_PATH=3D/usr/lib64/chromium-browser gdb /usr/lib64/chromium-browser/chrome ... 0x00007ffff18f5e7e in __nscd_get_mapping (type=3D, key=3D 0x7ffff19436b4 "hosts", mappedp=3D0x7ffff1b82548) at nscd_helper.c:417 417 if (oldval !=3D NULL && atomic_decrement_val (&oldval->counter) = =3D=3D 0) (gdb) p oldval $1 =3D (struct mapped_database *) 0xffffffffffffffff (gdb) bt #0 0x00007ffff18f5e7e in __nscd_get_mapping (type=3D, key=3D 0x7ffff19436b4 "hosts", mappedp=3D0x7ffff1b82548) at nscd_helper.c:417 #1 0x00007ffff18f4098 in __nscd_get_nl_timestamp () at nscd_gethst_r.c:113 #2 0x00007ffff18e2be8 in __check_pf (seen_ipv4=3D0x7ffff7ed071e, seen_ipv6= =3D 0x7ffff7ed071f, in6ai=3D0x7ffff7ed06e0, in6ailen=3D0x7ffff7ed06f0) at ../sysdeps/unix/sysv/linux/check_pf.c:324 #3 0x00007ffff18aa015 in __GI_getaddrinfo (name=3D 0x555559ba3a68 "www.statcounter.com", service=3D, hints= =3D 0x7ffff7ed0a60, pai=3D0x7ffff7ed0a98) at ../sysdeps/posix/getaddrinfo.c= :2305 #4 0x00005555566a0c9c in ?? () #5 0x000055555669b3e8 in ?? () #6 0x0000555557d85b95 in ?? () #7 0x0000555556437fb2 in ?? () #8 0x00007ffff4239bd0 in start_thread (arg=3D0x7ffff7ed1700) at pthread_create.c:309 #9 0x00007ffff18bd93d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115 I believe this should correct it, but not the proper solution: --- glibc-2.15-a316c1f/nscd/nscd_helper.c.orig 2012-02-11 20:25:37.80451= 4879 -0200 +++ glibc-2.15-a316c1f/nscd/nscd_helper.c 2012-02-11 20:26:07.428588082 -0200 @@ -414,7 +414,8 @@ __nscd_get_mapping (request_type type, c struct mapped_database *oldval =3D *mappedp; *mappedp =3D result; - if (oldval !=3D NULL && atomic_decrement_val (&oldval->counter) =3D=3D 0) + if (oldval !=3D NULL && oldval !=3D NO_MAPPING + && atomic_decrement_val (&oldval->counter) =3D=3D 0) __nscd_unmap (oldval); return result; hopefully also useful: (gdb) frame 0#0 0x00007ffff18f5e7e in __nscd_get_mapping (type=3D, key=3D 0x7ffff19436b4 "hosts", mappedp=3D0x7ffff1b82548) at nscd_helper.c:417 417 if (oldval !=3D NULL && atomic_decrement_val (&oldval->counter) = =3D=3D 0) (gdb) p keylen $12 =3D 6 (gdb) p mapsize $13 =3D 0 (gdb) p iov $14 =3D {{iov_base =3D 0x7ffff7ed0330, iov_len =3D 6}, {iov_base =3D 0x7fff= f7ed04a0,=20 iov_len =3D 8}} (gdb) p cmsg $15 =3D (gdb) p (cmsg)->__cmsg_data value has been optimized out (gdb) p ip $16 =3D (gdb) p mapfd $17 =3D (gdb) p st No symbol "st" in current context. (gdb) p mapping $18 =3D (gdb) p size No symbol "size" in current context. (gdb) p oldval $19 =3D (struct mapped_database *) 0xffffffffffffffff (gdb) p result $20 =3D (struct mapped_database *) 0xffffffffffffffff --=20 Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=3Demail ------- You are receiving this mail because: ------- You are on the CC list for the bug.