javalsai / lidm

A โœจfullyโœจ colorful customizable TUI display manager made in C for simplicity.
GNU General Public License v3.0
11 stars 4 forks source link

Core dumped #3

Open DeaDvey opened 1 month ago

DeaDvey commented 1 month ago

Error message: Aborted (Core Dumped)

image fix pls

javalsai commented 1 month ago

Bro's bored fr ๐Ÿ’€

javalsai commented 1 month ago

Idk how C devs do this, but ig I need that core dumped, unless you wanna debug urself

DeaDvey commented 1 month ago

Ok

Pickzelle commented 1 month ago

lmao broken app, massive L ( อกยฐ อœส– อกยฐ)

DeaDvey commented 1 month ago

lmao broken app, massive L ( อกยฐ อœส– อกยฐ)

fr, imagine being a dumb penguin who can't even right funcitonal C code.

javalsai commented 1 month ago

lmao broken app, massive L ( อกยฐ อœส– อกยฐ)

fr, imagine being a dumb penguin who can't even right funcitonal C code.

๐Ÿ˜ญ๐Ÿ˜ญ Bro's taking advantage of being outside of discord fr

DeaDvey commented 1 month ago

lmao broken app, massive L ( อกยฐ อœส– อกยฐ)

fr, imagine being a dumb penguin who can't even right funcitonal C code.

๐Ÿ˜ญ๐Ÿ˜ญ Bro's taking advantage of being outside of discord fr

What's Discord, I'm just a random user of your code.

DeaDvey commented 1 month ago

lmao broken app, massive L ( อกยฐ อœส– อกยฐ)

fr, imagine being a dumb penguin who can't even right funcitonal C code.

๐Ÿ˜ญ๐Ÿ˜ญ Bro's taking advantage of being outside of discord fr

What's Discord, I'm just a random user of your code.

How far back can a quote chain go?

DeaDvey commented 1 month ago

lmao broken app, massive L ( อกยฐ อœส– อกยฐ)

fr, imagine being a dumb penguin who can't even right funcitonal C code.

๐Ÿ˜ญ๐Ÿ˜ญ Bro's taking advantage of being outside of discord fr

What's Discord, I'm just a random user of your code.

How far back can a quote chain go?

Sha256 sum is 6c4986c09449290ba1a8385c9219fb055af003e10d8c3aae2e4393bf76eb1594

javalsai commented 1 month ago

lmao broken app, massive L ( อกยฐ อœส– อกยฐ)

fr, imagine being a dumb penguin who can't even right funcitonal C code.

๐Ÿ˜ญ๐Ÿ˜ญ Bro's taking advantage of being outside of discord fr

What's Discord, I'm just a random user of your code.

How far back can a quote chain go?

Sha256 sum is 6c4986c09449290ba1a8385c9219fb055af003e10d8c3aae2e4393bf76eb1594

Exact git commit? And coredump pls? (idk how to use gdb, it's gonna be fun)

DeaDvey commented 1 month ago

Should I clone again?

javalsai commented 1 month ago

Should I clone again?

Naw, shouldn't have segfaulted in any commit, just wanna know in which one it was exactly, did small code changes lately

DeaDvey commented 1 month ago

Should I clone again?

Naw, shouldn't have segfaulted in any commit, just wanna know in which one it was exactly, did small code changes lately

Most recent commit says Aborted (core dumped)

DeaDvey commented 1 month ago

Should I clone again?

Naw, shouldn't have segfaulted in any commit, just wanna know in which one it was exactly, did small code changes lately

Most recent commit says Aborted (core dumped)

I'm pro choice, but I really am annoyed by this one.

javalsai commented 1 month ago

Should I clone again?

Naw, shouldn't have segfaulted in any commit, just wanna know in which one it was exactly, did small code changes lately

Most recent commit says Aborted (core dumped)

I'm pro choice, but I really am annoyed by this one.

๐Ÿ’€ (I get 81e02... sha256sum on last commit build, same?)

DeaDvey commented 1 month ago

Should I clone again?

Naw, shouldn't have segfaulted in any commit, just wanna know in which one it was exactly, did small code changes lately

Most recent commit says Aborted (core dumped)

I'm pro choice, but I really am annoyed by this one.

๐Ÿ’€ (I get 81e02... sha256sum on last commit build, same?)

I get > cat lidm | sha256sum 3ef719e6aa9763a7492181ffa4ce79fab0a6deb0e33b521d5aede4a3ca2dd276 -

DeaDvey commented 1 month ago

From

Should I clone again?

Naw, shouldn't have segfaulted in any commit, just wanna know in which one it was exactly, did small code changes lately

Most recent commit says Aborted (core dumped)

I'm pro choice, but I really am annoyed by this one.

๐Ÿ’€ (I get 81e02... sha256sum on last commit build, same?)

I get > cat lidm | sha256sum 3ef719e6aa9763a7492181ffa4ce79fab0a6deb0e33b521d5aede4a3ca2dd276 -

Fromm the one I compiled myselg

javalsai commented 1 month ago

Different result, prob some distro compiler optimizations... shouldn't make a different debugging tho. Also, CAT ABUSE ๐Ÿ—ฃ๏ธ๐Ÿ—ฃ๏ธ Just give me the dumped core plss

DeaDvey commented 1 month ago

Different result, prob some distro compiler optimizations... shouldn't make a different debugging tho. Also, CAT ABUSE ๐Ÿ—ฃ๏ธ๐Ÿ—ฃ๏ธ Just give me the dumped core plss

Where is that?

javalsai commented 1 month ago

Different result, prob some distro compiler optimizations... shouldn't make a different debugging tho. Also, CAT ABUSE ๐Ÿ—ฃ๏ธ๐Ÿ—ฃ๏ธ Just give me the dumped core plss

Where is that?

ยฏ_(ใƒ„)_/ยฏ either systemd managed that or it's in your current dir, but forget it, the error is in src/sessions.c:55 (mfw I forget \n). Can you tree /usr/share/xsessions and /usr/share/wayland-sessions ? Permissions too? Or if you can just send those to me I can replicate the issue in a sec.

javalsai commented 1 month ago

Weird tho, the error should include the path that fails to open, but empty string? tf is ftw() doing?

DeaDvey commented 1 month ago

/usr/share/wayland-sessions โ”œโ”€โ”€ default.desktop -> /etc/alternatives/default-waylandsession.desktop โ”œโ”€โ”€ gnome-classic.desktop โ”œโ”€โ”€ gnome-classic-wayland.desktop โ”œโ”€โ”€ gnome.desktop โ”œโ”€โ”€ gnome-wayland.desktop โ”œโ”€โ”€ hyprland.desktop โ”œโ”€โ”€ niri.desktop โ”œโ”€โ”€ plasmawayland.desktop โ””โ”€โ”€ weston.desktop

Different result, prob some distro compiler optimizations... shouldn't make a different debugging tho. Also, CAT ABUSE ๐Ÿ—ฃ๏ธ๐Ÿ—ฃ๏ธ Just give me the dumped core plss

Where is that?

ยฏ(ใƒ„)/ยฏ either systemd managed that or it's in your current dir, but forget it, the error is in src/sessions.c:55 (mfw I forget \n). Can you tree /usr/share/xsessions and /usr/share/wayland-sessions ? Permissions too? Or if you can just send those to me I can replicate the issue in a sec.

/usr/share/xsessions โ”œโ”€โ”€ default.desktop -> /etc/alternatives/default-xsession.desktop โ”œโ”€โ”€ gnome-classic.desktop โ”œโ”€โ”€ gnome-classic-xorg.desktop โ”œโ”€โ”€ gnome.desktop โ”œโ”€โ”€ gnome-xorg.desktop โ”œโ”€โ”€ icewm.desktop โ”œโ”€โ”€ icewm-session.desktop -> icewm.desktop โ”œโ”€โ”€ kde-plasma.desktop -> plasma6.desktop โ”œโ”€โ”€ openbox.desktop โ”œโ”€โ”€ openbox-kde.desktop โ”œโ”€โ”€ plasma6.desktop โ””โ”€โ”€ xfce.desktop

javalsai commented 1 month ago

It's gonna be a double free of reading session files right?

javalsai commented 1 month ago

@DeaDvey can you strace ./lidm 2> /some/log/path and then just grep open /some/log/path?? I just care about the last few ones.

DeaDvey commented 1 month ago

@DeaDvey can you strace ./lidm 2> /some/log/path and then just grep open /some/log/path?? I just care about the last few ones.

What log path?

javalsai commented 1 month ago

@DeaDvey can you strace ./lidm 2> /some/log/path and then just grep open /some/log/path?? I just care about the last few ones.

What log path?

anything, you can just put it in /tmp

DeaDvey commented 1 month ago

@DeaDvey can you strace ./lidm 2> /some/log/path and then just grep open /some/log/path?? I just care about the last few ones.

What log path?

anything, you can just put it in /tmp

I'm confused

javalsai commented 1 month ago

@DeaDvey can you strace ./lidm 2> /some/log/path and then just grep open /some/log/path?? I just care about the last few ones.

What log path?

anything, you can just put it in /tmp

I'm confused

strace ./lidm 2> /tmp/lidm.log will run lidm but list syscalls into /tmp/lidm.log (what strace does)

grep open /tmp/lidm.log will grab the lines that have open in it (opened files), I just wanna knoe which wae the last file opened, I think it's a logic error freeing after parsing that session file

DeaDvey commented 1 month ago

grep open /tmp/lidm.log

gotcha, a lot of lines

openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/lib64/libpam.so.0", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/lib64/libpam_misc.so.0", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/lib64/libaudit.so.1", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/lib64/libeconf.so.0", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/etc/lidm.ini", O_RDONLY) = 3 openat(AT_FDCWD, "/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 4 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 4 openat(AT_FDCWD, "/lib64/libnss_compat.so.2", O_RDONLY|O_CLOEXEC) = 4 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 4 openat(AT_FDCWD, "/lib64/glibc-hwcaps/x86-64-v3/libnss_nis.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib64/glibc-hwcaps/x86-64-v2/libnss_nis.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib64/libnss_nis.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib64/glibc-hwcaps/x86-64-v3/libnss_nis.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib64/glibc-hwcaps/x86-64-v2/libnss_nis.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib64/libnss_nis.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 4 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 5 openat(AT_FDCWD, "/lib64/libnss_systemd.so.2", O_RDONLY|O_CLOEXEC) = 5 openat(AT_FDCWD, "/lib64/libcap.so.2", O_RDONLY|O_CLOEXEC) = 5 openat(AT_FDCWD, "/run/systemd/userdb/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 5 openat(AT_FDCWD, "/", O_RDONLY|O_CLOEXEC|O_PATH|O_DIRECTORY) = 5 openat(5, "/", O_RDONLY|O_CLOEXEC|O_PATH|O_DIRECTORY) = 9 openat(AT_FDCWD, "/", O_RDONLY|O_CLOEXEC|O_PATH|O_DIRECTORY) = 10 openat(9, "etc", O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_PATH) = 11 openat(11, "userdb", O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_PATH) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/", O_RDONLY|O_CLOEXEC|O_PATH|O_DIRECTORY) = 5 openat(5, "/", O_RDONLY|O_CLOEXEC|O_PATH|O_DIRECTORY) = 9 openat(AT_FDCWD, "/", O_RDONLY|O_CLOEXEC|O_PATH|O_DIRECTORY) = 10 openat(9, "run", O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_PATH) = 11 openat(11, "userdb", O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_PATH) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/", O_RDONLY|O_CLOEXEC|O_PATH|O_DIRECTORY) = 5 openat(5, "/", O_RDONLY|O_CLOEXEC|O_PATH|O_DIRECTORY) = 9 openat(AT_FDCWD, "/", O_RDONLY|O_CLOEXEC|O_PATH|O_DIRECTORY) = 10 openat(9, "run", O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_PATH) = 11 openat(11, "host", O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_PATH) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/", O_RDONLY|O_CLOEXEC|O_PATH|O_DIRECTORY) = 5 openat(5, "/", O_RDONLY|O_CLOEXEC|O_PATH|O_DIRECTORY) = 9 openat(AT_FDCWD, "/", O_RDONLY|O_CLOEXEC|O_PATH|O_DIRECTORY) = 10 openat(9, "usr", O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_PATH) = 11 openat(11, "local", O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_PATH) = 9 openat(9, "lib", O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_PATH) = 11 openat(11, "userdb", O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_PATH) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/", O_RDONLY|O_CLOEXEC|O_PATH|O_DIRECTORY) = 5 openat(5, "/", O_RDONLY|O_CLOEXEC|O_PATH|O_DIRECTORY) = 9 openat(AT_FDCWD, "/", O_RDONLY|O_CLOEXEC|O_PATH|O_DIRECTORY) = 10 openat(9, "usr", O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_PATH) = 11 openat(11, "lib", O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_PATH) = 9 openat(9, "userdb", O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_PATH) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/proc/sys/kernel/random/boot_id", O_RDONLY|O_NOCTTY|O_CLOEXEC) = 5 openat(AT_FDCWD, "/usr/share/xsessions", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 5 openat(AT_FDCWD, "/usr/share/xsessions/default.desktop", O_RDONLY) = 6 openat(AT_FDCWD, "/usr/share/xsessions/icewm-session.desktop", O_RDONLY) = 6 openat(AT_FDCWD, "/usr/share/xsessions/icewm.desktop", O_RDONLY) = 6 openat(AT_FDCWD, "/usr/share/xsessions/gnome-xorg.desktop", O_RDONLY) = 6 openat(AT_FDCWD, "/usr/share/xsessions/gnome.desktop", O_RDONLY) = 6 newfstatat(5, "openbox.desktop", {st_mode=S_IFREG|0644, st_size=4076, ...}, 0) = 0 openat(AT_FDCWD, "/usr/share/xsessions/openbox.desktop", O_RDONLY) = 6 newfstatat(5, "openbox-kde.desktop", {st_mode=S_IFREG|0644, st_size=190, ...}, 0) = 0 openat(AT_FDCWD, "/usr/share/xsessions/openbox-kde.desktop", O_RDONLY) = 6 openat(AT_FDCWD, "/usr/share/xsessions/kde-plasma.desktop", O_RDONLY) = 6 openat(AT_FDCWD, "/usr/share/xsessions/gnome-classic-xorg.desktop", O_RDONLY) = 6 openat(AT_FDCWD, "/usr/share/xsessions/gnome-classic.desktop", O_RDONLY) = 6 openat(AT_FDCWD, "/usr/share/xsessions/xfce.desktop", O_RDONLY) = 6 openat(AT_FDCWD, "/usr/share/xsessions/plasma6.desktop", O_RDONLY) = 6 openat(AT_FDCWD, "/usr/share/wayland-sessions", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 5 openat(AT_FDCWD, "/usr/share/wayland-sessions/default.desktop", O_RDONLY) = 6 openat(AT_FDCWD, "/usr/share/wayland-sessions/gnome-wayland.desktop", O_RDONLY) = 6 openat(AT_FDCWD, "/usr/share/wayland-sessions/gnome.desktop", O_RDONLY) = 6 openat(AT_FDCWD, "/usr/share/wayland-sessions/hyprland.desktop", O_RDONLY) = 6 openat(AT_FDCWD, "/usr/share/wayland-sessions/weston.desktop", O_RDONLY) = 6 openat(AT_FDCWD, "\1", O_RDONLY) = -1 ENOENT (No such file or directory) write(2, "error opening file (r) \1", 24error opening file (r) ) = 24 openat(AT_FDCWD, "\1", O_RDONLY) = -1 ENOENT (No such file or directory) write(2, "error opening file (r) \1", 24error opening file (r) ) = 24 openat(AT_FDCWD, "\1", O_RDONLY) = -1 ENOENT (No such file or directory) write(2, "error opening file (r) \1", 24error opening file (r) ) = 24 openat(AT_FDCWD, "\1", O_RDONLY) = -1 ENOENT (No such file or directory) write(2, "error opening file (r) \1", 24error opening file (r) ) = 24

