nakst / gf

A GDB frontend for Linux.
MIT License
1.73k stars 58 forks source link

When trying to use the `[pipe]` feature I get a segfault #166

Open mundusnine opened 9 months ago

mundusnine commented 9 months ago

When using a gf2_config.ini that looks like this:

[pipe]
control=/run/media/winesap/DATA/repos/cosmo-test/build/gf_pipe.dat

I get a segfault when running gf2. I am using: Linux winesapos 6.1.52-1-lts, that's Arch btw.

When I strace gf2 I get this output, I only kept the most important part. What I can gather is that when it finds [pipe] with a valid control, it tries to open a .project.gf. If I don't have a .project.gf it crash's and I tried using a valid .project.gf but it still segfaulted. The .dat file exists, I made sure.

getcwd("/run/media/winesap/DATA/repos/cosmo-test/gf", 4096) = 44
openat(AT_FDCWD, "/home/winesap/.config/gf2_config.ini", O_RDONLY) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=276, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=276, ...}, AT_EMPTY_PATH) = 0
lseek(3, 0, SEEK_SET)                   = 0
read(3, "[pipe]\ncontrol=/run/media/winesa"..., 276) = 276
lseek(3, 276, SEEK_SET)                 = 276
close(3)                                = 0
mknodat(AT_FDCWD, "/run/media/winesap/DATA/repos/cosmo-test/build/gf_pipe.dat", S_IFIFO|0666) = -1 EEXIST (File exists)
rt_sigaction(SIGRT_1, {sa_handler=0x7fd5a8489d10, sa_mask=[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7fd5a843e710}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
mmap(NULL, 8392704, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7fd5a78e6000
mprotect(0x7fd5a78e7000, 8388608, PROT_READ|PROT_WRITE) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8)   = 0
clone3({flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, child_tid=0x7fd5a80e6990,
=0x7fd5a78e6000, stack_size=0x7fff80, tls=0x7fd5a80e66c0} => {parent_tid=[38113]}, 88) = 38113
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
openat(AT_FDCWD, "/run/media/winesap/DATA/repos/cosmo-test/gf/.project.gf", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "", O_RDONLY)          = -1 ENOENT (No such file or directory)
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0) = 3
connect(3, {sa_family=AF_UNIX, sun_path=@"/tmp/.X11-unix/X0"}, 20) = ?
+++ killed by SIGSEGV (core dumped) +++
Segmentation fault (core dumped)
mundusnine commented 9 months ago

Upon further debugging the debugger, it seems like a threading issue maybe ?: image