FS#77435 - [util-linux] 2.38.1-1 /usr/bin/login core dumps

Attached to Project: Arch Linux
Opened by Ronald Scott Hathcock (rscotthathcock) - Wednesday, 08 February 2023, 15:46 GMT
Last edited by Toolybird (Toolybird) - Thursday, 23 March 2023, 02:37 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: /usr/bin/login core dumps after the correct password is entered and returns to the login prompt, thus making login impossible.
An error message is flashed on the screen prior to returning to the login prompt:
Assertion 'close_nointr(fd) != -EBADF' failed at src/basic/fd-util.c:77 function safe_ ... (That's all I captured on the camera)

This failure is an interaction with service nslcd and occurs when nslcd is running. Other login methods such as su, ssh work for both local (root) and LDAP users.


Additional info:
* package version(s)
util-linux 2.38.1-1
* journalctl output
Feb 08 07:59:56 psycho kernel: audit: type=1701 audit(1675868396.804:198): auid=0 uid=0 gid=0 ses=6 pid=4006 comm="login" exe="/usr/bin/login" sig=6 res=1
Feb 08 07:59:56 psycho systemd[1]: Created slice Slice /system/systemd-coredump.
Feb 08 07:59:56 psycho audit: BPF prog-id=71 op=LOAD
Feb 08 07:59:56 psycho audit: BPF prog-id=72 op=LOAD
Feb 08 07:59:56 psycho audit: BPF prog-id=73 op=LOAD
Feb 08 07:59:56 psycho kernel: audit: type=1334 audit(1675868396.848:199): prog-id=71 op=LOAD
Feb 08 07:59:56 psycho systemd[1]: Started Process Core Dump (PID 4007/UID 0).
Feb 08 07:59:56 psycho audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@0-4007-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=?>
Feb 08 07:59:57 psycho systemd-coredump[4008]: [🡕] Process 4006 (login) of user 0 dumped core.

Stack trace of thread 4006:
#0 0x00007f03667ad8ec n/a (libc.so.6 + 0x878ec)
#1 0x00007f036675eea8 raise (libc.so.6 + 0x38ea8)
#2 0x00007f036674853d abort (libc.so.6 + 0x2253d)
#3 0x00007f03666aa09c n/a (pam_systemd_home.so + 0x2a09c)
#4 0x00007f03666aa17f n/a (pam_systemd_home.so + 0x2a17f)
#5 0x00007f0366693d1d n/a (pam_systemd_home.so + 0x13d1d)
#6 0x00007f0366693eab n/a (pam_systemd_home.so + 0x13eab)
#7 0x00007f036691547c n/a (libpam.so.0 + 0x347c)
#8 0x00007f0366915fe2 pam_end (libpam.so.0 + 0x3fe2)
#9 0x000055e50628bf43 n/a (login + 0x4f43)
#10 0x00007f0366749790 n/a (libc.so.6 + 0x23790)
#11 0x00007f036674984a __libc_start_main (libc.so.6 + 0x2384a)
#12 0x000055e50628cad5 n/a (login + 0x5ad5)
ELF object binary architecture: AMD x86-64

* link to upstream bug report, if any

Steps to reproduce:
1)systemctl start nslcd
2)switch to another virtual console
3)Enter username and correct password.

This task depends upon

Closed by  Toolybird (Toolybird)
Thursday, 23 March 2023, 02:37 GMT
Reason for closing:  Upstream
Additional comments about closing:  Please request reopen if an Arch packaging bug is identified.
Comment by Toolybird (Toolybird) - Wednesday, 08 February 2023, 22:03 GMT
Please provide a backtrace with debug symbols [1]

[1] https://wiki.archlinux.org/title/Debugging/Getting_traces#Debuginfod
Comment by Ronald Scott Hathcock (rscotthathcock) - Wednesday, 08 February 2023, 23:56 GMT
I think this is what you have requested. I'm cutting and pasting. Should I be uploading these as files instead?

