From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Dec 14 11:40:02 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4D67106564A for ; Sun, 14 Dec 2008 11:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A55208FC16 for ; Sun, 14 Dec 2008 11:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mBEBe2pe038122 for ; Sun, 14 Dec 2008 11:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mBEBe2rG038121; Sun, 14 Dec 2008 11:40:02 GMT (envelope-from gnats) Resent-Date: Sun, 14 Dec 2008 11:40:02 GMT Resent-Message-Id: <200812141140.mBEBe2rG038121@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Artemiev Igor Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEB08106564A for ; Sun, 14 Dec 2008 11:34:12 +0000 (UTC) (envelope-from ai@kliksys.ru) Received: from gate.kliksys.ru (gate.kliksys.ru [78.110.241.113]) by mx1.freebsd.org (Postfix) with ESMTP id 811DF8FC1B for ; Sun, 14 Dec 2008 11:34:12 +0000 (UTC) (envelope-from ai@kliksys.ru) Received: from ai by serf.kliksys.ru with local (Exim 4.68 (FreeBSD)) (envelope-from ) id 1LBGj1-0002O4-5r; Sat, 13 Dec 2008 01:43:11 +0300 Message-Id: Date: Sat, 13 Dec 2008 01:43:11 +0300 From: Artemiev Igor To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: mnag@FreeBSD.org Subject: ports/129631: Memcached threading support broken X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Artemiev Igor List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 11:40:02 -0000 >Number: 129631 >Category: ports >Synopsis: Memcached threading support broken >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Dec 14 11:40:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Artemiev Igor >Release: FreeBSD 7.1-PRERELEASE i386 >Organization: KlikSYS >Environment: System: FreeBSD one.kliksys.ru 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #5: Tue Sep 2 22:18:33 MSD 2008 root@one.kliksys.ru:/usr/obj/usr/src.7/sys/KERNEL i386 >Description: Broken thread support with configure --enable-threads. After install the port "memcached -h" output didn`t show -t switch (thread number) With configure script patch memcached core dumped after setting thread number. >How-To-Repeat: Put into /usr/ports/databases/memcached/Makefile.local: CONFIGURE_ARGS+= --enable-threads Then: make -C /usr/ports/databases/memcached configure ... checking for socklen_t... yes checking for endianness... little test: x: unexpected operator checking for mlockall... yes ... After fix this error: memcached -t8 -u root Segmentation fault (core dumped) >Fix: configure thread support fix: --- configure.orig 2008-12-11 14:32:52.000000000 +0000 +++ configure 2008-12-11 14:33:30.000000000 +0000 @@ -5637,7 +5637,7 @@ enableval=$enable_threads; fi -if test "x$enable_threads" == "xyes"; then +if test "x$enable_threads" = xyes; then { echo "$as_me:$LINENO: checking for library containing pthread_create" >&5 echo $ECHO_N "checking for library containing pthread_create... $ECHO_C" >&6; } if test "${ac_cv_search_pthread_create+set}" = set; then Segmentation fault fix: --- thread.c.orig 2008-12-11 17:26:42.000000000 +0000 +++ thread.c 2008-12-11 17:27:18.000000000 +0000 @@ -644,6 +644,7 @@ perror("Can't allocate thread descriptors"); exit(1); } + memset(threads, 0, sizeof(LIBEVENT_THREAD) * nthreads); threads[0].base = main_base; threads[0].thread_id = pthread_self(); >Release-Note: >Audit-Trail: >Unformatted: