After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 754921 - segfault-> error 4 in libc-2.17.so
segfault-> error 4 in libc-2.17.so
Status: RESOLVED OBSOLETE
Product: Pan
Classification: Other
Component: general
pre-1.0 betas
Other Linux
: Normal critical
: ---
Assigned To: pan-maint
pan-maint
Depends on:
Blocks:
 
 
Reported: 2015-09-12 12:44 UTC by Robert McConnell
Modified: 2018-09-21 16:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Robert McConnell 2015-09-12 12:44:50 UTC
Pan crashes while viewing message headers. Multi-byte characters in the subject line appear to be the cause. The full text of the entry in /var/log/messages is

pan[15197]: segfault at 0 ip b684eca3 sp bf7fffcc error 4 in libc-2.17.so[b67ce000+186000]

pan 0.139
Slackware 14.1 (32 bit)
XFCE
Intel Pentium 4 - 2.80GHz

Normally I am able to work around this by running a Perl one-liner on the group file. But occasionally even this doesn't fix the problem. The script is:

# perl -i.bk -pe 's/[^[:ascii:]]/*/g;' alt.binaries.sounds.lossless.jazz

The instant issue is with the above listed newsgroup after wiping the old groups file and downloading the past 480 days of headers from newsdemon.com.
Comment 1 detlef.graef 2016-03-29 12:04:40 UTC
Can you please check if this error still occurs with the current version 0.140 of Pan?

If yes, can you please start Pan with the option --debug and report the output before the crash?

How can the problem be currently reproduced? Which newsgroup has to be fetched?
Comment 2 Dominique Dumont 2017-09-17 10:24:22 UTC
A user on Debian has reported a similar issue:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=875617

This report provides a debug log and a full backtrace of the crash.

Hope this helps
Comment 3 Vincent S. Cojot 2018-02-01 22:43:06 UTC
I started getting similar crashes just today (RHEL 7.4, pan-0.144 built from source as an rpm):

[356534.442097] pan[29272]: segfault at 0 ip 00007f015e6e2d67 sp 00007ffc46afad40 error 4 in libc-2.17.so[7f015e6a9000+1b8000]
[356538.476458] pan[29347]: segfault at 0 ip 00007f4f3dda3d67 sp 00007ffda2ac16f0 error 4 in libc-2.17.so[7f4f3dd6a000+1b8000]

I installed the self-built pan-debuginfo rpm and here's what I got when I started 'pan' under gdb:
$ gdb pan
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-100.el7_4.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/pan...(no debugging symbols found)...done.
(gdb) r
Starting program: /bin/pan 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".
[New Thread 0x7fffe645d700 (LWP 30278)]
[New Thread 0x7fffe5c5c700 (LWP 30279)]
[New Thread 0x7fffe545b700 (LWP 30280)]
[New Thread 0x7fffe4c5a700 (LWP 30281)]

