Summary: | Bus error in Amanda 2.4.5 /usr/local/libexec/planner | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Laurent DAVERIO <daverio> |
Component: | Individual Port(s) | Assignee: | Sam Lawrance <lawrance> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | ||
Priority: | Normal | ||
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
Laurent DAVERIO
2005-05-16 12:30:02 UTC
I've struck this problem as well and have been able to do some rudimentary investigation. Under FreeBSD 5.4-RELEASE I can *not* reproduce the problem. Amanda 2.4.5 seems to work fine with FreeBSD 5. Under FreeBSD 4.11-RELEASE-p8 I can reproduce the problem, so perhaps the problem is confined to just FreeBSD 4. Experimenting with the broken port under FreeBSD 4, I was able to produce a different failure mode by varying compiler optimisation flags. Originally I had "CFLAGS= -O -pipe" in /etc/make.conf. With these compiler flags Amanda 2.4.5 would fail with bus error in planner. After rebuilding with "-O" removed from CFLAGS, the planner seemed to exit successfully, but the dump run would still fail with some other Amanda process exiting on a segmentation fault. I haven't been able to identify which process/executable was copping the segfault. -- David Lay dsl@webize.com.au Reproduced here as well on 4.11-REL and 4.11-STABLE from yesterday Starting program: /usr/local/libexec/amanda/planner mars (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... planner: pid 42151 executable /usr/local/libexec/amanda/planner version 2.4.5 planner: build: VERSION="Amanda-2.4.5" planner: BUILT_DATE="Tue Jun 7 01:05:26 CEST 2005" planner: BUILT_MACH="FreeBSD candyman.i.inter-sonic.com 4.11-RELEASE FreeBSD 4.11-RELEASE #0: Mon Mar 21 13:23:56 CET 2005 peo@candyman.i.inter-sonic.com:/usr/obj/usr/src/sys/CANDYMAN i386" planner: CC="cc" planner: CONFIGURE_COMMAND="'./configure' '--libexecdir=/usr/local/libexec/amanda' '--with-amandahosts' '--with-fqdn' '--with-dump-honor-nodump' '--with-buffered-dump' '--without-server' '--disable-libtool' '--prefix=/usr/local' '--with-user=operator' '--with-group=operator' '--with-gnutar-listdir=/usr/local/var/amanda/gnutar-lists' '--prefix=/usr/local' '--build=i386-portbld-freebsd4.11'" planner: paths: bindir="/usr/local/bin" sbindir="/usr/local/sbin" planner: libexecdir="/usr/local/libexec/amanda" planner: mandir="/usr/local/man" AMANDA_TMPDIR="/tmp/amanda" planner: AMANDA_DBGDIR="/tmp/amanda" planner: CONFIG_DIR="/usr/local/etc/amanda" DEV_PREFIX="/dev/" planner: RDEV_PREFIX="/dev/r" DUMP="/sbin/dump" planner: RESTORE="/sbin/restore" VDUMP=UNDEF VRESTORE=UNDEF planner: XFSDUMP=UNDEF XFSRESTORE=UNDEF VXDUMP=UNDEF VXRESTORE=UNDEF planner: SAMBA_CLIENT="/usr/local/bin/smbclient" planner: GNUTAR="/usr/local/bin/gtar" COMPRESS_PATH="/usr/bin/gzip" planner: UNCOMPRESS_PATH="/usr/bin/gzip" LPRCMD="/usr/bin/lpr" planner: MAILER="/usr/bin/Mail" planner: listed_incr_dir="/usr/local/var/amanda/gnutar-lists" planner: defs: DEFAULT_SERVER="candyman.i.inter-sonic.com" planner: DEFAULT_CONFIG="DailySet1" planner: DEFAULT_TAPE_SERVER="candyman.i.inter-sonic.com" planner: DEFAULT_TAPE_DEVICE="/dev/null" HAVE_MMAP HAVE_SYSVSHM planner: LOCKING=POSIX_FCNTL DEBUG_CODE AMANDA_DEBUG_DAYS=4 planner: BSD_SECURITY USE_AMANDAHOSTS CLIENT_LOGIN="operator" planner: FORCE_USERID HAVE_GZIP COMPRESS_SUFFIX=".gz" planner: COMPRESS_FAST_OPT="--fast" COMPRESS_BEST_OPT="--best" planner: UNCOMPRESS_OPT="-dc" (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... Program received signal SIGSEGV, Segmentation fault. 0x2818c54a in vfprintf () from /usr/lib/libc.so.4 (gdb) where #0 0x2818c54a in vfprintf () from /usr/lib/libc.so.4 #1 0x2818b275 in fprintf () from /usr/lib/libc.so.4 #2 0x8049b90 in free () #3 0x80498fe in free () Responsible Changed From-To: freebsd-ports-bugs->lawrance This PR is mine, baby Hello It looks like a bug with older gcc. System: 4.10-RELEASE-p3 Gcc; 2.95.4 I installed gcc 3.4 (since amanda works with 5.4) on my 4.10 Amanda machine. I recompiled amanda 2.4.5 with USE_GCC= 3.4 in the Makefile and everything works fine. Planner no longer dies. Regards, Thomas I just sent a patch & a bit of discussion to amanda-hackers for the same problem (bus errors from planner). It's a buffer overflow introduced in 2.4.5 (also on the main trunk). This patch fixes it for me: --- server-src/infofile.c.orig Wed Mar 16 11:15:28 2005 +++ server-src/infofile.c Thu Jul 7 14:12:54 2005 @@ -274,7 +274,7 @@ rc = 0; nb_history = 0; - for(i=0;i<=NB_HISTORY+1;i++) { + for(i=0;i<sizeof(info->history)/sizeof(info->history[0]);i++) { info->history[i].level = -2; } for(rc = -2; (line = agets(infof)) != NULL; free(line)) { State Changed From-To: open->closed John's fix was committed. Thanks all! |