lwindolf / liferea

Liferea (Linux Feed Reader), a news reader for GTK/GNOME
https://lzone.de/liferea
GNU General Public License v2.0
817 stars 130 forks source link

Segmentation fault (core dumped) when add tt-rss as source #1261

Open Strubbl opened 1 year ago

Strubbl commented 1 year ago

I am adding a TinyTinyRSS account as source and some seconds after that, liferea crashes. I get the crash with the stable version 1.14.5 and with the latest git commit v1.15.0.r41.g3782fef1-1.

I tried the gdb bt. These are the latest lines of the output:

sys:1: Warning: g_atomic_ref_count_dec: assertion 'old_value > 0' failed 
Thread 1 "liferea" received signal SIGSEGV, Segmentation fault.
__strcmp_avx2 () at ../sysdeps/x86_64/multiarch/strcmp-avx2.S:287
Downloading source file /usr/src/debug/glibc/glibc/string/../sysdeps/x86_64/multiarch/strcmp-avx2.S
287             CMP_R1_S2_ymm (%ymm0, (%rsi), %ymm2, %ymm1) 
(gdb)
(gdb) bt
#0  __strcmp_avx2 () at ../sysdeps/x86_64/multiarch/strcmp-avx2.S:287
#1  0x000055555559c281 in  ()
#2  0x0000555555586048 in node_foreach_child_full ()
#3  0x0000555555586048 in node_foreach_child_full ()
#4  0x000055555559c0ed in  ()
#5  0x000055555558b3be in  ()
#6  0x00007ffff1b75981 in g_main_dispatch (context=0x55555560c220) at ../glib/glib/gmain.c:3460
#7  g_main_context_dispatch (context=0x55555560c220) at ../glib/glib/gmain.c:4200
#8  0x00007ffff1bd2b39 in g_main_context_iterate.isra.0 (context=context@entry=0x55555560c220, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at ../glib/glib/gmain.c:4276
#9  0x00007ffff1b73032 in g_main_context_iteration (context=context@entry=0x55555560c220, may_block=may_block@entry=1) at ../glib/glib/gmain.c:4343
#10 0x00007ffff1dc8ed6 in g_application_run (application=0x555555609af0, argc=<optimized out>, argv=0x7fffffffdfc8) at ../glib/gio/gapplication.c:2573
#11 0x0000555555581f2c in liferea_application_new ()
#12 0x00007ffff1842850 in __libc_start_call_main (main=main@entry=0x5555555723e0 <main>, argc=argc@entry=1, argv=argv@entry=0x7fffffffdfc8) at ../sysdeps/nptl/libc_start_call_main.h:58
#13 0x00007ffff184290a in __libc_start_main_impl
    (main=0x5555555723e0 <main>, argc=1, argv=0x7fffffffdfc8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdfb8) at ../csu/libc-start.c:360
#14 0x0000555555572495 in _start ()
(gdb)
stefanos82 commented 1 year ago

This error drove me nuts in another project and the issue is the return of an invalid pointer by either strdup() or strndup().

You can read the conclusion here, but feel free to go through the entire discussion if you like:

https://github.com/rochus-keller/LeanCreator/issues/5#issuecomment-1476348575

lwindolf commented 1 year ago

@stefanos82 Thanks for the input. Liferea consistently uses g_strdup(). Would you know wether this is also affected? Another possible cause if libc is the suspect would be the XML handling in libxml2 which we cannot change.

@Strubbl As for your problem I tend to not change anything in Liferea if it is the fault of an underlying base library. I really think the library needs to be fixed. So this is actually an upstream bug you should report to the distro's glibc package you use.

stefanos82 commented 1 year ago

@stefanos82 Thanks for the input. Liferea consistently uses g_strdup(). Would you know wether this is also affected?

No idea to be honest with you, I don't use GTK at all :disappointed:

Another possible cause if libc is the suspect would be the XML handling in libxml2 which we cannot change.

You think? That would be an interesting finding.

lwindolf commented 1 year ago

@Strubbl Can you please retest with latest 1.15.3 as it did contain at least one memory fix?