Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 505132 - =net-irc/hexchat-2.9.6.1-r1 : segfault after 'xdcc send'
Summary: =net-irc/hexchat-2.9.6.1-r1 : segfault after 'xdcc send'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Julian Ospald
URL:
Whiteboard:
Keywords: STABLE
Depends on:
Blocks:
 
Reported: 2014-03-20 06:15 UTC by Agostino Sarubbo
Modified: 2014-06-01 20:10 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2014-03-20 06:15:51 UTC
After typing xdcc send, the program segfault:

(gdb) run
Starting program: /usr/bin/hexchat 
warning: Cannot call inferior functions, Linux kernel PaX protection forbids return to non-executable pages!
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 14: reading configurations from ~/.fonts.conf is deprecated.

(hexchat:22328): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

Program received signal SIGSEGV, Segmentation fault.
0x9e257f1b in ?? ()
(gdb) bt
#0  0x9e257f1b in ?? ()                                                                                                                                                             
#1  0x00000000 in ?? ()                                                                                                                                                             


If you need something else, feel free to ask.
It didn't happen in 2.9.5-r1.
Comment 1 Agostino Sarubbo gentoo-dev 2014-03-20 06:16:14 UTC
Portage 2.2.8-r1 (default/linux/x86/13.0, gcc-4.7.3, glibc-2.17, 3.2.52-hardened-r1 i686)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.2.52-hardened-r1-i686-Intel-R-_Celeron-R-_M_CPU_430_@_1.73GHz-with-gentoo-2.2
KiB Mem:     2047972 total,     71924 free
KiB Swap:    2097148 total,   2095588 free
Timestamp of tree: Sun, 16 Mar 2014 16:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5-r3
dev-util/cmake:           2.8.11.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.12.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo ago x-portage
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -g0"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/applications/firefox-bin.desktop /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=pentium-m -g0"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y --ignore-built-slot-operator-deps y"
FCFLAGS="-O2"
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms sign split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="it_IT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/ago /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac acl acpi alsa apic bash-completion berkdb bzip2 cairo cli consolekit cracklib crypt custom-cflags custom-optimization cxx dbus dri dvd extras ffmpeg fortran gdbm gtk gudev hwdb iconv jpeg jpeg2k kde kmod lame lm_sensors mad minizip mmx modules mp3 ncurses networkmanager nptl nsplugin opengl openmp openrc pam pax_kernel pcre pic png policykit qt3support qt4 readline semantic-desktop session sse sse2 ssl svg symlink tcpd theora threads tiff udev unicode vorbis x264 x86 xvid zlib" ABI_X86="32" ALSA_CARDS="hda-intel" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LINGUAS="en en_GB" OFFICE_IMPLEMENTATION="libreoffice" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" USERLAND="GNU" VIDEO_CARDS="intel"
USE_PYTHON="2.7"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

net-irc/hexchat-2.9.6.1-r1 was built with the following:
USE="dbus gtk plugins python ssl -fastscroll -gtkspell -ipv6 -libcanberra -libnotify -libproxy -nls -ntlm -perl -plugin-checksum -plugin-doat -plugin-fishlim -plugin-sysinfo -sexy -spell -theme-manager" PYTHON_SINGLE_TARGET="python2_7 -python3_3" PYTHON_TARGETS="python2_7 -python3_3"
CFLAGS="-O2 -march=pentium-m -g0 -fno-strict-overflow -fstack-protector-all -fPIE -pie -ggdb3"
CXXFLAGS="-O2 -march=pentium-m -g0 -fno-strict-overflow -fstack-protector-all -fPIE -pie -ggdb3"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,-z,now -pie"
Comment 2 Julian Ospald 2014-03-20 11:31:23 UTC
the backtrace is useless, check http://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces

can any1 confirm this on non-hardened?
Comment 3 Denis M. (Phr33d0m) 2014-03-20 19:08:40 UTC
I can't really reproduce this, mainly because of:

[20:01:56] --- xdcc :Unknown command

Ago any more info you can give on this? Like what 3rd party plugin are you using for the XDCC as afaik hexchat doesn't come with any such implementation.
Comment 4 Agostino Sarubbo gentoo-dev 2014-03-20 20:16:35 UTC
(In reply to Julian Ospald (hasufell) from comment #2)
> the backtrace is useless, check
> http://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces

I know that, but -g0 just nullify -ggdb3

(gdb) bt                                                                                                                                                                            
#0  0xaf18cf1b in ?? ()                                                                                                                                                             
#1  0x160773b9 in dcc_completed_transfer_exists () at dccgui.c:414                                                                                                                  
#2  0x16077410 in update_clear_button_sensitivity () at dccgui.c:424                                                                                                                
#3  0x16079a76 in fe_dcc_update (dcc=0x1a520748) at dccgui.c:1131                                                                                                                   
#4  0x160c62e8 in dcc_connect (dcc=0x1a520748) at dcc.c:1443                                                                                                                        
#5  0x160c7fed in dcc_get (dcc=0x1a520748) at dcc.c:2080                                                                                                                            
#6  0x160c8e9e in dcc_add_file (sess=0x1a51af50, file=0xbaca9c11 "Blue.Jasmine.2013.iTALiAN.MD.720p.BluRay.x264-BmA.part2.rar", size=1671407690, port=52140,                        
    nick=0xbaca997c "FaSt|BLURAY|08", addr=1534705879, pasvid=0) at dcc.c:2372                                                                                                      
