You are not logged in.
(Sorry if this is the wrong board, wasn't really sure where this belonged.)
I ran pacman -Syu on my main Arch system after a month or two (slow, I know) and had some trouble after rebooting. I usually log in from a TTY and use startx to start my WM, but after logging in (before I get a prompt) an error would flash on the screen and then I'd be returned to the TTY login.
I was able to capture the error by recording a video of my screen:
Assert from 'close_nointr(fd) != -EBADF' failed at src/basic/fd-util.c:74, function safe_close(). Aborting.
At first I thought maybe something in my bashrc or profile was an issue, so I used a blank one, but without success. Then it occurred to me it might be username related, so I tried creating some new users and found the issue seems to only affect purely numeric usernames (like 23 or 42). I am not familiar with the function in the error but it looks like maybe the username is being interpreted as a file descriptor.
I realize that using a numeric username is technically a bad idea and in theory opens up a can of worms for no benefit; I do it just out of vanity. But honestly after a decade of doing it this is the first time I've run into any issues related to logging in.
At the moment I am able to log in as root and su to my usual user, but it would be great if I could fix this. Also treating usernames as file descriptors suggests the potential for bugs elsewhere. Based on journalctl it looks like my login process is dumping core, details:
Module linux-vdso.so.1 with build-id ae8518a0710c2679844504efb751b01abf13cef5
Module libnss_systemd.so.2 with build-id aa54bea74fb4d938f92ea6452d93d1f00201a8a0
Module pam_warn.so with build-id 5b73faf8abe96fd6b460ef6c703cb127fe8e312b
Module pam_deny.so with build-id 023269774049f20683b13e4304d7e254a1c7a0b2
Module pam_systemd.so with build-id 926ebe98215dd68688283b4d29461e6b1fb91006
Module pam_mail.so with build-id 2e76a4a0eb21f3217a766329838b850a7085b16b
Module pam_motd.so with build-id f3ed720bd88c652152737c440039dd0b9589174c
Module pam_limits.so with build-id 904f399db1e3e4b168ab6fcd9152c52a52d41d3f
Module pam_keyinit.so with build-id 6bd2a336d004dc8458f1c4cdf8fcd941d1c4925f
Module pam_loginuid.so with build-id 45bcbb167aef0cae946704ce218c4a8f442393ad
Module pam_time.so with build-id 27045c468605f64203a35fa2d83d7c423220c298
Module pam_access.so with build-id 9e188fc5620336bf5919f51c25952325ff4de10e
Module pam_env.so with build-id e28d502d7e4820f936437d20d459e51036d1a243
Module pam_permit.so with build-id 59f4a785cc0a8400f0438321eac923ff96c34bdd
Module libresolv.so.2 with build-id 46ffdf3d477a170314060c26927470d7399bc900
Module libkeyutils.so.1 with build-id ac405ddd17be10ce538da3211415ee50c8f8df79
Module libkrb5support.so.0 with build-id 36db7c21bc57a9b934ad2d3463782db9fef4af07
Module libcom_err.so.2 with build-id 358b783c9b3d12ba8248519ea2e7f3da4c4e0297
Module libk5crypto.so.3 with build-id f1c113fea46023cdf62c7e51cb643c45831abdd5
Module libkrb5.so.3 with build-id 9350783c946d77aec8ee8fd9c6bc12f4f7b72be9
Module libpthread.so.0 with build-id 7fa8b52fae071a370ba4ca32bf9490a30aff31c4
Module libgssapi_krb5.so.2 with build-id 1813217c8baf82a1078772eed0d868310cd59f8b
Module libtirpc.so.3 with build-id 5bef2adfdee3df283f593b3e2d37b6dac405256a
Module libcrypt.so.2 with build-id a0a45f81771945f0559d04e93726d245159930da
Module pam_unix.so with build-id 608e03b3693ba42760a2b836763d41d1c079a2bf
Module libgcc_s.so.1 with build-id 5d817452a709ca3a213341555ddcf446ecee37fa
Module libm.so.6 with build-id 596b63a006a4386dcab30912d2b54a7a61827b07
Module libcap.so.2 with build-id eb6dae97527fc89dbb0d5bb581a15acd02ae9f56
Module pam_systemd_home.so with build-id d12a24c451a7d1dc2cb1dc953f8041d28cafbaba
Module pam_faillock.so with build-id 7e42bd70303fbc079e452d777b6907bb5614df5d
Module pam_shells.so with build-id 827b2de32a5ec108462699009e6e441b42792b26
Module pam_nologin.so with build-id 9f749b8e7bd55bfb75e294bc32aaa56ac353d6c0
Module pam_securetty.so with build-id f50f4594f4bc962c6e9b8d75b3219dfb610f27d1
Module libcap-ng.so.0 with build-id 09690c43af29ef92bbec2e53e29101b2b8e9c48c
Module ld-linux-x86-64.so.2 with build-id c09c6f50f6bcec73c64a0b4be77eadb8f7202410
Module libdl.so.2 with build-id bb9bd2657bfba9f60bd34d2050cc63a7eb024bc4
Module libaudit.so.1 with build-id 27ca9470fd239e2f61c83e293f24f266789485b6
Module libc.so.6 with build-id 85766e9d8458b16e9c7ce6e07c712c02b8471dbc
Module libpam_misc.so.0 with build-id 74aaf2951cb6eb6cf89a69339285a6015876bee4
Module libpam.so.0 with build-id bb11b2685fe89555938ffd330ea44d82b0f8701c
Module login with build-id cf05f4e8b1b90fcc6fefe422748d91003165b80a
Stack trace of thread 1504:
#0 0x00007f27e0ef134c __pthread_kill_implementation (libc.so.6 + 0x8f34c)
#1 0x00007f27e0ea44b8 raise (libc.so.6 + 0x424b8)
#2 0x00007f27e0e8e534 abort (libc.so.6 + 0x2c534)
#3 0x00007f27e0de34e8 n/a (pam_systemd_home.so + 0x2b4e8)
#4 0x00007f27e0de3cff n/a (pam_systemd_home.so + 0x2bcff)
#5 0x00007f27e0dd5340 n/a (pam_systemd_home.so + 0x1d340)
#6 0x00007f27e0dd993b n/a (pam_systemd_home.so + 0x2193b)
#7 0x00007f27e107447c n/a (libpam.so.0 + 0x347c)
#8 0x00007f27e1074fe2 pam_end (libpam.so.0 + 0x3fe2)
#9 0x0000564cd5030061 n/a (login + 0x5061)
#10 0x00007f27e0e8f310 __libc_start_call_main (libc.so.6 + 0x2d310)
#11 0x00007f27e0e8f3c1 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x2d3c1)
#12 0x0000564cd5030ad5 n/a (login + 0x5ad5)
ELF object binary architecture: AMD x86-64
Is this a bug I should report somewhere, or is there a change I can read about somewhere?
Last edited by polm23 (2022-04-11 04:46:51)
Offline
#3 0x00007f27e0de34e8 n/a (pam_systemd_home.so + 0x2b4e8)
Unless you intend to use this "feature", you can just remove the homed pam from /etc/pam.d/system-auth
Since it's optional (leading "-") you can also probably (haven't tried, be sure to be able to fix this offline) remove /usr/lib/security/pam_systemd_home.so and block it it your pacman.conf
Pure numeric usernames are in fact a bad idea (and prohibited by the default $NAME_REGEX), but technically POSIX complaint (even the leading hyphen is something you "should"™ not do, but is not strongly prohibited.
https://pubs.opengroup.org/onlinepubs/9 … tag_03_437
https://pubs.opengroup.org/onlinepubs/9 … tag_03_282
Offline
Thanks for the quick answer! I am definitely not intentionally using that.
Unfortunately I've never worked with pam.d files. When you say to remove the pam from system-auth, what do you mean? I tried commenting the line or changing the condition to "optional" but neither seemed to have any effect. I haven't tried fiddling with the .so yet.
I am confused as to why that module is doing anything at all by default. I checked the systemd service for it and it's disabled. I guess this is just systemd being systemd?
Offline
Never mind - I was only commenting out the first pam_systemd_home line. I didn't realize there were four or five of them in the file. After commenting them all out login works like it did before.
Thanks again for your help!
Offline
Commenting the lines (there're 4) should™ do, "optional" won't help since you're still optionally running the module (causing the crash)
"pam_systemd_home.so" should™ then no longer appear in any backtraces or anywhere.
Edit: fuck.
Edit #2: Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Last edited by seth (2022-04-10 15:44:55)
Offline
Sorry for the extra reply there, and subject edited. Thanks again!
Offline