Program received signal SIGSEGV, Segmentation fault.
__GI_____strtol_l_internal (nptr=0x0, endptr=0x0, base=10, group=<optimized out>, loc=0x7ffff3ec1060 <_nl_global_locale>) at ../stdlib/strtol_l.c:298
298       while (ISSPACE (*s))
Missing separate debuginfos, use: debuginfo-install adwaita-gtk2-theme-3.22.2-1.el7.x86_64 atk-2.22.0-3.el7.x86_64 cairo-1.14.8-2.el7.x86_64 enchant-1.6.0-8.el7.x86_64 expat-2.1.0-10.el7_3.x86_64 fontconfig-2.10.95-11.el7.x86_64 freetype-2.4.11-15.el7.x86_64 gdk-pixbuf2-2.36.5-1.el7.x86_64 glib-networking-2.50.0-1.el7.x86_64 glib2-2.50.3-3.el7.x86_64 gmime-2.6.19-1.el7.x86_64 gmp-6.0.0-15.el7.x86_64 gnutls-3.3.26-9.el7.x86_64 graphite2-1.3.10-1.el7_3.x86_64 gtk2-2.24.31-1.el7.x86_64 gtkspell-2.0.16-8.el7.x86_64 gvfs-client-1.30.4-3.el7.x86_64 harfbuzz-1.3.2-1.el7.x86_64 libX11-1.6.5-1.el7.x86_64 libXau-1.0.8-2.1.el7.x86_64 libXcomposite-0.4.4-4.1.el7.x86_64 libXcursor-1.1.14-8.el7.x86_64 libXdamage-1.1.4-4.1.el7.x86_64 libXext-1.3.3-3.el7.x86_64 libXfixes-5.0.3-1.el7.x86_64 libXi-1.7.9-1.el7.x86_64 libXinerama-1.1.3-2.1.el7.x86_64 libXrandr-1.5.1-2.el7.x86_64 libXrender-0.9.10-1.el7.x86_64 libXxf86vm-1.1.4-1.el7.x86_64 libblkid-2.23.2-43.el7_4.2.x86_64 libdrm-2.4.74-1.el7.x86_64 libffi-3.0.13-18.el7.x86_64 libgcc-4.8.5-16.el7_4.1.x86_64 libmodman-2.0.1-8.el7.x86_64 libmount-2.23.2-43.el7_4.2.x86_64 libpng-1.5.13-7.el7_2.x86_64 libproxy-0.4.11-10.el7.x86_64 libselinux-2.5-11.el7.x86_64 libstdc++-4.8.5-16.el7_4.1.x86_64 libtasn1-4.10-1.el7.x86_64 libthai-0.1.14-9.el7.x86_64 libuuid-2.23.2-43.el7_4.2.x86_64 libxcb-1.12-1.el7.x86_64 libxshmfence-1.2-1.el7.x86_64 mesa-libEGL-17.0.1-6.20170307.el7.x86_64 mesa-libGL-17.0.1-6.20170307.el7.x86_64 mesa-libgbm-17.0.1-6.20170307.el7.x86_64 mesa-libglapi-17.0.1-6.20170307.el7.x86_64 nettle-2.7.1-8.el7.x86_64 p11-kit-0.23.5-3.el7.x86_64 pango-1.40.4-1.el7.x86_64 pcre-8.32-17.el7.x86_64 pixman-0.34.0-1.el7.x86_64 zlib-1.2.7-17.el7.x86_64
Comment 4 Vincent S. Cojot 2018-02-01 22:43:54 UTC
The full backtrace shows:
(gdb) bt
  • #0 __GI_____strtol_l_internal
    at ../stdlib/strtol_l.c line 298
  • #1 pan::DataImpl::load_headers(pan::DataIO const&, pan::Quark const&)
  • #2 pan::DataImpl::ref_group(pan::Quark const&)
  • #3 pan::DataImpl::MyTree::MyTree(pan::DataImpl&, pan::Quark const&, pan::Quark const&, pan::Data::ShowType, pan::FilterInfo const*, pan::RulesInfo const*)
  • #4 pan::DataImpl::group_get_articles(pan::Quark const&, pan::Quark const&, pan::Data::ShowType, pan::FilterInfo const*, pan::RulesInfo const*) const
  • #5 pan::HeaderPane::set_group(pan::Quark const&)
  • #6 pan::GUI::do_read_selected_group()
  • #7 g_closure_invoke
  • #8 signal_emit_unlocked_R
  • #9 g_signal_emit_valist
  • #10 g_signal_emit
  • #11 _gtk_action_emit_activate
  • #12 pan::GroupPane::read_group(pan::StringView const&)
  • #13 pan::GUI::root_realized_cb(_GtkWidget*, void*)
  • #14 g_closure_invoke
  • #15 signal_emit_unlocked_R
  • #16 g_signal_emit_valist
  • #17 g_signal_emit
  • #18 gtk_widget_realize
  • #19 gtk_widget_map
  • #20 gtk_window_map
  • #21 g_closure_invoke
  • #22 signal_emit_unlocked_R
  • #23 g_signal_emit_valist
  • #24 g_signal_emit
  • #25 gtk_widget_map
  • #26 gtk_window_show
  • #27 g_closure_invoke
  • #28 signal_emit_unlocked_R
  • #29 g_signal_emit_valist
  • #30 g_signal_emit
  • #31 gtk_widget_show
  • #32 main

Comment 5 Vincent S. Cojot 2018-02-01 22:51:50 UTC
Here's a workaround that worked for me:

invoke pan under 'strace':
strace -f -s1024 pan

