From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6D8C93857802; Sat, 23 Oct 2021 05:21:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6D8C93857802 From: "ttwd80 at gmail dot com" To: glibc-bugs@sourceware.org Subject: [Bug nscd/28490] New: Possible race condition for nscd Date: Sat, 23 Oct 2021 05:21:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: nscd X-Bugzilla-Version: 2.31 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ttwd80 at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Oct 2021 05:21:00 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28490 Bug ID: 28490 Summary: Possible race condition for nscd Product: glibc Version: 2.31 Status: UNCONFIRMED Severity: normal Priority: P2 Component: nscd Assignee: unassigned at sourceware dot org Reporter: ttwd80 at gmail dot com CC: drepper.fsp at gmail dot com Target Milestone: --- I run nscd in a container, ubuntu:20.04. I use selenium to control google chrome using google chrome driver. Google Chrome: 95 Google Chrome driver: 95 Selenium: 4.0.0 Python: 3.9 I start nscd and request www.google.com from the browser using selenium. This is the log when it does work: https://github.com/ttwd80/whw/runs/3982474693?check_suite_focus=3Dtrue in step: verify_nscd_cache_hit Request time: 2021-10-23 04:21:23 Request time: 2021-10-23 04:22:23 Request time: 2021-10-23 04:23:23 Sat Oct 23 04:21:23 2021 - 7039: provide access to FD 7, for passwd Sat Oct 23 04:21:23 2021 - 7039: handle_request: request received (Version = =3D 2) from PID 7165 Sat Oct 23 04:21:23 2021 - 7039: GETHOSTBYNAME (www.google.com) Sat Oct 23 04:21:23 2021 - 7039: Haven't found "www.google.com" in hosts ca= che! Sat Oct 23 04:21:23 2021 - 7039: add new entry "www.google.com" of type GETHOSTBYNAME for hosts to cache (first) Sat Oct 23 04:21:31 2021 - 7039: pruning passwd cache; time 1634962891 04:21:23.314290 IP 172.23.0.101.55321 > 208.67.222.123.53: 17529+ [1au] A? accounts.google.com. (48) 04:21:23.468566 IP 172.23.0.101.50593 > 208.67.222.123.53: 20275+ [1au] A? www.google.com. (43) 04:22:23.302644 IP 172.23.0.101.37247 > 208.67.222.123.53: 30809+ [1au] A? update.googleapis.com. (50) 04:22:23.371129 IP 172.23.0.101.36864 > 208.67.222.123.53: 63041+ [1au] A? edgedl.me.gvt1.com. (47) Three requests made, exactly one minute apart. Only one goes out to OpenDNS. The other 2 uses the cached result. In this run, it works as expected. Here is another run, but this does not work as expected: https://github.com/ttwd80/whw/runs/3982474716?check_suite_focus=3Dtrue in step: verify_nscd_cache_miss Sat Oct 23 04:21:40 2021 - 7044: provide access to FD 11, for hosts Sat Oct 23 04:21:40 2021 - 7044: handle_request: request received (Version = =3D 2) from PID 7172 Sat Oct 23 04:21:40 2021 - 7044: GETHOSTBYNAME (www.google.com) Sat Oct 23 04:21:40 2021 - 7044: Haven't found "www.google.com" in hosts ca= che! Sat Oct 23 04:21:49 2021 - 7044: pruning passwd cache; time 1634962909 Sat Oct 23 04:21:49 2021 - 7044: considering GETPWBYUID entry "0", timeout 1634963499 Sat Oct 23 04:21:49 2021 - 7044: considering GETPWBYUID entry "1000", timeo= ut 1634963499 Sat Oct 23 04:21:49 2021 - 7044: considering GETPWBYNAME entry "ubuntu", timeout 1634963499 Sat Oct 23 04:21:49 2021 - 7044: considering GETPWBYNAME entry "root", time= out 1634963499 Sat Oct 23 04:21:49 2021 - 7044: considering GETPWBYUID entry "105", timeout 1634963499 Sat Oct 23 04:21:49 2021 - 7044: considering GETPWBYNAME entry "tcpdump", timeout 1634963499 Sat Oct 23 04:21:50 2021 - 7044: pruning group cache; time 1634962910 Sat Oct 23 04:21:50 2021 - 7044: considering GETGRBYGID entry "1000", timeo= ut 1634966499 Sat Oct 23 04:21:50 2021 - 7044: considering GETGRBYNAME entry "ubuntu", timeout 1634966499 Sat Oct 23 04:21:50 2021 - 7044: considering INITGROUPS entry "ubuntu", tim= eout 1634962959 Sat Oct 23 04:21:50 2021 - 7044: considering INITGROUPS entry "root", timeo= ut 1634962959 Sat Oct 23 04:21:50 2021 - 7044: considering INITGROUPS entry "tcpdump", timeout 1634962959 Sat Oct 23 04:21:51 2021 - 7044: pruning hosts cache; time 1634962911 Sat Oct 23 04:21:51 2021 - 7044: considering GETAI entry "localhost", timeo= ut 1634966499 Sat Oct 23 04:21:51 2021 - 7044: considering GETHOSTBYNAME entry "accounts.google.com", timeout 1634963200 Sat Oct 23 04:21:52 2021 - 7044: pruning services cache; time 1634962912 Sat Oct 23 04:22:39 2021 - 7044: pruning group cache; time 1634962959 Sat Oct 23 04:22:39 2021 - 7044: considering GETGRBYGID entry "1000", timeo= ut 1634966499 Sat Oct 23 04:22:39 2021 - 7044: considering GETGRBYNAME entry "ubuntu", timeout 1634966499 Sat Oct 23 04:22:39 2021 - 7044: considering INITGROUPS entry "ubuntu", tim= eout 1634962959 Sat Oct 23 04:22:39 2021 - 7044: considering INITGROUPS entry "root", timeo= ut 1634962959 Sat Oct 23 04:22:39 2021 - 7044: considering INITGROUPS entry "tcpdump", timeout 1634962959 Sat Oct 23 04:22:40 2021 - 7044: handle_request: request received (Version = =3D 2) from PID 7172 Sat Oct 23 04:22:40 2021 - 7044: GETHOSTBYNAME (update.googleapis.co= m) Sat Oct 23 04:22:40 2021 - 7044: Haven't found "update.googleapis.com" in h= osts cache! Sat Oct 23 04:22:40 2021 - 7044: add new entry "update.googleapis.com" of t= ype GETHOSTBYNAME for hosts to cache (first) Sat Oct 23 04:22:40 2021 - 7044: handle_request: request received (Version = =3D 2) from PID 7172 Sat Oct 23 04:22:40 2021 - 7044: GETHOSTBYNAME (edgedl.me.gvt1.com) Sat Oct 23 04:22:40 2021 - 7044: Haven't found "edgedl.me.gvt1.com" in hosts cache! Sat Oct 23 04:22:40 2021 - 7044: add new entry "edgedl.me.gvt1.com" of type GETHOSTBYNAME for hosts to cache (first) Sat Oct 23 04:22:41 2021 - 7044: handle_request: request received (Version = =3D 2) from PID 7172 Sat Oct 23 04:22:41 2021 - 7044: GETHOSTBYNAME (www.google.com) Sat Oct 23 04:22:41 2021 - 7044: Haven't found "www.google.com" in hosts ca= che! Sat Oct 23 04:22:54 2021 - 7044: pruning group cache; time 1634962974 Sat Oct 23 04:22:54 2021 - 7044: considering GETGRBYGID entry "1000", timeo= ut 1634966499 Sat Oct 23 04:22:54 2021 - 7044: considering GETGRBYNAME entry "ubuntu", timeout 1634966499 Sat Oct 23 04:22:54 2021 - 7044: considering INITGROUPS entry "ubuntu", tim= eout 1634962959 Sat Oct 23 04:22:54 2021 - 7044: considering INITGROUPS entry "root", timeo= ut 1634962959 Sat Oct 23 04:22:54 2021 - 7044: considering INITGROUPS entry "tcpdump", timeout 1634962959 Sat Oct 23 04:22:54 2021 - 7044: remove INITGROUPS entry "ubuntu" Sat Oct 23 04:22:54 2021 - 7044: remove INITGROUPS entry "root" Sat Oct 23 04:22:54 2021 - 7044: remove INITGROUPS entry "tcpdump" Sat Oct 23 04:22:54 2021 - 7044: freed 240 bytes in group cache Sat Oct 23 04:23:41 2021 - 7044: handle_request: request received (Version = =3D 2) from PID 7172 Sat Oct 23 04:23:41 2021 - 7044: GETHOSTBYNAME (www.google.com) Sat Oct 23 04:23:41 2021 - 7044: Haven't found "www.google.com" in hosts ca= che! Sat Oct 23 04:23:41 2021 - 7044: handle_request: request received (Version = =3D 2) from PID 7557 Sat Oct 23 04:23:41 2021 - 7044: GETFDPW Sat Oct 23 04:23:41 2021 - 7044: provide access to FD 7, for passwd Sat Oct 23 04:23:41 2021 - 7044: handle_request: request received (Version = =3D 2) from PID 7557 Sat Oct 23 04:23:41 2021 - 7044: GETFDGR Sat Oct 23 04:23:41 2021 - 7044: provide access to FD 9, for group Sat Oct 23 04:23:41 2021 - 7044: handle_request: request received (Version = =3D 2) from PID 7557 Sat Oct 23 04:23:41 2021 - 7044: INITGROUPS (root) Sat Oct 23 04:23:41 2021 - 7044: Haven't found "root" in group cache! Sat Oct 23 04:23:41 2021 - 7044: add new entry "root" of type INITGROUPS for group to cache (first) multiple requests to www.google.com but none of them gets "add new entry "www.google.com" of type GETHOSTBYNAME for hosts to cache (first)" Other entries are added to the cache, "add new entry "edgedl.me.gvt1.com" of type GETHOSTBYNAME for hosts to cache (first)" Not sure if this is a bug or just a misconfiguration on my side. Actual: "add new entry "www.google.com" of type GETHOSTBYNAME for hosts to cache (first)" sometimes happen after "Haven't found "www.google.com" in ho= sts cache!" Expected: "add new entry "www.google.com" of type GETHOSTBYNAME for hosts to cache (first)" to happen every single time after "Haven't found "www.google.com" in hosts cache!" --=20 You are receiving this mail because: You are on the CC list for the bug.=