Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 372073 - net-p2p/rtorrent-0.8.7-r3: Segmentation fault on xmlrpc command
Summary: net-p2p/rtorrent-0.8.7-r3: Segmentation fault on xmlrpc command
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo net-p2p team
URL:
Whiteboard:
Keywords:
Depends on: 389817
Blocks:
  Show dependency tree
 
Reported: 2011-06-17 15:13 UTC by Oliver Smith
Modified: 2014-08-07 15:05 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 Oliver Smith 2011-06-17 15:13:14 UTC
When attempting to pass an xmlrpc command to rtorrent it immediately seg faults and has to be restarted.

Reproducible: Always

Steps to Reproduce:
1. Open rtorrent as either user or root
2. Start apache
3. Send xmlrpc command using xmlrpc command line tool or through php library
Actual Results:  
Caught Segmentation fault, dumping stack:B] [Port: 10001] [Local **.***.***.***
0 rtorrent() [0x410e24]
1 rtorrent() [0x447cc6]
2 /lib64/libc.so.6(+0x329b0) [0x7f2c09e639b0]
3 /lib64/libpthread.so.0(pthread_kill+0) [0x7f2c09c20860]
4 rtorrent() [0x448305]
5 rtorrent() [0x50e25a]
6 rtorrent() [0x50e9ab]
7 /usr/lib64/libtorrent.so.13(_ZN7torrent9PollEPoll7performEv+0xd8) [0x7f2c0b1c9d88]
8 rtorrent() [0x448a10]
9 /lib64/libpthread.so.0(+0x6d4c) [0x7f2c09c1ad4c]
10 /lib64/libc.so.6(clone+0x6d) [0x7f2c09f0840d]
Aborted


Expected Results:  
Responded to the command without crashing the program.

If its relevant, libtorrent is 0.12.7 and both rtorrent and libtorrent were built with the following use flags: 
net-libs/libtorrent-0.12.7  USE="ipv6 ssl -debug" 0 kB
net-p2p/rtorrent-0.8.7-r3  USE="daemon ipv6 xmlrpc -color -debug -test" 0 kB

Apache server is 2.2.17 with mod_scgi version 1.14
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2011-06-17 16:18:30 UTC
Please post your `emerge --info' output too.
Comment 2 Oliver Smith 2011-06-17 19:09:35 UTC
Portage 2.1.10 (default/linux/amd64/10.0/no-multilib, gcc-4.5.2, glibc-2.13-r2, 2.6.39-gentoo-DatOVH x86_64)
=================================================================
System uname: Linux-2.6.39-gentoo-DatOVH-x86_64-Intel-R-_Celeron-R-_CPU_220_@_1.20GHz-with-gentoo-2.0.2
Timestamp of tree: Tue, 07 Jun 2011 10:00:01 +0000
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.1-r1, 3.1.3-r1, 3.2
dev-util/cmake:           2.8.4-r1
sys-apps/baselayout:      2.0.2
sys-apps/openrc:          0.8.2-r1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.1-r1
sys-devel/binutils:       2.21
sys-devel/gcc:            4.5.2
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82
sys-kernel/linux-headers: 2.6.38 (virtual/os-headers)
sys-libs/glibc:           2.13-r2
Repositories: gentoo
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs candy distlocks ebuild-locks fixlafiles fixpackages news nodoc noinfo noman parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_GB"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl acpi amd64 apache2 berkdb bzip2 cli cracklib crypt curl cxx deblob dhcpcd dri exif fortran gd gdbm gpm iconv imap ipv6 mercurial mmx modules mudflap mysql mysqli ncurses nls nptl nptlonly openmp pam pcre perl php png pppd python readline samba session snmp sqlite sse sse2 ssl subversion sysfs tcpd unicode xml xmlreader xmlrpc zip zlib" 
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" 
APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" 
CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" 
CAMERAS="ptp2" 
COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 
ELIBC="glibc" 
GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" 
KERNEL="linux" 
LINGUAS="en_GB" 
PHP_TARGETS="php5-3" 
RUBY_TARGETS="ruby18" 
USERLAND="GNU" 
XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Oliver Smith 2011-06-25 15:44:36 UTC
After removing both libtorrent and rtorrent I built newer versions directly from source and the problem is resolved. Both packages were built with the same config options as were set in emerge.

The working package versions were as follows:

libtorrent-0.12.9
rtorrent-0.8.9

Is it possible to create ebuilds to match these version to test directly from portage? I'd be happy to give it a go if someone can give me a nudge in the right direction.

Thanks
Comment 4 Stelian Ionescu 2011-07-04 00:06:12 UTC
I confirm the XML-RPC bug, here's a backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fb914271700 (LWP 18073)]
0x00007fb917b54860 in pthread_kill () from /lib64/libpthread.so.0
(gdb) thread apply all bt full

Thread 2 (Thread 0x7fb914271700 (LWP 18073)):
#0  0x00007fb917b54860 in pthread_kill () from /lib64/libpthread.so.0
No symbol table info available.
#1  0x0000000000447025 in ThreadBase::interrupt_main_polling () at thread_base.cc:206
No locals.
#2  0x000000000050cff8 in rpc::SCgi::receive_call (this=<value optimized out>, task=<value optimized out>,
    buffer=0x74d531e "<?xml version=\"1.0\" encoding=\"UTF-8\"?><methodCall><methodName>system.client_version</methodName><params>\r\n</params></methodCall>", length=128) at scgi.cc:168
        result = <value optimized out>
#3  0x000000000050d74b in rpc::SCgiTask::event_read (this=0x1509bd0) at scgi_task.cc:186
        bytes = <value optimized out>
#4  0x00007fb9185caaf6 in torrent::PollEPoll::perform (this=0x14ad700) at poll_epoll.cc:170
        itr = 0x14ad740
        last = 0x14ad74c
#5  0x0000000000447730 in ThreadBase::event_loop (threadBase=0x14ad390) at thread_base.cc:165
No locals.
#6  0x00007fb917b4ed4c in start_thread () from /lib64/libpthread.so.0
No symbol table info available.
#7  0x00007fb91710ca7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115
No locals.

Thread 1 (Thread 0x7fb918f38720 (LWP 18072)):
#0  0x00007fb91710d073 in epoll_wait () at ../sysdeps/unix/syscall-template.S:82
No locals.
#1  0x00007fb9185ca805 in torrent::PollEPoll::poll (this=0x14a6120, msec=<value optimized out>) at poll_epoll.cc:136
        nfds = -4
#2  0x00000000004c7545 in core::PollManagerEPoll::poll (this=0x14a5dc0, timeout=...) at poll_manager_epoll.cc:74
        status = <value optimized out>
#3  0x00000000004145aa in main (argc=1, argv=0x7fffd7105c98) at main.cc:843
        firstArg = <value optimized out>
Comment 5 Stelian Ionescu 2011-07-04 00:40:49 UTC
And rtorrent 0.8.9 has fixed it