From: Calvin Chiang <calvin.chiang@gmail.com>
To: "Aurélien Aptel" <aaptel@suse.com>
Cc: linux-cifs@vger.kernel.org
Subject: Re: Unable to find pw entry for uid
Date: Thu, 6 May 2021 15:40:42 +0200 [thread overview]
Message-ID: <CAEVyU89=egaEAdvCD=FVkLwP4akzY3y8q=0hFW-hSryq0sxnxg@mail.gmail.com> (raw)
In-Reply-To: <877dkcuj8k.fsf@suse.com>
Hey Aurelien
aweseom thanks for this!
>You should try to attach gdb to the cifs.upcall process
stepping through with a debugger was the "next level" i was thinking
of attempting but couldnt work out how to get GDB to hook into the
process.
one more newbie question:
I guess after i make the change in the cifs.upcall.c file i need to
autoreconf /config /make /make install ?
is it correct that this will overwrite all the files from the
cifs-utils package on my machine?
Cheers
On Thu, 6 May 2021 at 14:42, Aurélien Aptel <aaptel@suse.com> wrote:
>
> Hi Calvin,
>
> Calvin Chiang <calvin.chiang@gmail.com> writes:
> > Now oddly the strerror(errno) is actually returning SUCCESS
> > But the pw = getpwuid(uid); is failing.
> > Getpwuid(uid) is calling nss.
>
> ...
>
> > and the output from the sssd_nss.log is:
>
> ...
>
> > (Mon May 3 13:05:12 2021) [sssd[nss]]
> > [cache_req_search_ncache_filter] (0x0400): CR #114: Filtering out
> > results by negative cache
> >
> > (Mon May 3 13:05:12 2021) [sssd[nss]] [sss_ncache_check_str]
> > (0x2000): Checking negative cache for
> > [NCE/USER/cyberloop.local/alice@cyberloop.local]
> >
> > (Mon May 3 13:05:12 2021) [sssd[nss]]
> > [cache_req_create_and_add_result] (0x0400): CR #114: Found 1 entries
> > in domain cyberloop.local
>
> I don't know much about sssd but if it's finding 1 entry in the
> *negative* cache that means it knows it doesn't exist. (I'm assuming
> negative cache means cache of queries that have no results)
>
> That being said I've had issue with getpwuid() before that were solved
> by updating glibc. Could be totally unrelated to your problem though.
>
> You should try to attach gdb to the cifs.upcall process. You can do this
> by adding
>
> syslog(LOG_ERR, "my pid is %d", getpid());
> sleep(5);
>
> in cifs.upcall.c before the getpwuid() call. Then try triggering the
> mount. It should block because of the sleep(). In a different terminal,
> look at your system journal for the PID, and run gdb -p $pid. From there
> you will be able to step into the getpwuid (glibc), nss, sss, calls.
>
> If your linux distribution has a debug symbol server setup for gdb to
> use, gdb will dynamically fetch symbols and source code on the
> fly. Otherwise you will probably need to install debug and source
> packages for glibc, nss and sssd packages to be able to see function
> names and source code in gdb.
>
> Cheers,
> --
> Aurélien Aptel / SUSE Labs Samba Team
> GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3
> SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
> GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)
>
next prev parent reply other threads:[~2021-05-06 13:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-04 7:49 Unable to find pw entry for uid Calvin Chiang
2021-05-06 12:42 ` Aurélien Aptel
2021-05-06 13:40 ` Calvin Chiang [this message]
2021-05-06 21:19 ` Aurélien Aptel
2021-05-11 10:39 ` Calvin Chiang
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='CAEVyU89=egaEAdvCD=FVkLwP4akzY3y8q=0hFW-hSryq0sxnxg@mail.gmail.com' \
--to=calvin.chiang@gmail.com \
--cc=aaptel@suse.com \
--cc=linux-cifs@vger.kernel.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.
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 NNTP newsgroup(s).