sftpman-gtk icon indicating copy to clipboard operation
sftpman-gtk copied to clipboard

Segmentation fault and core dump upon launching

Open akwala opened this issue 2 years ago • 2 comments

Happens with Python 3.8, 3.9, 3.10.

Any suggestions for troubleshooting?

akwala avatar Mar 02 '22 01:03 akwala

I'm currently on Python 3.10, but I've gone through all these Python versions and I haven't encountered a segmentation fault yet.

Perhaps if you run it with strace (e.g. strace sftpman-gtk), it might tell us more?

spantaleev avatar Mar 02 '22 06:03 spantaleev

I now have Python installs of 3.8, 3.9 and 3.10 freshly built from source. sftpman-gtk runs fine with 3.8, but segfaults with 3.9 and 3.10 immediately after launching and showing the GUI for a split second. Both segfaults happen after the second read of the mount config *.json files.

Tail of strace sftpman-gtk with Python 3.9:

stat("/home/user/.config/sftpman/mounts/", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
pipe2([11, 12], O_CLOEXEC)              = 0
fstat(11, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
ioctl(11, TCGETS, 0x7fff7d96d790)       = -1 ENOTTY (Inappropriate ioctl for device)
lseek(11, 0, SEEK_CUR)                  = -1 ESPIPE (Illegal seek)
pipe2([13, 14], O_CLOEXEC)              = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f72085d4550) = 2775472
close(14)                               = 0
close(12)                               = 0
read(13, "", 50000)                     = 0
close(13)                               = 0
lseek(11, 0, SEEK_CUR)                  = -1 ESPIPE (Illegal seek)
fstat(11, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
read(11, "Mount1.json\nMount2.json\nMount3.j"..., 8192) = 36
read(11, "", 8156)                      = 0
close(11)                               = 0
wait4(2775472, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 2775472
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x8} ---
+++ killed by SIGSEGV (core dumped) +++

Tail of strace sftpman-gtk with Python 3.10:

stat("/home/user/.config/sftpman/mounts/", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
pipe2([11, 12], O_CLOEXEC)              = 0
fstat(11, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
ioctl(11, TCGETS, 0x7ffe5a3ecc40)       = -1 ENOTTY (Inappropriate ioctl for device)
lseek(11, 0, SEEK_CUR)                  = -1 ESPIPE (Illegal seek)
pipe2([13, 14], O_CLOEXEC)              = 0
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0
vfork()                                 = 2775881
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
close(14)                               = 0
close(12)                               = 0
read(13, "", 50000)                     = 0
close(13)                               = 0
lseek(11, 0, SEEK_CUR)                  = -1 ESPIPE (Illegal seek)
fstat(11, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
read(11, "Mount1.json\nMount2.json\nMount3.j"..., 8192) = 36
read(11, "", 8156)                      = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2775881, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
close(11)                               = 0
wait4(2775881, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 2775881
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x8} ---
+++ killed by SIGSEGV (core dumped) +++

akwala avatar Mar 03 '22 22:03 akwala