Bug 88883 - [patch] sysutils/fcron crashes when the fcrondyn feature is enabled.
Summary: [patch] sysutils/fcron crashes when the fcrondyn feature is enabled.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Sergey Matveychuk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-12 11:40 UTC by Brad Huntting
Modified: 2005-11-12 21:24 UTC (History)
0 users

See Also:


Attachments
file.diff (2.52 KB, patch)
2005-11-12 11:40 UTC, Brad Huntting
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brad Huntting 2005-11-12 11:40:08 UTC
	fcron crashes with the syslog message 'select return 22:
	Invalid argument' (22 is errno EINVAL).

	A cursory inspection indicates the broken select(2) call
	is only compiled when the fcrondyn feature is enabled.
	Until this newer code is cleaned up and fixed, the safest
	course would seem to be to disable it altogether.

Fix: Disabling fcrondyn appears to fix the problem.

	Also, removed the unnessesary patch file for configure and
	the USE_PERL5_BUILD directive as perl is no longer used for
	installation.

	I've tested the build on 4.10-RELEASE, 5.4-RELEASE and
	6.0-RELEASE, and have run the patched version on 6.0-RELEASE
	for a couple days on two different machines w/o incident.

	The following patch was created with:
		diff -Nru /usr/ports/sysutils/fcron ~/src/fcron

------------------------------ cut here ------------------------------
How-To-Repeat: 	Compile and install on 6.0-RELEASE.  Run with roots fcrontab:

		SHELL=/bin/sh
		PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
		HOME=/var/log
		#
		@nolog,serial,lavg(.5,.5,1.5) 5 /usr/libexec/atrun
		%nolog,hourly *	newsyslog
		%daily,serial,lavg(.2,.2,.2) * * periodic daily
		%weekly,serial,lavg(.2,.2,.2) * * periodic weekly
		%monthly,serial,lavg(.2,.2,.2) * * * periodic monthly

	fcron should log the following message after running for
	a few (<24) hours:

		Nov  7 09:35:30 hunkular fcron[1238]: select return 22: Invalid argument
		Nov  7 09:35:30 hunkular fcron[1238]: Aborted
Comment 1 Sergey Matveychuk freebsd_committer 2005-11-12 17:44:36 UTC
Responsible Changed
From-To: freebsd-ports-bugs->sem

Take it.
Comment 2 Sergey Matveychuk freebsd_committer 2005-11-12 18:30:32 UTC
The port does not build without USE_PERL5_BUILD:
checking root's username... env: perl: No such file or directory
configure: error:
Invalid root's username : cannot find it using getpwnam()
===>  Script "configure" failed unexpectedly.
Please report the problem to huntting@glarp.com [maintainer] and attach the
"/work/a/ports/sysutils/fcron/work/fcron-3.0.0/config.log" including the
output of the failure of your make command. Also, it might be a good idea to
provide an overview of all packages installed on your system (e.g. an `ls
/var/db/pkg`).

So we should USE_PERL5_BUILD back or patch configure.
-- 
Sem.
Comment 3 Sergey Matveychuk freebsd_committer 2005-11-12 18:31:42 UTC
State Changed
From-To: open->feedback

Ask for maintainer fix.
Comment 4 huntting 2005-11-12 21:07:16 UTC
> The port does not build without USE_PERL5_BUILD:
> So we should USE_PERL5_BUILD back or patch configure.

Oops.  Sorry, I think the simplest thing is to put back USE_PERL5_BUILD.
Try this patch instead:


thanx,
brad

------------------------- cut here -------------------------
diff -Nur /usr/ports/sysutils/fcron/Makefile src/fcron/Makefile
--- /usr/ports/sysutils/fcron/Makefile	Sun Oct 23 03:27:20 2005
+++ src/fcron/Makefile	Sat Nov 12 14:01:00 2005
@@ -8,7 +8,7 @@
 
 PORTNAME=	fcron
 PORTVERSION=	3.0.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	sysutils
 MASTER_SITES=	${MASTER_SITE_SUNSITE} \
 		http://fcron.free.fr/
@@ -23,14 +23,14 @@
 USE_PERL5_BUILD=	yes
 CONFIGURE_ARGS=	--with-etcdir=${PREFIX}/etc --with-cflags="${CFLAGS}" \
 		--with-rootname=root --with-rootgroup=wheel \
-		--with-docdir=${DOCSDIR}
+		--with-docdir=${DOCSDIR} --with-fcrondyn=no
 
 WRKSRC=		${WRKDIR}/fcron-${PORTVERSION}
 
 USE_RC_SUBR=	fcron
 SUB_FILES=	pkg-message
 
-MAN1=		fcrondyn.1 fcrontab.1
+MAN1=		fcrontab.1
 MAN5=		fcron.conf.5 fcrontab.5
 MAN8=		fcron.8
 
@@ -43,7 +43,6 @@
 	${INSTALL_PROGRAM} ${WRKSRC}/fcron ${PREFIX}/sbin
 	${INSTALL_PROGRAM} -g fcron -o fcron -m 6111 ${WRKSRC}/fcrontab ${PREFIX}/bin
 	${INSTALL_PROGRAM} -g fcron -m 4110 ${WRKSRC}/fcronsighup ${PREFIX}/bin
-	${INSTALL_PROGRAM} -g fcron -o fcron -m 6111 ${WRKSRC}/fcrondyn ${PREFIX}/bin
 .for f in fcron.allow fcron.conf fcron.deny
 	${INSTALL_DATA} -g fcron -m 640 ${WRKSRC}/files/${f} ${PREFIX}/etc/${f}.dist
 .endfor
diff -Nur /usr/ports/sysutils/fcron/files/patch-configure src/fcron/files/patch-configure
--- /usr/ports/sysutils/fcron/files/patch-configure	Tue Oct  4 11:54:23 2005
+++ src/fcron/files/patch-configure	Wed Dec 31 17:00:00 1969
@@ -1,20 +0,0 @@
---- configure.orig	Tue Oct  4 18:39:16 2005
-+++ configure	Tue Oct  4 18:42:04 2005
-@@ -11767,17 +11767,9 @@
-     fi
-     ;;
-   *)
--    if test -d "$withval"; then
-       etcdir="$withval"
-       echo "$as_me:$LINENO: result: $withval" >&5
- echo "${ECHO_T}$withval" >&6
--    else
--      { { echo "$as_me:$LINENO: error:
--Directory $withval does not exist" >&5
--echo "$as_me: error:
--Directory $withval does not exist" >&2;}
--   { (exit 1); exit 1; }; }
--    fi
-     ;;
-   esac
- else
diff -Nur /usr/ports/sysutils/fcron/pkg-plist src/fcron/pkg-plist
--- /usr/ports/sysutils/fcron/pkg-plist	Tue Oct  4 11:54:23 2005
+++ src/fcron/pkg-plist	Thu Nov 10 01:04:26 2005
@@ -1,4 +1,3 @@
-bin/fcrondyn
 bin/fcronsighup
 bin/fcrontab
 etc/fcron.allow.dist
------------------------- cut here -------------------------
Comment 5 Sergey Matveychuk freebsd_committer 2005-11-12 21:24:19 UTC
State Changed
From-To: feedback->closed

Committed, thanks!