public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nscd/29402] New: nscd: No such file or directory
@ 2022-07-25  9:30 mingli.yu at windriver dot com
  2022-07-26  2:48 ` [Bug nscd/29402] " mingli.yu at windriver dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: mingli.yu at windriver dot com @ 2022-07-25  9:30 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29402

            Bug ID: 29402
           Summary: nscd: No such file or directory
           Product: glibc
           Version: 2.35
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: nscd
          Assignee: unassigned at sourceware dot org
          Reporter: mingli.yu at windriver dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

run nscd in 32bit env.
root@qemux86:~# systemctl status nscd
* nscd.service - Name Service Cache Daemon
     Loaded: loaded (/lib/systemd/system/nscd.service; enabled; vendor preset:
enabled)
     Active: active (running) since Mon 2022-07-25 09:17:41 UTC; 41s ago
    Process: 264 ExecStart=/usr/sbin/nscd (code=exited, status=0/SUCCESS)
   Main PID: 267 (nscd)
      Tasks: 10 (limit: 4810)
     Memory: 992.0K
     CGroup: /system.slice/nscd.service
             `-267 /usr/sbin/nscd

Jul 25 09:17:57 qemux86 nscd[267]: 267 checking for monitored file `/hosts': No
such file or directory
Jul 25 09:17:59 qemux86 nscd[267]: 267 checking for monitored file
`/nsswitch.conf': No such file or directory
Jul 25 09:17:59 qemux86 nscd[267]: 267 checking for monitored file `/services':
No such file or directory
Jul 25 09:18:13 qemux86 nscd[267]: 267 checking for monitored file
`/nsswitch.conf': No such file or directory
Jul 25 09:18:13 qemux86 nscd[267]: 267 checking for monitored file
`/resolv.conf': No such file or directory
Jul 25 09:18:13 qemux86 nscd[267]: 267 checking for monitored file `/hosts': No
such file or directory
Jul 25 09:18:14 qemux86 nscd[267]: 267 checking for monitored file
`/nsswitch.conf': No such file or directory
Jul 25 09:18:14 qemux86 nscd[267]: 267 checking for monitored file `/services':
No such file or directory
Jul 25 09:18:18 qemux86 nscd[267]: 267 checking for monitored file
`/nsswitch.conf': No such file or directory
Jul 25 09:18:18 qemux86 nscd[267]: 267 checking for monitored file `/passwd':
No such file or directory
Jul 25 09:18:28 qemux86 nscd[267]: 267 checking for monitored file
`/nsswitch.conf': No such file or directory
Jul 25 09:18:28 qemux86 nscd[267]: 267 checking for monitored file
`/resolv.conf': No such file or directory
Jul 25 09:18:28 qemux86 nscd[267]: 267 checking for monitored file `/hosts': No
such file or directory


root@qemux86:~# rpm -qa | grep nscd
nscd-2.35-r0.core2_32



Steps to reproduce:
1, mkdir -p /build/project
2, cd /build/project && git clone git://git.yoctoproject.org/poky
3, cd /build/project/poky && . oe-init-build-env build
4, echo "IMAGE_INSTALL:append = \" nscd\"" >> conf/local.conf
5, bitbake core-image-base
6, runqemu qemux86  core-image-base nographic

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug nscd/29402] nscd: No such file or directory
  2022-07-25  9:30 [Bug nscd/29402] New: nscd: No such file or directory mingli.yu at windriver dot com
@ 2022-07-26  2:48 ` mingli.yu at windriver dot com
  2022-08-10  3:00 ` mingli.yu at windriver dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mingli.yu at windriver dot com @ 2022-07-26  2:48 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29402

--- Comment #1 from Mingli <mingli.yu at windriver dot com> ---
Steps to reproduce:
1, mkdir -p /build/project
2, cd /build/project && git clone git://git.yoctoproject.org/poky
3, cd /build/project/poky && . oe-init-build-env build
4, echo "IMAGE_INSTALL:append = \" nscd\"" >> conf/local.conf
5, sed -i 's:^MACHINE.*:MACHINE ??= "qemux86":g' conf/local.conf
6, bitbake core-image-base
7, runqemu qemux86  core-image-base nographic

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug nscd/29402] nscd: No such file or directory
  2022-07-25  9:30 [Bug nscd/29402] New: nscd: No such file or directory mingli.yu at windriver dot com
  2022-07-26  2:48 ` [Bug nscd/29402] " mingli.yu at windriver dot com
@ 2022-08-10  3:00 ` mingli.yu at windriver dot com
  2022-10-25 19:54 ` zev+sourcewarebz at bewilderbeest dot net
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mingli.yu at windriver dot com @ 2022-08-10  3:00 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29402

--- Comment #2 from Mingli <mingli.yu at windriver dot com> ---
And add some debug info as below.
# vi nss/nss_files/files-init.c
[snip]
static void
register_file (void (*cb) (size_t, struct traced_file *), 
               int db, const char *path, int crinit)
{
  size_t pathlen = strlen (path) + 1;
  struct traced_file *file = malloc (sizeof (struct traced_file) + pathlen);
  /* Do not register anything on memory allocation failure.  nscd will
     fail soon anyway.  */
  if (file != NULL)
    {   
      init_traced_file (file, path, crinit);
      syslog (LOG_NOTICE, "in register_file before %s %p", file->fname, file);
      cb (db, file);
      syslog (LOG_NOTICE, "in register_file after %s %p", file->fname, file);
    }
}
[snip]

