Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 363705 - app-admin/logrotate-3.7.9-r1 causes bus error
Summary: app-admin/logrotate-3.7.9-r1 causes bus error
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Daniel Gryniewicz (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: unaligned-access
  Show dependency tree
 
Reported: 2011-04-15 13:40 UTC by Till Schäfer
Modified: 2023-05-08 17:26 UTC (History)
1 user (show)

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


Attachments
logrotate.conf (logrotate.conf,982 bytes, text/plain)
2011-04-15 13:41 UTC, Till Schäfer
Details
logrotate.d.tar.gz (logrotate.d.tar.gz,1.60 KB, text/plain)
2011-04-16 15:26 UTC, Till Schäfer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Till Schäfer 2011-04-15 13:40:28 UTC
After upgrading to app-admin/logrotate-3.7.9-r1 i get a bus error whenever i execute logrotate /etc/logrotate.conf. 3.7.8 works for me. 

Reproducible: Always

Steps to Reproduce:
1. install new version 
2. run logrotate /etc/logrotate.conf
Actual Results:  
bus error

Expected Results:  
rotate the logs ;)
Comment 1 Till Schäfer 2011-04-15 13:41:21 UTC
Created attachment 270059 [details]
logrotate.conf
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2011-04-15 14:48:41 UTC
1) Please post your `emerge --info' output too.
2) Please reproduce the complete output of starting logrotate. dmesg info might help too here.
Comment 3 Till Schäfer 2011-04-15 15:05:10 UTC
# emerge --info
Portage 2.2.0_alpha30 (default/linux/amd64/10.0/desktop/kde, gcc-4.4.5, glibc-2.11.3-r0, 2.6.38-gentoo-r1 x86_64)
=================================================================
System uname: Linux-2.6.38-gentoo-r1-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T8300_@_2.40GHz-with-gentoo-2.0.1
Timestamp of tree: Fri, 15 Apr 2011 13:30:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.7.1-r1, 3.1.3-r1
dev-util/ccache:     2.4-r9
dev-util/cmake:      2.8.4
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.8.1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       3.3.6-r1, 4.1.2, 4.4.5, 4.5.2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
sys-kernel/linux-headers: 2.6.36.1
virtual/os-headers:  0
Repositories: gentoo local_overlay
Installed sets: @kdeartwork-4.6, @kdebase-4.6, @system
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"                                                                                                                                                                                
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"                                                                                                                     
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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="-march=core2 -O2 -pipe -ggdb"                                                                                                                                                                    
DISTDIR="/usr/portage/distfiles"                                                                                                                                                                           
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FEATURES="assume-digests binpkg-logs ccache distlocks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de"
MAKEOPTS="-j3"
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="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdaudio cdda cddb cdio cdr cli consolekit cracklib crypt css cups cxx dbus dell dri dts dvd dvdr emboss encode exif fam ffmpeg firefox flac fortran gdbm gdu gif glib glibc gpm gtk haskell iconv icu id3tag ieee1394 imagemagick inotify ipv4 ipv6 irc java jpeg jpeg2k kde lame latex lcms ldap libnotify mad mikmod mmx mmxext mng modules mp3 mp4 mpeg mplayer mudflap multilib musicbrainz ncurses nls nptl nptlonly ntp ogg opengl openmp otr pam pango pcre pdf perl phonon pm-utils png policykit ppds pppd python qt3support qt4 quicktime rar readline rss sdl semantic-desktop session spell sse sse2 sse3 sse4_1 ssl ssse3 startup-notification svg sysfs syslog taglib tcpd threads tiff truetype udev unicode usb v41 v412 vcd vim-syntax visualization vorbis wavpack wifi wma wmf x264 xcb xine xinerama xml xorg xscreensaver xulrunner xv xvid xvmc zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" 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 synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Till Schäfer 2011-04-15 15:23:22 UTC
- dmesg shows no output (caused by logrotate)
- Output on Terminal after calling logrotate is just Bus error
- valgrind output: 

# valgrind logrotate /etc/logrotate.conf 
==31369== Memcheck, a memory error detector
==31369== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==31369== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==31369== Command: logrotate /etc/logrotate.conf
==31369== 
==31369== 
==31369== Process terminating with default action of signal 7 (SIGBUS)
==31369==  Non-existent physical address at address 0x4020001
==31369==    at 0x406F24: readConfigFile (config.c:569)
==31369==    by 0x406B93: readConfigPath (config.c:388)
==31369==    by 0x408E54: readConfigFile (config.c:1145)
==31369==    by 0x406958: readConfigPath (config.c:409)
==31369==    by 0x409284: readAllConfigPaths (config.c:469)
==31369==    by 0x405CDF: main (logrotate.c:1721)
==31369== 
==31369== HEAP SUMMARY:
==31369==     in use at exit: 2,739 bytes in 76 blocks
==31369==   total heap usage: 161 allocs, 85 frees, 47,199 bytes allocated
==31369== 
==31369== LEAK SUMMARY:
==31369==    definitely lost: 104 bytes in 2 blocks
==31369==    indirectly lost: 480 bytes in 20 blocks
==31369==      possibly lost: 0 bytes in 0 blocks
==31369==    still reachable: 2,155 bytes in 54 blocks
==31369==         suppressed: 0 bytes in 0 blocks
==31369== Rerun with --leak-check=full to see details of leaked memory
==31369== 
==31369== For counts of detected and suppressed errors, rerun with: -v
==31369== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 4)
Bus error
Comment 5 Daniel Gryniewicz (RETIRED) gentoo-dev 2011-04-16 14:23:05 UTC
Could you also post the config files in /etc/logrotate.d/ ? Based on your valgrind output, it's crashing writing to one of those files.  Unfortunately, valgrind doesn't tell me which one, so I'm going to have to guess.
Comment 6 Till Schäfer 2011-04-16 15:26:41 UTC
Created attachment 270205 [details]
logrotate.d.tar.gz
Comment 7 Till Schäfer 2011-04-16 15:33:35 UTC
It is the empty kdm config file. when i remov it logrotate works fine. 
I deleted the content because it conflicts with my *.log statement in the main config and there is no way to tell kdm to not create a logrotate file. (I will open a bug for that too. A useflag will be usefull.)

Nevertheless the previous version of logrotate handeled it well. It still should not crash.
Comment 8 Daniel Gryniewicz (RETIRED) gentoo-dev 2011-04-17 15:02:51 UTC
This is now fixed in 2.7.9-r2 via upstream issue 5.
Comment 9 Duncan 2011-04-19 01:14:10 UTC
(In reply to comment #7)
> It is the empty kdm config file. when i remov it logrotate works fine. 
> I deleted the content because it conflicts with my *.log statement in the main
> config and there is no way to tell kdm to not create a logrotate file. (I will
> open a bug for that too. A useflag will be usefull.)

Portage hint for Till and other users who may happen across this:

FWIW, while I use the empty-file and CONFIG_PROTECT to tell portage not to install a new version of something sometimes, myself, there's also the INSTALL_MASK (and for FEATURES=buildpkg users, PKG_INSTALL_MASK) setting.  Using this, you can tell portage not to install specific files (but not symlinks) or file-groups (I use *.la here, for instance, with an exception in /etc/portage/env for the libtool package itself, since its *.la file is sometimes tested for in various config scripts).

So setting something like INSTALL_MASK="/etc/logrotate.d/kdm" should prevent portage from installing that file.

Do be aware of the symlink exception, however.

See the make.conf (5) manpage for the official explanation of that and other make.conf vars. =:^)
Comment 10 Till Schäfer 2011-04-19 12:12:11 UTC
cool thx. 
I have solved it with TABOOEXT in the logrotate main config, but the other thing is nevertheless useful.