You are not logged in.
Pages: 1
I'm unable to login via tty in my user account. I can login to it via SDDM, I can also login to root and other accounts (I made a test account to see test this) via the tty.
When I input my password correctly I get an error
malloc() invalid size (unsorted)
and then I instantly get booted back to login.
Last edited by CabalCrow (2024-10-19 20:12:25)
Offline
I'd suspect that perhaps you are logged in, but your shell crashes and thus returns to agetty to login again. Posting a (link to a) journal from such an attempt would definitely clear this up.
Additionally, I'd recommend trying to temporarily move your user's shellrc files (i.e., ~/.bash_profile and ~/.bashrc if you use bash). Then try again. If it works, this would confirm the problem comes from your configs.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I thought my shell was crashing too, so I switched back to bash (I was using zsh before). I have no .bashrc or profile so it should have just been the defaults, but alas it crashed as well.
For the journal I'm not sure which one you need, but here one I checked before:
$ journalctl -b --facility=auth,authpriv -f
Oct 19 20:59:29 archlinux login[75897]: pam_unix(login:session): session opened for user cabalcrow(uid=1000) by LOGIN(uid=0)
Oct 19 20:59:29 archlinux login[75897]: pam_systemd(login:session): New sd-bus connection (system-bus-pam-systemd-75897) opened.
Oct 19 20:59:29 archlinux systemd-logind[775]: New session 50 of user cabalcrow.
Oct 19 20:59:29 archlinux systemd-logind[775]: Session 50 logged out. Waiting for processes to exit.
Oct 19 20:59:29 archlinux systemd-logind[775]: Removed session 50.
Offline
That does confirm a successful login by logind - but the child process (which should be the shell) is indeed exiting immediately. If I were you I'd run the same check again but without the --facility specifier to see if anything else may be logged between the successful login and exit. (I'm not real hopeful for this, but it's an easy test).
Also, are any core dumps generated? (`coredumpctl list`)?
Last edited by Trilby (2024-10-19 18:20:47)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
The full journal entry
$ journalctl -b -f
Oct 19 21:21:27 archlinux login[177543]: pam_systemd_home(login:auth): New sd-bus connection (system-bus-pam-systemd-home-177543) opened.
Oct 19 21:21:30 archlinux login[177543]: pam_unix(login:session): session opened for user cabalcrow(uid=1000) by cabalcrow(uid=0)
Oct 19 21:21:30 archlinux login[177543]: pam_systemd(login:session): New sd-bus connection (system-bus-pam-systemd-177543) opened.
Oct 19 21:21:30 archlinux systemd-logind[775]: New session 57 of user cabalcrow.
Oct 19 21:21:30 archlinux systemd[1]: Started Session 57 of User cabalcrow.
Oct 19 21:21:30 archlinux wireplumber[1189]: spa.bluez5: BlueZ system service is not available
Oct 19 21:21:30 archlinux systemd-coredump[177971]: Process 177543 (login) of user 0 terminated abnormally with signal 6/ABRT, processing...
Oct 19 21:21:30 archlinux systemd[1]: Started Process Core Dump (PID 177971/UID 0).
Oct 19 21:21:30 archlinux systemd[1]: Started Pass systemd-coredump journal entries to relevant user for potential DrKonqi handling.
Oct 19 21:21:30 archlinux systemd-coredump[177972]: [?] Process 177543 (login) of user 0 dumped core.
Stack trace of thread 177543:
#0 0x00007ecdcb7603f4 n/a (libc.so.6 + 0x963f4)
#1 0x00007ecdcb707120 raise (libc.so.6 + 0x3d120)
#2 0x00007ecdcb6ee4c3 abort (libc.so.6 + 0x244c3)
#3 0x00007ecdcb6ef354 n/a (libc.so.6 + 0x25354)
#4 0x00007ecdcb76a765 n/a (libc.so.6 + 0xa0765)
#5 0x00007ecdcb76dd04 n/a (libc.so.6 + 0xa3d04)
#6 0x00007ecdcb76f002 malloc (libc.so.6 + 0xa5002)
#7 0x00007ecdcb752439 n/a (libc.so.6 + 0x88439)
#8 0x00007ecdcb7ee883 __asprintf_chk (libc.so.6 + 0x124883)
#9 0x00007ecdcb6172d0 n/a (pam_env.so + 0x22d0)
#10 0x00007ecdcb617a18 n/a (pam_env.so + 0x2a18)
#11 0x00007ecdcb8c93df n/a (libpam.so.0 + 0x93df)
#12 0x000062bf667c5f0e n/a (login + 0x3f0e)
#13 0x00007ecdcb6efe08 n/a (libc.so.6 + 0x25e08)
#14 0x00007ecdcb6efecc __libc_start_main (libc.so.6 + 0x25ecc)
#15 0x000062bf667c7d55 n/a (login + 0x5d55)
ELF object binary architecture: AMD x86-64
Oct 19 21:21:30 archlinux systemd[1]: getty@tty3.service: Deactivated successfully.
Oct 19 21:21:30 archlinux systemd[1]: run-credentials-getty\x40tty3.service.mount: Deactivated successfully.
Oct 19 21:21:30 archlinux systemd[1]: systemd-coredump@52-177971-0.service: Deactivated successfully.
Oct 19 21:21:30 archlinux systemd[1]: session-57.scope: Deactivated successfully.
Oct 19 21:21:30 archlinux systemd-logind[775]: Session 57 logged out. Waiting for processes to exit.
Oct 19 21:21:30 archlinux drkonqi-coredump-processor[177973]: "/usr/bin/login" 177543 "/var/lib/systemd/coredump/core.login.0.01a80f53506543ce918b7277167f9644.177543.1729362090000000.zst"
Oct 19 21:21:30 archlinux drkonqi-coredump-processor[177973]: The socket path doesn't exist @ "/run/user/0/drkonqi-coredump-launcher"
Oct 19 21:21:30 archlinux systemd[1]: getty@tty3.service: Scheduled restart job, restart counter is at 24.
Oct 19 21:21:30 archlinux systemd[1]: Started Getty on tty3.
Oct 19 21:21:30 archlinux systemd-logind[775]: Removed session 57.
Oct 19 21:21:30 archlinux systemd[1]: drkonqi-coredump-processor@52-177971-0.service: Deactivated successfully.
Oct 19 21:21:31 archlinux wireplumber[1189]: spa.bluez5: BlueZ system service is not available
Offline
As for the core dumps, there are core dumps, but they are all inaccessible.
Offline
Aborts out of pam_env, so likely some bad configuration/file around that?
https://wiki.archlinux.org/title/Enviro … ng_pam_env
Offline
Those are all the uncommented lines of the pam_env.conf file
XDG_CONFIG_HOME DEFAULT=@{HOME}/.config
XDG_CACHE_HOME DEFAULT=@{HOME}/.cache
XDG_DATA_HOME DEFAULT=@{HOME}/.local/share
XDG_STATE_HOME DEFAULT=@{HOME}/.local/state
PATH DEFAULT=@{HOME}/.bin:${PATH}
PATH DEFAULT=@{HOME}/.local/bin:${PATH}
XCURSOR_SIZE DEFAULT=32
GOPATH DEFAULT=${XDG_DATA_HOME}/go
CALCHISTFILE DEFAULT=${XDG_CACHE_HOME}/calc_history
CARGO_HOME DEFAULT=${XDG_DATA_HOME}/cargo
CCACHE_DIR DEFAULT=${XDG_CACHE_HOME}/ccache
DOTNET_CLI_HOME DEFAULT=${XDG_DATA_HOME}/dotnet
GRADLE_USER_HOME DEFAULT=${XDG_DATA_HOME}/gradle
MBSYNCRC DEFAULT=${XDG_CONFIG_HOME}/isync/mbsyncrc
LESSHISTFILE DEFAULT=${XDG_STATE_HOME}/less/history
NPM_CONFIG_USERCONFIG DEFAULT=${XDG_CONFIG_HOME}/npm/npmrc
NUGET_PACKAGES DEFAULT=${XDG_CACHE_HOME}/NuGetPackages
_JAVA_OPTIONS DEFAULT=-Djava.util.prefs.userRoot=${XDG_CONFIG_HOME}/java
RANDFILE DEFAULT=${XDG_STATE_HOME}/rnd
PARALLEL_HOME DEFAULT=${XDG_CONFIG_HOME}/parallel
TEXMFVAR DEFAULT=${XDG_CACHE_HOME}/texlive/texmf-var
WINEPREFIX DEFAULT=${XDG_DATA_HOME}/wine
I personally don't see what could be an issue here for the tty.
Offline
Those are all the uncommented lines of the pam_env.conf file
I don't either but it crashes from __asprintf_chk into malloc, so it likely doesn't like some line there, I'd not ignore the commented ones and also there may be stray non-printable characters (eg. CR)
I'd first move the file away and see whether it's the cause, then bisect it by restoring half of it
From what's there, I'd be worried about the ${PATH} reference.
Offline
It is indeed the path reference. Removing either line of the PATH definition let's me login.
I'm not sure if both paths just have conflicts or if there is just some syntax issues with defining path twice. I tried putting them to a single line, but that didn't work either:
PATH DEFAULT=@{HOME}/.bin:@{HOME}/.local/bin:${PATH}
Offline
Seems like even trying to add 2 paths either in a single line, produces this issue.
I tested this with an empty folder added as the second path.
If that is simply the case I'm not sure how I supposed to setup my path via pam_env. Or maybe I just shouldn't do that? Is there a better alternative for setting the user PATH env var that is NOT the shell profile?
Offline
I'd concern that ${PATH} isn't defined and would try to just omit it and /etc/profile to hopefully extend it.
That being said, you could just as much extend the $PATH in some /etc/profile.d/ drop-in?
Offline
Isn't profile.d only for the login shell though?
Offline
Ok profile.d seems the right place for this. I removed the path from the pam_env and everything is fine now.
Thanks a lot!
On that note does it makes sense to define the rest of the variables from the pam_env in the profile.d as well? I'm not quite sure what actually belongs in pam_env.
Offline
I'm not using pam_env at all - there's virtually no login shell that doesn't source /etc/profile and everything else inherits it from there, your locale is set this way.
Edit:
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 (2024-10-19 20:11:45)
Offline
Pages: 1