# vi nscd/connections.c
[snip]
void
register_traced_file (size_t dbidx, struct traced_file *finfo)
{
  /* If the database is disabled or file checking is disabled
     then ignore the registration.  */
  dbg_log("in register_traced_file %s %p", finfo->fname, file);
[snip]


Install the patched nscd and run "systemctl status nscd"
# cat /var/log/syslog
[snip]
2022-08-10T08:28:49.403612+00:00 intel-x86-64 nscd: in  register_file before
/etc/passwd 0x56610fe0
2022-08-10T08:28:49.411267+00:00 intel-x86-64 nscd: in register_traced_file
/passwd 0x56610fe0
2022-08-10T08:28:49.403612+00:00 intel-x86-64 nscd: in  register_file after
/etc/passwd 0x56610fe0
[snip]

It turns out the pointer address is the same as 0x56610fe0 for file both in
function register_file and register_traced_file. But the contents of
file->fname is different. Confusing about the different behavior and I think it
should be same for file->fname. Why it is different? Any hints?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug nscd/29402] nscd: No such file or directory
  2022-07-25  9:30 [Bug nscd/29402] New: nscd: No such file or directory mingli.yu at windriver dot com
  2022-07-26  2:48 ` [Bug nscd/29402] " mingli.yu at windriver dot com
  2022-08-10  3:00 ` mingli.yu at windriver dot com
@ 2022-10-25 19:54 ` zev+sourcewarebz at bewilderbeest dot net
  2022-10-25 20:01 ` zev+sourcewarebz at bewilderbeest dot net
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: zev+sourcewarebz at bewilderbeest dot net @ 2022-10-25 19:54 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29402

Zev Weiss <zev+sourcewarebz at bewilderbeest dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zev+sourcewarebz@bewilderbe
                   |                            |est.net

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug nscd/29402] nscd: No such file or directory
  2022-07-25  9:30 [Bug nscd/29402] New: nscd: No such file or directory mingli.yu at windriver dot com
                   ` (2 preceding siblings ...)
  2022-10-25 19:54 ` zev+sourcewarebz at bewilderbeest dot net
@ 2022-10-25 20:01 ` zev+sourcewarebz at bewilderbeest dot net
  2022-10-26 13:40 ` rwmacleod at gmail dot com
  2022-12-09 14:34 ` adhemerval.zanella at linaro dot org
  5 siblings, 0 replies; 7+ messages in thread
From: zev+sourcewarebz at bewilderbeest dot net @ 2022-10-25 20:01 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29402

--- Comment #3 from Zev Weiss <zev+sourcewarebz at bewilderbeest dot net> ---
We've also been hitting this bug on 32-bit systems (OpenBMC), and tracked it
down to a mismatch in the size of time_t (which throws off the layout of struct
traced_file by four bytes).  I actually sent an email to the list with a
probably-not-quite-right patch fixing it just before finding this ticket:
https://sourceware.org/pipermail/libc-alpha/2022-October/142937.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug nscd/29402] nscd: No such file or directory
  2022-07-25  9:30 [Bug nscd/29402] New: nscd: No such file or directory mingli.yu at windriver dot com
                   ` (3 preceding siblings ...)
  2022-10-25 20:01 ` zev+sourcewarebz at bewilderbeest dot net
@ 2022-10-26 13:40 ` rwmacleod at gmail dot com
  2022-12-09 14:34 ` adhemerval.zanella at linaro dot org
  5 siblings, 0 replies; 7+ messages in thread
From: rwmacleod at gmail dot com @ 2022-10-26 13:40 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29402

Randy Macleod <rwmacleod at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rwmacleod at gmail dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug nscd/29402] nscd: No such file or directory
  2022-07-25  9:30 [Bug nscd/29402] New: nscd: No such file or directory mingli.yu at windriver dot com
                   ` (4 preceding siblings ...)
  2022-10-26 13:40 ` rwmacleod at gmail dot com
@ 2022-12-09 14:34 ` adhemerval.zanella at linaro dot org
  5 siblings, 0 replies; 7+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2022-12-09 14:34 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29402

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|---                         |2.37
           Assignee|unassigned at sourceware dot org   |adhemerval.zanella at linaro dot o
                   |                            |rg
                 CC|                            |adhemerval.zanella at linaro dot o
                   |                            |rg
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #4 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
Fixed on 2.37.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-12-09 14:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-25  9:30 [Bug nscd/29402] New: nscd: No such file or directory mingli.yu at windriver dot com
2022-07-26  2:48 ` [Bug nscd/29402] " mingli.yu at windriver dot com
2022-08-10  3:00 ` mingli.yu at windriver dot com
2022-10-25 19:54 ` zev+sourcewarebz at bewilderbeest dot net
2022-10-25 20:01 ` zev+sourcewarebz at bewilderbeest dot net
2022-10-26 13:40 ` rwmacleod at gmail dot com
2022-12-09 14:34 ` adhemerval.zanella at linaro dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).