DeaDvey commented 1 month ago

niri is the last thing to load

DeaDvey commented 1 month ago

Still core dumps without niri

javalsai commented 1 month ago

Still core dumps without niri

then it might be oyher free after that

DeaDvey commented 1 month ago

Still core dumps without niri

then it might be oyher free after that

Yeah, now it's gnome that's last

DeaDvey commented 1 month ago

Still core dumps without niri

then it might be oyher free after that

Yeah, now it's gnome that's last

newfstatat(5, "gnome-classic-wayland.desktop", {st_mode=S_IFREG|0644, st_size=8060, ...}, 0) = 0
openat(AT_FDCWD, "\1", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "error opening file (r) \1", 24error opening file (r) ^A) = 24
newfstatat(5, "gnome-classic.desktop", {st_mode=S_IFREG|0644, st_size=8045, ...}, 0) = 0
openat(AT_FDCWD, "\1", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "error opening file (r) \1", 24error opening file (r) ^A) = 24
newfstatat(5, "plasmawayland.desktop", {st_mode=S_IFREG|0644, st_size=3783, ...}, 0) = 0
openat(AT_FDCWD, "\1", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "error opening file (r) \1", 24error opening file (r) ^A) = 24
getdents64(5, 0x2634a380 / 0 entries /, 32768) = 0
close(5) = 0
writev(2, [{iov_base="double free or corruption (out)", iov_len=31}, {iov_base="\n", iov_len=1}], 2double free or corruption (out)
) = 32
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f74df31d000
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
gettid() = 264694
getpid() = 264694
tgkill(264694, 264694, SIGABRT) = 0
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=264694, si_uid=1000} ---
+++ killed by SIGABRT (core dumped) +++

