Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Mar 2006 04:35:31 GMT
From:      Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/94585: mail/mailagent 'basic/config' test hangs on FreeBSD-6 amd64
Message-ID:  <200603170435.k2H4ZVSi055198@www.freebsd.org>
Resent-Message-ID: <200603170440.k2H4eGOA037029@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         94585
>Category:       ports
>Synopsis:       mail/mailagent 'basic/config' test hangs on FreeBSD-6 amd64
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 17 04:40:15 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Yoshiaki Kasahara
>Release:        FreeBSD-6.1-PRERELEASE
>Organization:
Kyushu University
>Environment:
FreeBSD elbow2.cc.kyushu-u.ac.jp 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #0: Tue Mar 14 19:36:31 JST 2006     kasahara@elbow2.cc.kyushu-u.ac.jp:/usr/obj/usr/src/sys/ELVENBOW  amd64

>Description:
Building mail/mailagent hangs during running tests (basic/config). 
'filter' process starts to eat all the CPU and doesn't respond to SIGTERM.
SIGKILL works as usual.  On i386 platform there is no such behaviour.  
If I replace 'filter' binary by i386's one, the test passes.

Further investigation reveals that the following code causes SEGV on amd64, but not on i386.

--------------------------
#include <stdio.h>

int main()
{
   printf("%s\n",strerror(2));
   exit(0);
}
--------------------------

Adding "#include <string.h>" solves the problem.

logfile.c in agent/filter doesn't include string.h, and it seems to cause an infininte loop during its signal handling.

I'm not an expert of C programming, so I'm not sure whether it is a bug of
FreeBSD amd64 itself or including string.h is mandatory.
>How-To-Repeat:
make /usr/ports/mail/mailagent as an ordinary user on FreeBSD-6 amd64.

>Fix:
Add the following file to patch directory of the port.

--- agent/filter/logfile.c.orig Fri Mar 17 12:59:44 2006
+++ agent/filter/logfile.c      Fri Mar 17 13:02:25 2006
@@ -47,6 +47,12 @@
 #include <stdio.h>
 #include <sys/types.h>
 
+#ifdef I_STRING
+#include <string.h>
+#else
+#include <strings.h>
+#endif
+
 #ifdef I_TIME
 # include <time.h>
 #endif

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603170435.k2H4ZVSi055198>