Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Feb 2003 12:41:52 -0800 (PST)
From:      Shizuka Kudo <shizukakudo_99@yahoo.com>
To:        freebsd-current@freebsd.org
Subject:   today's 5-current hang hard when building apache2 port
Message-ID:  <20030221204152.9440.qmail@web11408.mail.yahoo.com>

next in thread | raw e-mail | index | archive | help
--0-167034093-1045860112=:8432
Content-Type: text/plain; charset=us-ascii
Content-Id: 
Content-Disposition: inline

I cvsup today and build/install world & kernel.  The machine was working fine until I tried to
build apache2 port.  When configuring apache2, my PC hanged at the following line and need hard
reset (i.e. cannot break into debugger and need pressing reset button).

  checking if TCP_NODELAY setting is inherited from listening sockets...

I traced the conftest program under gdb and received the following error on the 
  "rc = connect(client_s, (struct sockaddr *)&sa, sizeof sa)" call.

  Program received signal SIGSEGV, Segmentation fault.
  0x280fdaf0 in _longjmp () from /usr/lib/libc.so.5

Anyone has the same problem or idea what's happening?

Attached are the confdefs.h and conftest.c extracted from srclib/apr/configure that gave the above
problem.

P.S. When building the apache2 port, I had CPUTYPE=p3 in make.conf and used "make configure WITH_THREADS=yes"

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
--0-167034093-1045860112=:8432
Content-Type: text/x-chdr; name="confdefs.h"
Content-Description: confdefs.h
Content-Disposition: inline; filename="confdefs.h"


#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define HAVE_DLFCN_H 1
#define HAVE_LIBM 1
#define HAVE_PTHREAD_H 1
#define USE_THREADS 1
#define HAVE_PTHREAD_KEY_DELETE 1
#define HAVE_PTHREAD_RWLOCK_INIT 1
#define READDIR_IS_THREAD_SAFE 1
#define GETHOSTBYNAME_IS_THREAD_SAFE 1
#define GETHOSTBYADDR_IS_THREAD_SAFE 1
#define HAVE_GETHOSTBYADDR_R 1
#define HAVE_SIGSUSPEND 1
#define HAVE_SIGWAIT 1
#define HAVE_POLL 1
#define HAVE_SYS_MMAN_H 1
#define HAVE_SYS_IPC_H 1
#define HAVE_SYS_SHM_H 1
#define HAVE_SYS_FILE_H 1
#define HAVE_MMAP 1
#define HAVE_MUNMAP 1
#define HAVE_SHM_OPEN 1
#define HAVE_SHM_UNLINK 1
#define HAVE_SHMGET 1
#define HAVE_SHMAT 1
#define HAVE_SHMDT 1
#define HAVE_SHMCTL 1
#define HAVE_MAP_ANON 1
#define anonymous shared memory allocation method 1
#define USE_SHMEM_MMAP_ANON 1
#define namebased memory allocation method 1
#define USE_SHMEM_SHMGET 1
#define HAVE_ALLOCA 1
#define HAVE_CALLOC 1
#define HAVE_STRCASECMP 1
#define HAVE_SETSID 1
#define HAVE_ISINF 1
#define HAVE_ISNAN 1
#define HAVE_SETRLIMIT 1
#define HAVE_GETRLIMIT 1
#define HAVE_WRITEV 1
#define HAVE_SENDFILE 1
#define HAVE_SIGACTION 1
#define SYS_SIGLIST_DECLARED 1
#define HAVE_FORK 1
#define HAVE_STRERROR_R 1
#define STRERROR_R_RC_INT 1
#define HAVE_MMAP 1
#define HAVE_MEMMOVE 1
#define HAVE_GETPASS 1
#define HAVE_GMTIME_R 1
#define HAVE_LOCALTIME_R 1
#define HAVE_HSTRERROR 1
#define HAVE_MKSTEMP 1
#define DIRENT_INODE d_fileno
#define DIRENT_TYPE d_type
#define STDC_HEADERS 1
#define HAVE_CTYPE_H 1
#define HAVE_DIRENT_H 1
#define HAVE_DLFCN_H 1
#define HAVE_ERRNO_H 1
#define HAVE_FCNTL_H 1
#define HAVE_GRP_H 1
#define HAVE_LIMITS_H 1
#define HAVE_MEMORY_H 1
#define HAVE_NETDB_H 1
#define HAVE_OSRELDATE_H 1
#define HAVE_POLL_H 1
#define HAVE_PWD_H 1
#define HAVE_SEMAPHORE_H 1
#define HAVE_SIGNAL_H 1
#define HAVE_STDARG_H 1
#define HAVE_STDDEF_H 1
#define HAVE_STDIO_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_STRINGS_H 1
#define HAVE_TERMIOS_H 1
#define HAVE_TIME_H 1
#define HAVE_UNISTD_H 1
#define HAVE_ARPA_INET_H 1
#define HAVE_NETINET_IN_H 1
#define HAVE_SYS_FILE_H 1
#define HAVE_SYS_MMAN_H 1
#define HAVE_SYS_POLL_H 1
#define HAVE_SYS_RESOURCE_H 1
#define HAVE_SYS_SELECT_H 1
#define HAVE_SYS_SEM_H 1
#define HAVE_SYS_SIGNAL_H 1
#define HAVE_SYS_SOCKET_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_SYSCTL_H 1
#define HAVE_SYS_SYSLIMITS_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_UIO_H 1
#define HAVE_SYS_UN_H 1
#define HAVE_SYS_WAIT_H 1
#define HAVE_NETINET_TCP_H 1
#define HAVE_SOCKLEN_T 1
#define SIZEOF_VOIDP 4
#define SIZEOF_CHAR 1
#define SIZEOF_INT 4
#define SIZEOF_LONG 4
#define SIZEOF_SHORT 2
#define SIZEOF_LONG_DOUBLE 12
#define SIZEOF_LONG_LONG 8
#define SIZEOF_SSIZE_T 4
#define SIZEOF_SIZE_T 4
#define SIZEOF_OFF_T 8
#define SIZEOF_PID_T 4
#define HAVE_STRNCASECMP 1
#define HAVE_STRCASECMP 1
#define HAVE_STRDUP 1
#define HAVE_STRSTR 1
#define HAVE_MEMCHR 1
#define HAVE_STRTOLL 1
#define HAVE_DLOPEN 1
#define HAVE_DLSYM 1
#define DSO_USE_DLFCN 1
#define HAVE_WAITPID 1
#define HAVE_VLA 1
#define HAVE_SEMGET 1
#define HAVE_SEMCTL 1
#define HAVE_FLOCK 1
#define HAVE_SEMAPHORE_H 1
#define HAVE_SEM_CLOSE 1
#define HAVE_SEM_UNLINK 1
#define HAVE_SEM_POST 1
#define HAVE_SEM_WAIT 1
#define HAVE_LOCK_EX 1
#define HAVE_F_SETLK 1
#define HAVE_SEM_UNDO 1
#define HAVE_POLLIN 1
#define HAVE_PTHREAD_PROCESS_SHARED 1
#define apr_lock implementation method 1
#define USE_FLOCK_SERIALIZE 1
#define DEV_RANDOM "/dev/random"
#define HAVE_GMTOFF 1
#define HAVE_SOCKADDR_SA_LEN 1

--0-167034093-1045860112=:8432
Content-Type: text/x-csrc; name="conftest.c"
Content-Description: conftest.c
Content-Disposition: inline; filename="conftest.c"

#line 25093 "configure"
#include "confdefs.h"

#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_NETINET_TCP_H
#include <netinet/tcp.h>
#endif
#ifndef HAVE_SOCKLEN_T
typedef int socklen_t;
#endif
int main(void) {
    int listen_s, connected_s, client_s;
    int listen_port, rc;
    struct sockaddr_in sa;
    socklen_t sa_len;
    socklen_t option_len;
    int option;

    listen_s = socket(AF_INET, SOCK_STREAM, 0);
    if (listen_s < 0) {
        perror("socket");
        exit(1);
    }
    option = 1;
    rc = setsockopt(listen_s, IPPROTO_TCP, TCP_NODELAY, &option, sizeof option);
    if (rc < 0) {
        perror("setsockopt TCP_NODELAY");
        exit(1);
    }
    memset(&sa, 0, sizeof sa);
    sa.sin_family = AF_INET;
#ifdef BEOS
    sa.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
#endif
    /* leave port 0 to get ephemeral */
    rc = bind(listen_s, (struct sockaddr *)&sa, sizeof sa);
    if (rc < 0) {
        perror("bind for ephemeral port");
        exit(1);
    }
    /* find ephemeral port */
    sa_len = sizeof(sa);
    rc = getsockname(listen_s, (struct sockaddr *)&sa, &sa_len);
    if (rc < 0) {
        perror("getsockname");
        exit(1);
    }
    listen_port = sa.sin_port;
    rc = listen(listen_s, 5);
    if (rc < 0) {
        perror("listen");
        exit(1);
    }
    client_s = socket(AF_INET, SOCK_STREAM, 0);
    if (client_s < 0) {
        perror("socket");
        exit(1);
    }
    memset(&sa, 0, sizeof sa);
    sa.sin_family = AF_INET;
    sa.sin_port   = listen_port;
#ifdef BEOS
    sa.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
#endif
    /* leave sin_addr all zeros to use loopback */
    rc = connect(client_s, (struct sockaddr *)&sa, sizeof sa);
    if (rc < 0) {
        perror("connect");
        exit(1);
    }
    sa_len = sizeof sa;
    connected_s = accept(listen_s, (struct sockaddr *)&sa, &sa_len);
    if (connected_s < 0) {
        perror("accept");
        exit(1);
    }
    option_len = sizeof option;
    rc = getsockopt(connected_s, IPPROTO_TCP, TCP_NODELAY, &option, &option_len);
    if (rc < 0) {
        perror("getsockopt");
        exit(1);
    }
    if (!option) {
        fprintf(stderr, "TCP_NODELAY is not set in the child.\n");
        exit(1);
    }
    return 0;
}


--0-167034093-1045860112=:8432--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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