see where it crashes:
[pid  9344] access("/export/home/raistlin/.pan2/groups/alt.binaries.dvd.classics", F_OK) = 0
[pid  9344] open("/export/home/raistlin/.pan2/groups/alt.binaries.dvd.classics", O_RDONLY) = 6
[pid  9344] fstat(6, {st_mode=S_IFREG|0600, st_size=3528009, ...}) = 0
[pid  9344] mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe98c69d000
[pid  9344] read(6, "#\n# This file has three sections.\n#\n# A. A shorthand table for the most frequent groups in the xrefs.\n#    The first line tells the number of elements to follow,\n#    then one line per entry with a one-character shorthand and full name.\n#\n# B. A shorthand table for the most freqent author names.\n#    This is formatted just like the other shorthand table.\n#    (sorted by post count, so it's also a most-frequent-posters list...)\n#\n# C. The group's headers section.\n#    The first line tells the number of articles to follow,\n#    then articles which each have the following lines:\n#    1. message-id\n#    2. subject\n#    3. author\n#    4. references. This line is omitted if the Article has an empty References header.\n#    5. time-posted. This is a time_t (see http://en.wikipedia.org/wiki/Unix_time)\n#    6. xref line, server1:group1:number1 server2:group2:number2 ...\n#    7. has-attachments [parts-total-count parts-found-count] line-count\n#       If has-attachments isn't 't' (for true), fields 2 and 3 are omitted.\n#"..., 8192) = 8192
[pid  9344] read(6, "1\n\t116 <part116of290.ieboD$qYj&P$8FlVfo3z@597000795> 258780\n\t117 <part117of290.ieboD$qYj&P$8FlVfo3z@597000795> 258349\n\t118 <part118of290.ieboD$qYj&P$8FlVfo3z@597000795> 258725\n\t119 <part119of290.ieboD$qYj&P$8FlVfo3z@597000795> 258663\n\t120 <part120of290.ieboD$qYj&P$8FlVfo3z@597000795> 258624\n\t121 <part121of290.ieboD$qYj&P$8FlVfo3z@597000795> 258548\n\t122 <part122of290.ieboD$qYj&P$8FlVfo3z@597000795> 258411\n\t123 <part123of290.ieboD$qYj&P$8FlVfo3z@597000795> 258360\n\t124 <part124of290.ieboD$qYj&P$8FlVfo3z@597000795> 258764\n\t125 <part125of290.ieboD$qYj&P$8FlVfo3z@597000795> 258641\n\t126 <part126of290.ieboD$qYj&P$8FlVfo3z@597000795> 258490\n\t127 <part127of290.ieboD$qYj&P$8FlVfo3z@597000795> 258135\n\t128 <part128of290.ieboD$qYj&P$8FlVfo3z@597000795> 258726\n\t129 <part129of290.ieboD$qYj&P$8FlVfo3z@597000795> 258574\n\t130 <part130of290.ieboD$qYj&P$8FlVfo3z@597000795> 258609\n\t131 <part131of290.ieboD$qYj&P$8FlVfo3z@597000795> 258204\n\t132 <part132of290.ieboD$qYj&P$8FlVfo3z@597000795> 258351\n\t133 <part133of290.ieboD$qYj&P$8FlVf"..., 8192) = 8192
[pid  9344] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0} ---
[pid  9348] +++ killed by SIGSEGV +++
[pid  9347] +++ killed by SIGSEGV +++
[pid  9345] +++ killed by SIGSEGV +++
[pid  9346] +++ killed by SIGSEGV +++
+++ killed by SIGSEGV +++

So I just rm'ed that file (it had gotten corrupted, it seems) and pan started.
Comment 6 fer 2018-03-31 20:17:45 UTC
I have the same segfault in libc but this one is probably related to another cause.

As it is, pan is unusable in Fedora 27 as it segfaults 100% of the times on any group header request. This has been tested with pan-0.144, both from the binary distribution and source compiled, and source compiled at the tip of git repo (commit d1057daa3066534dda0f2d045f4d6031d4c95bd2).

This was also tested using different versions of gnutls: 3.5.15-1 and 3.5.18-2(latest).

here's the bt:

(gdb) bt
  • #0 __GI_____strtol_l_internal
    at ../stdlib/strtol_l.c line 292
  • #1 atoi
    at /usr/include/stdlib.h line 248
  • #2 pan::TaskXOver::on_nntp_done(pan::NNTP*, pan::Health, pan::StringView const&)
    at task-xover.cc line 448
  • #3 pan::NNTP::fire_done_func(pan::Health, pan::StringView const&)
    at nntp.cc line 66
  • #4 pan::NNTP::on_socket_error(pan::Socket*)
    at nntp.cc line 308
  • #5 pan::GIOChannelSocketGnuTLS::gio_func(_GIOChannel*, GIOCondition)
    at socket-impl-openssl.cc line 738
  • #6 pan::GIOChannelSocketGnuTLS::gio_func(_GIOChannel*, GIOCondition, void*)
    at socket-impl-openssl.cc line 718
  • #7 pan::GIOChannelSocketGnuTLS::timeout_func(void*)
    at socket-impl-openssl.cc line 704
  • #8 g_timeout_dispatch
  • #9 g_main_dispatch
    at gmain.c line 3142
  • #10 g_main_context_dispatch
    at gmain.c line 3795
  • #11 g_main_context_iterate
    at gmain.c line 3868
  • #12 g_main_loop_run
    at gmain.c line 4064
  • #13 IA__gtk_main
    at gtkmain.c line 1270
  • #14 (anonymous namespace)::mainloop()
    at pan.cc line 103
  • #15 (anonymous namespace)::run_pan_in_window
    at pan.cc line 562
  • #16 main(int, char**)
    at pan.cc line 1127

Comment 7 fer 2018-03-31 20:47:09 UTC
I found a workaround by disabling compression
Comment 8 GNOME Infrastructure Team 2018-09-21 16:01:11 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/pan/issues/59.