#7  0x160c992b in handle_dcc (sess=0x1a51af50, nick=0xbaca997c "FaSt|BLURAY|08", word=0xbaca9ab8, word_eol=0xbaca9b3c, tags_data=0xbaca9a88) at dcc.c:2555                          
#8  0x16100cc3 in ctcp_handle (sess=0x1a51af50, to=0xbaca9c02 "ago", nick=0xbaca997c "FaSt|BLURAY|08", ip=0xbaca99bc "~savy@eXpLoSioNiRc-1C8C825A.kimsufi.com",                     
    msg=0x1a0fc6c8 "DCC SEND Blue.Jasmine.2013.iTALiAN.MD.720p.BluRay.x264-BmA.part2.rar 1534705879 52140 1671407690", word=0xbaca9ab8, word_eol=0xbaca9b3c, id=0,                  
    tags_data=0xbaca9a88) at ctcp.c:107                                                                                                                                             
#9  0x160ff8fc in process_named_msg (sess=0x1a51af50, type=0xbaca9bfa "PRIVMSG", word=0xbaca9ab8, word_eol=0xbaca9b3c, tags_data=0xbaca9a88) at proto-irc.c:1225                    
#10 0x161006b4 in irc_inline (serv=0x1a0fc408,                                                                                                                                      
    buf=0x1a0fc682 ":FaSt|BLURAY|08!~savy@eXpLoSioNiRc-1C8C825A.kimsufi.com PRIVMSG ago :\001DCC SEND Blue.Jasmine.2013.iTALiAN.MD.720p.BluRay.x264-BmA.part2.rar 1534705879 52140 1671407690", len=167) at proto-irc.c:1563                                                                                                                                            
#11 0x160e6ef7 in server_inline (serv=0x1a0fc408,                                                                                                                                   
    line=0x1a0fc682 ":FaSt|BLURAY|08!~savy@eXpLoSioNiRc-1C8C825A.kimsufi.com PRIVMSG ago :\001DCC SEND Blue.Jasmine.2013.iTALiAN.MD.720p.BluRay.x264-BmA.part2.rar 1534705879 52140 1671407690", len=167) at server.c:405                                                                                                                                               
#12 0x160e7198 in server_read (source=0x1a07afa8, condition=G_IO_IN, serv=0x1a0fc408) at server.c:470                                                                               
#13 0xae606dc0 in ?? ()
Comment 5 Agostino Sarubbo gentoo-dev 2014-03-20 20:18:04 UTC
(In reply to Denis M. (Phr33d0m) from comment #3)
> I can't really reproduce this, mainly because of:
> 
> [20:01:56] --- xdcc :Unknown command
> 
> Ago any more info you can give on this? Like what 3rd party plugin are you
> using for the XDCC as afaik hexchat doesn't come with any such
> implementation.

You need to connect to a server that permit you to download via dcc.

Hexchat natively comes with the dcc support.

Then when you query a bot, you can type: xdcc send #4
where 4 is the package requested.
Comment 6 Julian Ospald 2014-03-23 00:25:16 UTC
upstream says it could be fixed in fa955a0f, so try the live ebuild
Comment 7 Agostino Sarubbo gentoo-dev 2014-03-23 09:43:03 UTC
It seems to be fixed in the 9999, but bug 505414 is present in both 2.9.6.1-r1 and 9999
Comment 8 Julian Ospald 2014-03-23 11:46:02 UTC
(In reply to Agostino Sarubbo from comment #7)
> It seems to be fixed in the 9999, but bug 505414188 is present in both
> 2.9.6.1-r1 and 9999

so try this

https://github.com/hexchat/hexchat/commit/fa955a0f.patch

with 2.9.6.1-r1
Comment 9 Agostino Sarubbo gentoo-dev 2014-03-23 18:19:26 UTC
(In reply to Julian Ospald (hasufell) from comment #8)
> (In reply to Agostino Sarubbo from comment #7)
> > It seems to be fixed in the 9999, but bug 505414188 is present in both
> > 2.9.6.1-r1 and 9999
> 
> so try this
> 
> https://github.com/hexchat/hexchat/commit/fa955a0f.patch
> 
> with 2.9.6.1-r1

It works too, you can commit the patch.
Comment 10 Julian Ospald 2014-03-23 19:07:52 UTC
+*hexchat-2.9.6.1-r2 (23 Mar 2014)
+
+  23 Mar 2014; Julian Ospald <hasufell@gentoo.org> +hexchat-2.9.6.1-r2.ebuild,
+  +files/hexchat-2.9.6.1-xdcc.patch:
+  fix xdcc segfault wrt #505132