Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 379101 - mail-filter/maildrop-2.5.4 segfaults in src_test
Summary: mail-filter/maildrop-2.5.4 segfaults in src_test
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 376563
  Show dependency tree
 
Reported: 2011-08-13 20:53 UTC by Markus Meier
Modified: 2011-09-05 20:19 UTC (History)
1 user (show)

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


Attachments
mail-filter:maildrop-2.5.4:20110813-112352.log (mail-filter:maildrop-2.5.4:20110813-112352.log,218.14 KB, text/plain)
2011-08-13 20:53 UTC, Markus Meier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Meier gentoo-dev 2011-08-13 20:53:24 UTC
Created attachment 283235 [details]
mail-filter:maildrop-2.5.4:20110813-112352.log

this is on arm, but also seems to happen on ia64 and is a regression compared to current stable.

make[2]: Entering directory `/var/tmp/portage/mail-filter/maildrop-2.5.4/work/maildrop-2.5.4/rfc2045'
/bin/sh ./testsuite | cmp -s - ./testsuite.txt.idn
./testsuite: line 142: 24116 Segmentation fault      LANG=en_US.utf-8 ./reformime -i < ./testsuite.dat
make[2]: *** [check-am] Error 1
make[2]: Leaving directory `/var/tmp/portage/mail-filter/maildrop-2.5.4/work/maildrop-2.5.4/rfc2045'
make[1]: *** [check] Error 2
make[1]: Leaving directory `/var/tmp/portage/mail-filter/maildrop-2.5.4/work/maildrop-2.5.4/rfc2045'
make: *** [check-recursive] Error 1
 * ERROR: mail-filter/maildrop-2.5.4 failed (test phase):
 *   Make check failed. See above for details.
 *
 * Call stack:
 *     ebuild.sh, line   56:  Called src_test
 *   environment, line 3150:  Called _eapi0_src_test
 *     ebuild.sh, line  638:  Called die
 * The specific snippet of code:
 *                      hasq test $FEATURES && die "Make check failed. See above for details."

running this particular test in gdb:
# LANG=en_US.utf-8 gdb ./reformime
GNU gdb (Gentoo 7.2 p1) 7.2
Copyright (C) 2010 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 "armv5tel-softfloat-linux-gnueabi".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /var/tmp/portage/mail-filter/maildrop-2.5.4/work/maildrop-2.5.4/rfc2045/reformime...done.
(gdb) set args -i < ./testsuite.dat
(gdb) run
Starting program: /var/tmp/portage/mail-filter/maildrop-2.5.4/work/maildrop-2.5.4/rfc2045/reformime -i < ./testsuite.dat

Program received signal SIGSEGV, Segmentation fault.
0x4010d988 in strspn () from /lib/libc.so.6
(gdb) bt full
#0  0x4010d988 in strspn () from /lib/libc.so.6
No symbol table info available.
#1  0x4010e29c in strtok () from /lib/libc.so.6
No symbol table info available.
#2  0x0000b3c0 in main2 (argc=2, argv=0xbeffe904) at reformime.c:1153
        mimesection = <value optimized out>
        dodecodehdr = 0
        p = 0x29840
        rwmode = 0
        dodsn = 0
        domimedigest = 0
        dodecodeaddrhdr = 0
        convtoutf8 = 0
        do_extract = <value optimized out>
        doinfo = 1
        dorewrite = 0
        optc = <value optimized out>
        dodecode = 0
        doencodemime = 0
        dovalidate = 0
        rc = <value optimized out>
        argn = 2
        doencodemimehdr = 0
        extract_filename = 0x17d4c ""
#3  main (argc=2, argv=0xbeffe904) at reformime.c:1224
        rc = <value optimized out>


Portage 2.1.10.3 (default/linux/arm/10.0/desktop, gcc-4.4.5, glibc-2.12.2-r0, 2.6.39.3 armv5tel)
=================================================================
System uname: Linux-2.6.39.3-armv5tel-Feroceon_88FR131_rev_1_-v5l-with-gentoo-2.0.3
Timestamp of tree: Sat, 13 Aug 2011 10:00:01 +0000
app-shells/bash:          4.1_p9
dev-lang/python:          2.5.4-r4, 2.6.6-r2, 2.7.1-r1
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.4_p6-r1, 1.5-r1, 1.6.3-r1, 1.7.9-r2, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.20.1-r1
sys-devel/gcc:            4.3.4, 4.4.5
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.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo
ACCEPT_KEYWORDS="arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="armv5tel-softfloat-linux-gnueabi"
CFLAGS="-O2 -march=armv5te -pipe"
CHOST="armv5tel-softfloat-linux-gnueabi"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /var/bind /var/vpopmail/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.2/ext-active/ /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.2/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.2/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=armv5te -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs collision-protect distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
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://minil/gentoo-portage"
USE="X a52 aac acl acpi alsa apache2 arm berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dts dvdr emboss encode exif fam firefox flac fortran gdbm gdu gif gpm gtk iconv jpeg kpathsea lcms ldap libnotify mad mng modules mp3 mp4 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl png policykit ppds pppd python qt3support qt4 readline sdl session spell ssl startup-notification svg sysfs tcpd test tiff truetype udev unicode usb vorbis xcb xml xorg xulrunner xv xvid 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" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-2 php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev omapfb dummy v4l" 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, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Eray Aslan gentoo-dev 2011-08-15 07:25:28 UTC
Fixed (hopefully) without a rev bump.  Can you please check and confirm?  Thank you.

+  15 Aug 2011; Eray Aslan <eras@gentoo.org> maildrop-2.5.4.ebuild,
+  +files/maildrop-2.5.4-reformime.patch:
+  Fix segfault in reformime on some arches - bug #379101
+
Comment 2 Eray Aslan gentoo-dev 2011-08-28 07:31:07 UTC
@maekke: ping
Comment 3 Markus Meier gentoo-dev 2011-08-28 16:11:52 UTC
(In reply to comment #2)
> @maekke: ping

sorry for the delay, issue is not fixed (armin76 confirmed that on ia64):

# LANG=en_US.utf-8 gdb ./reformime
GNU gdb (Gentoo 7.2 p1) 7.2
Copyright (C) 2010 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 "armv5tel-softfloat-linux-gnueabi".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /var/tmp/portage/mail-filter/maildrop-2.5.4/work/maildrop-2.5.4/rfc2045/reformime...done.
(gdb) set args -i <./testsuite.dat
(gdb) run
Starting program: /var/tmp/portage/mail-filter/maildrop-2.5.4/work/maildrop-2.5.4/rfc2045/reformime -i <./testsuite.dat

Program received signal SIGSEGV, Segmentation fault.
0x4010f988 in strspn () from /lib/libc.so.6
(gdb) bt full
#0  0x4010f988 in strspn () from /lib/libc.so.6
No symbol table info available.
#1  0x4011029c in strtok () from /lib/libc.so.6
No symbol table info available.
#2  0x0000b340 in main2 (argc=2, argv=0xbeffe904) at reformime.c:1153
        mimesection = <value optimized out>
        dodecodehdr = 0
        p = 0x29840
        rwmode = 0
        dodsn = 0
        domimedigest = 0
        dodecodeaddrhdr = 0
        convtoutf8 = 0
        do_extract = <value optimized out>
        section = 0x0
        doinfo = 1
        dorewrite = 0
        optc = <value optimized out>
        dodecode = 0
        doencodemime = 0
        dovalidate = 0
        rc = <value optimized out>
        argn = 2
        doencodemimehdr = 0
        extract_filename = 0x17ccc ""
#3  main (argc=2, argv=0xbeffe904) at reformime.c:1224
        rc = <value optimized out>
Comment 4 Raúl Porcel (RETIRED) gentoo-dev 2011-08-28 18:20:01 UTC
+1, fails on alpha,ia64,s390,sparc
Comment 5 Eray Aslan gentoo-dev 2011-08-31 16:34:27 UTC
+  31 Aug 2011; Eray Aslan <eras@gentoo.org>
+  files/maildrop-2.5.4-reformime.patch:
+  Fix segfault in reformime - bug #379101. Take two
+

Patch revised without a rev bump.  Please test when you can.  Also, upstream prefers a traceback with a build that disables compiler optimizations if there is still a problem.  Thanks.
Comment 6 Markus Meier gentoo-dev 2011-09-04 13:10:31 UTC
(In reply to comment #5)
> +  31 Aug 2011; Eray Aslan <eras@gentoo.org>
> +  files/maildrop-2.5.4-reformime.patch:
> +  Fix segfault in reformime - bug #379101. Take two
> +
> 
> Patch revised without a rev bump.  Please test when you can.  Also, upstream
> prefers a traceback with a build that disables compiler optimizations if there
> is still a problem.  Thanks.

now we're at reformime.c:1160. backtrace without optimizations:


# LANG=en_US.utf-8 gdb ./reformime
GNU gdb (Gentoo 7.2 p1) 7.2
Copyright (C) 2010 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 "armv5tel-softfloat-linux-gnueabi".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /var/tmp/portage/mail-filter/maildrop-2.5.4/work/maildrop-2.5.4/rfc2045/reformime...done.
(gdb) set args -i <./testsuite.dat
(gdb) run
Starting program: /var/tmp/portage/mail-filter/maildrop-2.5.4/work/maildrop-2.5.4/rfc2045/reformime -i <./testsuite.dat
section: 1
content-type: text/plain
content-transfer-encoding: 8bit
charset: utf-8
content-description: H��la! test H��la! H��la!  test
starting-pos: 0
starting-pos-body: 188
ending-pos: 196
line-count: 7
body-line-count: 1


Program received signal SIGSEGV, Segmentation fault.
0x4010f988 in strspn () from /lib/libc.so.6
(gdb) bt full
#0  0x4010f988 in strspn () from /lib/libc.so.6
No symbol table info available.
#1  0x4011029c in strtok () from /lib/libc.so.6
No symbol table info available.
#2  0x0000ca28 in main2 (mimecharset=0x314e4 "UTF-8", argc=2, argv=0xbeffe904) at reformime.c:1160
        argn = 2
        optc = 105 'i'
        optarg = 0x0
        mimesection = 0x0
        section = 0x0
        doinfo = 1
        dodecode = 0
        dorewrite = 0
        dodsn = 0
        domimedigest = 0
        dodecodehdr = 0
        dodecodeaddrhdr = 0
        doencodemime = 0
        doencodemimehdr = 0
        decode_header = 0x21494 ""
        p = 0x32840
        rwmode = 0
        convtoutf8 = 0
        dovalidate = 0
        do_extract = 0
        extract_filename = 0x0
        rc = 0
#3  0x0000ccc4 in main (argc=2, argv=0xbeffe904) at reformime.c:1224
        rc = 0
(gdb)
Comment 7 Eray Aslan gentoo-dev 2011-09-05 18:44:56 UTC
+  05 Sep 2011; Eray Aslan <eras@gentoo.org>
+  files/maildrop-2.5.4-reformime.patch:
+  Revized patch for bug #379101
+

Patch revised once again hopefully this time fixing the segfault.  Please test when you can.  Thank you.
Comment 8 Markus Meier gentoo-dev 2011-09-05 20:19:40 UTC
(In reply to comment #7)
> +  05 Sep 2011; Eray Aslan <eras@gentoo.org>
> +  files/maildrop-2.5.4-reformime.patch:
> +  Revized patch for bug #379101
> +
> 
> Patch revised once again hopefully this time fixing the segfault.  Please test
> when you can.  Thank you.

make[2]: Leaving directory `/var/tmp/portage/mail-filter/maildrop-2.5.4/work/maildrop-2.5.4'
make[1]: Leaving directory `/var/tmp/portage/mail-filter/maildrop-2.5.4/work/maildrop-2.5.4'
>>> Completed installing maildrop-2.5.4 into /var/tmp/portage/mail-filter/maildrop-2.5.4/image/

yes, now it seems to be fine, also confirmed by armin76 on ia64, thanks!