javalsai commented 1 month ago

@DeaDvey ur gonna love this... can you uncomment last 3 lines (int ret...execl(..);) within src/main.cz make and see if it still breaks?? ๐Ÿฅฐ๐Ÿฅฐ๐Ÿฅฐ

DeaDvey commented 1 month ago

@DeaDvey ur gonna love this... can you uncomment last 3 lines (int ret...execl(..);) within src/main.cz make and see if it still breaks?? ๐Ÿฅฐ๐Ÿฅฐ๐Ÿฅฐ

Still core dumps:

image image

javalsai commented 1 month ago

doesn't make sense, opening files is sequential, last opened file fails to open, which just returns the function and the only thing it does after is 1 realloc and 2 variable assignations, no double free unless the last file to open didn't fail to (which isn't the case, but it'd be a logic error parsing the file, I'm looking at it and I can't see any possible double free)

DeaDvey commented 1 month ago

doesn't make sense, opening files is sequential, last opened file fails to open, which just returns the function and the only thing it does after is 1 realloc and 2 variable assignations, no double free unless the last file to open didn't fail to (which isn't the case, but it'd be a logic error parsing the file, I'm looking at it and I can't see any possible double free)

Yo

DeaDvey commented 1 month ago

I uninstall xfce4-session and all the gnome sessions on openSUSE Should I close?

javalsai commented 1 month ago

doesn't make sense, opening files is sequential, last opened file fails to open, which just returns the function and the only thing it does after is 1 realloc and 2 variable assignations, no double free unless the last file to open didn't fail to (which isn't the case, but it'd be a logic error parsing the file, I'm looking at it and I can't see any possible double free)

Yo

So uninstalling all of gnome and xfce4 fixed it, openSUSE right?

javalsai commented 1 month ago

Either too many found sessions doing malloc funny, or some weird desktop file in there.

DeaDvey commented 1 month ago

idk

javalsai commented 1 month ago

idk

I'll try to replicate it in a VM tomorrow and if I can't I'll just close it until anyone reproduces it again.

DeaDvey commented 1 month ago

yo im bak baybay

ErrorNoInternet commented 1 month ago

ulimit -c 100000000; lidm; coredumpctl debug (set core dump file size limit & open last coredump in gdb)

then bt -full in gdb and send output