(gdb) bt full
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
tid = <optimized out>
ret = 0
pd = <optimized out>
old_mask = {__val = {0}}
ret = <optimized out>
#1 0x00007fb6c13bc953 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
No locals.
#2 0x00007fb6c136dea8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
ret = <optimized out>
#3 0x00007fb6c135753d in __GI_abort () at abort.c:79
save_stage = 1
act = {__sigaction_handler = {sa_handler = 0x20, sa_sigaction = 0x20}, sa_mask = {__val = {0, 0, 0, 0, 0, 0, 0, 0, 15436654208441386752, 140422901893920, 26, 140422901787667,
140422901768944, 140422901772362, 77, 140422901785640}}, sa_flags = 3, sa_restorer = 0x7fb6c12fa708}
#4 0x00007fb6c12b909c in log_assert_failed (text=text@entry=0x7fb6c12dc5b6 "close_nointr(fd) != -EBADF", file=file@entry=0x7fb6c12db04a "src/basic/fd-util.c", line=line@entry=77,
func=<optimized out>) at ../systemd-stable/src/basic/log.c:853
No locals.
#5 0x00007fb6c12b917f in safe_close (fd=3) at ../systemd-stable/src/basic/fd-util.c:77
_saved_errno_ = 0
__PRETTY_FUNCTION__ = <optimized out>
#6 0x00007fb6c12a2d1d in bus_close_io_fds (b=b@entry=0x55f0334362f0) at ../systemd-stable/src/libsystemd/sd-bus/sd-bus.c:137
__PRETTY_FUNCTION__ = "bus_close_io_fds"
#7 0x00007fb6c12a2eab in bus_free (b=0x55f0334362f0) at ../systemd-stable/src/libsystemd/sd-bus/sd-bus.c:190
s = <optimized out>
__PRETTY_FUNCTION__ = "bus_free"
#8 0x00007fb6c152447c in ?? () from /usr/lib/libpam.so.0
No symbol table info available.
#9 0x00007fb6c1524fe2 in pam_end () from /usr/lib/libpam.so.0
No symbol table info available.
#10 0x000055f031467f43 in main (argc=<optimized out>, argv=<optimized out>) at login-utils/login.c:1537
child_argv = {0x55f033439973 "/bin/bash", 0x55f033442c50 "-bash", 0x0, 0x7ffd42c1bb20 "-bash", 0x7ffd42c1b7f0 "\003\061\344c",
0x7fb6c13af60e <__vsnprintf_internal+126> "H\213\224$\250", 0x7ffd42c1bb20 "-bash", 0x7ffd42c1bb31 "ID3\360U", 0x7ffd42c1bc2a "", 0x0}
child_argc = <optimized out>
pwd = <optimized out>
cxt = {tty_path = 0x55f03341e820 "/dev/tty2", tty_name = 0x55f03341e825 "tty2", tty_number = 0x55f03341e828 "2", tty_mode = 384, username = 0x55f033439950 "fakeuser",
cmd_username = 0x55f03341c5f0 "fakeuser", pwd = 0x55f033439130, pwdbuf = 0x55f033439950 "fakeuser", pamh = 0x55f03341c610, conv = {conv = 0x7fb6c151d930 <misc_conv>,
appdata_ptr = 0x0}, thishost = 0x55f03341ff90 "psycho", thisdomain = 0x0, hostname = 0x0, hostaddress = '\000' <repeats 15 times>, pid = 14066, quiet = 0, remote = 0,
nohost = 0, noauth = 0, keep_env = 1}
Comment by Toolybird (Toolybird) - Thursday, 09 February 2023, 03:13 GMT
Maybe something to do with libpam. Unfortunately pam hasn't been rebuilt since Sep'21 so no debug symbols. Is your pam config modified?

Did this work previously i.e. is it a regression? Possible suspects are glibc and systemd which were updated recently.
Comment by Ronald Scott Hathcock (rscotthathcock) - Thursday, 09 February 2023, 15:25 GMT
This problem occurred while switching from NIS to LDAP for authentication. So I have no historical information.
pam configuration is modified.
files:
passwd
su
system-auth
all have
sufficient pam_ldap.so
added to various sections.


Comment by Toolybird (Toolybird) - Friday, 10 February 2023, 22:45 GMT
Ok. Bottom line is /usr/bin/login shouldn't crash like that. Please report it upstream.
Comment by Toolybird (Toolybird) - Friday, 10 March 2023, 22:38 GMT
> Please report it upstream

Ping? I don't see anything in [1].

[1] https://github.com/util-linux/util-linux/issues
Comment by Ronald Scott Hathcock (rscotthathcock) - Sunday, 19 March 2023, 16:35 GMT
Due to other problems with Arch I had to switch to Ubuntu (It's a work desktop) . I experienced similar login problems. I believe some combination of using a login manager and fixing PAM config files allowed me to use LDAP. I have reported the bug upstream.
Comment by Toolybird (Toolybird) - Thursday, 23 March 2023, 02:36 GMT

Loading...