From owner-svn-src-stable-7@FreeBSD.ORG Sun Apr 17 11:35:23 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28BA9106566B; Sun, 17 Apr 2011 11:35:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C78A8FC14; Sun, 17 Apr 2011 11:35:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3HBZMws036928; Sun, 17 Apr 2011 11:35:22 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HBZMI0036923; Sun, 17 Apr 2011 11:35:22 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201104171135.p3HBZMI0036923@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 17 Apr 2011 11:35:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220737 - in stable/7/sys: amd64/amd64 amd64/ia32 i386/i386 kern X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Apr 2011 11:35:23 -0000 Author: kib Date: Sun Apr 17 11:35:22 2011 New Revision: 220737 URL: http://svn.freebsd.org/changeset/base/220737 Log: MFC r218327: Clear the padding when returning context to the usermode, for MI ucontext_t and x86 MD parts. Tested-by: Oliver Pinter Modified: stable/7/sys/amd64/amd64/machdep.c stable/7/sys/amd64/ia32/ia32_signal.c stable/7/sys/i386/i386/machdep.c stable/7/sys/kern/kern_context.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/amd64/machdep.c ============================================================================== --- stable/7/sys/amd64/amd64/machdep.c Sun Apr 17 06:05:37 2011 (r220736) +++ stable/7/sys/amd64/amd64/machdep.c Sun Apr 17 11:35:22 2011 (r220737) @@ -306,6 +306,9 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sf.sf_uc.uc_mcontext.mc_len = sizeof(sf.sf_uc.uc_mcontext); /* magic */ get_fpcontext(td, &sf.sf_uc.uc_mcontext); fpstate_drop(td); + bzero(sf.sf_uc.uc_mcontext.mc_spare, + sizeof(sf.sf_uc.uc_mcontext.mc_spare)); + bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && @@ -327,6 +330,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, /* Build the argument list for the signal handler. */ regs->tf_rdi = sig; /* arg 1 in %rdi */ regs->tf_rdx = (register_t)&sfp->sf_uc; /* arg 3 in %rdx */ + bzero(&sf.sf_si, sizeof(sf.sf_si)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ regs->tf_rsi = (register_t)&sfp->sf_si; /* arg 2 in %rsi */ @@ -1653,6 +1657,7 @@ get_mcontext(struct thread *td, mcontext mcp->mc_ss = tp->tf_ss; mcp->mc_len = sizeof(*mcp); get_fpcontext(td, mcp); + bzero(mcp->mc_spare, sizeof(mcp->mc_spare)); return (0); } Modified: stable/7/sys/amd64/ia32/ia32_signal.c ============================================================================== --- stable/7/sys/amd64/ia32/ia32_signal.c Sun Apr 17 06:05:37 2011 (r220736) +++ stable/7/sys/amd64/ia32/ia32_signal.c Sun Apr 17 11:35:22 2011 (r220737) @@ -158,6 +158,8 @@ ia32_get_mcontext(struct thread *td, str mcp->mc_ss = tp->tf_ss; mcp->mc_len = sizeof(*mcp); ia32_get_fpcontext(td, mcp); + bzero(mcp->mc_spare1, sizeof(mcp->mc_spare1)); + bzero(mcp->mc_spare2, sizeof(mcp->mc_spare2)); return (0); } @@ -226,6 +228,7 @@ freebsd32_getcontext(struct thread *td, PROC_LOCK(td->td_proc); uc.uc_sigmask = td->td_sigmask; PROC_UNLOCK(td->td_proc); + bzero(&uc.__spare__, sizeof(uc.__spare__)); ret = copyout(&uc, uap->ucp, UC_COPY_SIZE); } return (ret); @@ -345,6 +348,11 @@ freebsd4_ia32_sendsig(sig_t catcher, ksi sf.sf_uc.uc_mcontext.mc_eflags = regs->tf_rflags; sf.sf_uc.uc_mcontext.mc_esp = regs->tf_rsp; sf.sf_uc.uc_mcontext.mc_ss = regs->tf_ss; + bzero(sf.sf_uc.uc_mcontext.mc_fpregs, + sizeof(sf.sf_uc.uc_mcontext.mc_fpregs)); + bzero(sf.sf_uc.uc_mcontext.__spare__, + sizeof(sf.sf_uc.uc_mcontext.__spare__)); + bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && @@ -362,6 +370,7 @@ freebsd4_ia32_sendsig(sig_t catcher, ksi /* Build the argument list for the signal handler. */ sf.sf_signum = sig; sf.sf_ucontext = (register_t)&sfp->sf_uc; + bzero(&sf.sf_si, sizeof(sf.sf_si)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_siginfo = (u_int32_t)(uintptr_t)&sfp->sf_si; @@ -463,6 +472,7 @@ ia32_sendsig(sig_t catcher, ksiginfo_t * sf.sf_uc.uc_mcontext.mc_len = sizeof(sf.sf_uc.uc_mcontext); /* magic */ ia32_get_fpcontext(td, &sf.sf_uc.uc_mcontext); fpstate_drop(td); + bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && @@ -482,6 +492,7 @@ ia32_sendsig(sig_t catcher, ksiginfo_t * /* Build the argument list for the signal handler. */ sf.sf_signum = sig; sf.sf_ucontext = (register_t)&sfp->sf_uc; + bzero(&sf.sf_si, sizeof(sf.sf_si)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_siginfo = (u_int32_t)(uintptr_t)&sfp->sf_si; Modified: stable/7/sys/i386/i386/machdep.c ============================================================================== --- stable/7/sys/i386/i386/machdep.c Sun Apr 17 06:05:37 2011 (r220736) +++ stable/7/sys/i386/i386/machdep.c Sun Apr 17 11:35:22 2011 (r220737) @@ -342,12 +342,14 @@ osendsig(sig_t catcher, ksiginfo_t *ksi, /* Build the argument list for the signal handler. */ sf.sf_signum = sig; sf.sf_scp = (register_t)&fp->sf_siginfo.si_sc; + bzero(&sf.sf_siginfo, sizeof(sf.sf_siginfo)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_arg2 = (register_t)&fp->sf_siginfo; sf.sf_siginfo.si_signo = sig; sf.sf_siginfo.si_code = ksi->ksi_code; sf.sf_ahu.sf_action = (__osiginfohandler_t *)catcher; + sf.sf_addr = 0; } else { /* Old FreeBSD-style arguments. */ sf.sf_arg2 = ksi->ksi_code; @@ -461,6 +463,11 @@ freebsd4_sendsig(sig_t catcher, ksiginfo sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0; sf.sf_uc.uc_mcontext.mc_gs = rgs(); bcopy(regs, &sf.sf_uc.uc_mcontext.mc_fs, sizeof(*regs)); + bzero(sf.sf_uc.uc_mcontext.mc_fpregs, + sizeof(sf.sf_uc.uc_mcontext.mc_fpregs)); + bzero(sf.sf_uc.uc_mcontext.__spare__, + sizeof(sf.sf_uc.uc_mcontext.__spare__)); + bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && @@ -480,6 +487,7 @@ freebsd4_sendsig(sig_t catcher, ksiginfo /* Build the argument list for the signal handler. */ sf.sf_signum = sig; sf.sf_ucontext = (register_t)&sfp->sf_uc; + bzero(&sf.sf_si, sizeof(sf.sf_si)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_siginfo = (register_t)&sfp->sf_si; @@ -596,6 +604,11 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sf.sf_uc.uc_mcontext.mc_len = sizeof(sf.sf_uc.uc_mcontext); /* magic */ get_fpcontext(td, &sf.sf_uc.uc_mcontext); fpstate_drop(td); + bzero(sf.sf_uc.uc_mcontext.mc_spare1, + sizeof(sf.sf_uc.uc_mcontext.mc_spare1)); + bzero(sf.sf_uc.uc_mcontext.mc_spare2, + sizeof(sf.sf_uc.uc_mcontext.mc_spare2)); + bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && @@ -617,6 +630,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, /* Build the argument list for the signal handler. */ sf.sf_signum = sig; sf.sf_ucontext = (register_t)&sfp->sf_uc; + bzero(&sf.sf_si, sizeof(sf.sf_si)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_siginfo = (register_t)&sfp->sf_si; @@ -2716,6 +2730,8 @@ get_mcontext(struct thread *td, mcontext mcp->mc_ss = tp->tf_ss; mcp->mc_len = sizeof(*mcp); get_fpcontext(td, mcp); + bzero(mcp->mc_spare1, sizeof(mcp->mc_spare1)); + bzero(mcp->mc_spare2, sizeof(mcp->mc_spare2)); return (0); } @@ -2763,6 +2779,7 @@ get_fpcontext(struct thread *td, mcontex #ifndef DEV_NPX mcp->mc_fpformat = _MC_FPFMT_NODEV; mcp->mc_ownedfp = _MC_FPOWNED_NONE; + bzero(mcp->mc_fpstate, sizeof(mcp->mc_fpstate)); #else union savefpu *addr; Modified: stable/7/sys/kern/kern_context.c ============================================================================== --- stable/7/sys/kern/kern_context.c Sun Apr 17 06:05:37 2011 (r220736) +++ stable/7/sys/kern/kern_context.c Sun Apr 17 11:35:22 2011 (r220737) @@ -71,6 +71,7 @@ getcontext(struct thread *td, struct get PROC_LOCK(td->td_proc); uc.uc_sigmask = td->td_sigmask; PROC_UNLOCK(td->td_proc); + bzero(uc.__spare__, sizeof(uc.__spare__)); ret = copyout(&uc, uap->ucp, UC_COPY_SIZE); } return (ret); @@ -109,6 +110,7 @@ swapcontext(struct thread *td, struct sw ret = EINVAL; else { get_mcontext(td, &uc.uc_mcontext, GET_MC_CLEAR_RET); + bzero(uc.__spare__, sizeof(uc.__spare__)); PROC_LOCK(td->td_proc); uc.uc_sigmask = td->td_sigmask; PROC_UNLOCK(td->td_proc); From owner-svn-src-stable-7@FreeBSD.ORG Sun Apr 17 21:57:08 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCC06106564A; Sun, 17 Apr 2011 21:57:08 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC5688FC13; Sun, 17 Apr 2011 21:57:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3HLv89V050835; Sun, 17 Apr 2011 21:57:08 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HLv8Ad050832; Sun, 17 Apr 2011 21:57:08 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201104172157.p3HLv8Ad050832@svn.freebsd.org> From: Edwin Groothuis Date: Sun, 17 Apr 2011 21:57:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220758 - stable/7/usr.bin/logger X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Apr 2011 21:57:08 -0000 Author: edwin Date: Sun Apr 17 21:57:08 2011 New Revision: 220758 URL: http://svn.freebsd.org/changeset/base/220758 Log: MFC of r220448 When specifying the -t option (send tag in front of message), this tag should also be forwarded to the remote logging host, not only when the logging is done locally. PR: bin/154324 Submitted by: Callum Gibson Modified: stable/7/usr.bin/logger/logger.1 stable/7/usr.bin/logger/logger.c Directory Properties: stable/7/usr.bin/logger/ (props changed) Modified: stable/7/usr.bin/logger/logger.1 ============================================================================== --- stable/7/usr.bin/logger/logger.1 Sun Apr 17 21:52:57 2011 (r220757) +++ stable/7/usr.bin/logger/logger.1 Sun Apr 17 21:57:08 2011 (r220758) @@ -106,7 +106,8 @@ facility. The default is ``user.notice.'' .It Fl t Ar tag Mark every line in the log with the specified -.Ar tag . +.Ar tag +rather than the default of current login name. .It Ar message Write the message to log; if not specified, and the .Fl f Modified: stable/7/usr.bin/logger/logger.c ============================================================================== --- stable/7/usr.bin/logger/logger.c Sun Apr 17 21:52:57 2011 (r220757) +++ stable/7/usr.bin/logger/logger.c Sun Apr 17 21:57:08 2011 (r220758) @@ -63,7 +63,8 @@ __FBSDID("$FreeBSD$"); int decode(char *, CODE *); int pencode(char *); -static void logmessage(int, const char *, const char *, const char *); +static void logmessage(int, const char *, const char *, const char *, + const char *); static void usage(void); struct socks { @@ -140,8 +141,11 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; + if (tag == NULL) + tag = getlogin(); /* setup for logging */ - openlog(tag ? tag : getlogin(), logflags, 0); + if (host == NULL) + openlog(tag, logflags, 0); (void) fclose(stdout); /* log input line if appropriate */ @@ -152,11 +156,11 @@ main(int argc, char *argv[]) for (p = buf, endp = buf + sizeof(buf) - 2; *argv;) { len = strlen(*argv); if (p + len > endp && p > buf) { - logmessage(pri, host, svcname, buf); + logmessage(pri, tag, host, svcname, buf); p = buf; } if (len > sizeof(buf) - 1) - logmessage(pri, host, svcname, *argv++); + logmessage(pri, tag, host, svcname, *argv++); else { if (p != buf) *p++ = ' '; @@ -165,10 +169,10 @@ main(int argc, char *argv[]) } } if (p != buf) - logmessage(pri, host, svcname, buf); + logmessage(pri, tag, host, svcname, buf); } else while (fgets(buf, sizeof(buf), stdin) != NULL) - logmessage(pri, host, svcname, buf); + logmessage(pri, tag, host, svcname, buf); exit(0); } @@ -176,7 +180,8 @@ main(int argc, char *argv[]) * Send the message to syslog, either on the local host, or on a remote host */ void -logmessage(int pri, const char *host, const char *svcname, const char *buf) +logmessage(int pri, const char *tag, const char *host, const char *svcname, + const char *buf) { static struct socks *socks; static int nsock = 0; @@ -220,7 +225,7 @@ logmessage(int pri, const char *host, co errx(1, "socket"); } - if ((len = asprintf(&line, "<%d>%s", pri, buf)) == -1) + if ((len = asprintf(&line, "<%d>%s: %s", pri, tag, buf)) == -1) errx(1, "asprintf"); lsent = -1; From owner-svn-src-stable-7@FreeBSD.ORG Sun Apr 17 22:26:08 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A6AC1065670; Sun, 17 Apr 2011 22:26:08 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 289B58FC0C; Sun, 17 Apr 2011 22:26:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3HMQ8b8051538; Sun, 17 Apr 2011 22:26:08 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HMQ81Y051533; Sun, 17 Apr 2011 22:26:08 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201104172226.p3HMQ81Y051533@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 17 Apr 2011 22:26:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220759 - in stable/7: lib/libc/gen lib/libc/string tools/regression/lib/libc/string X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Apr 2011 22:26:08 -0000 Author: jilles Date: Sun Apr 17 22:26:07 2011 New Revision: 220759 URL: http://svn.freebsd.org/changeset/base/220759 Log: MFC r220376: Allow strerror(0) and strerror_r(0, ...). Of course, strerror_r() may still fail with ERANGE. Although the POSIX specification said this could fail with EINVAL and doing this likely indicates invalid use of errno, most other implementations permitted it, various POSIX testsuites require it to work (matching the older sys_errlist array) and apparently some applications depend on it. PR: standards/151316 Modified: stable/7/lib/libc/gen/errlst.c stable/7/lib/libc/string/strerror.3 stable/7/lib/libc/string/strerror.c stable/7/tools/regression/lib/libc/string/test-strerror.c Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) stable/7/tools/regression/lib/libc/ (props changed) Modified: stable/7/lib/libc/gen/errlst.c ============================================================================== --- stable/7/lib/libc/gen/errlst.c Sun Apr 17 21:57:08 2011 (r220758) +++ stable/7/lib/libc/gen/errlst.c Sun Apr 17 22:26:07 2011 (r220759) @@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$"); #include const char *const sys_errlist[] = { - "Undefined error: 0", /* 0 - ENOERROR */ + "No error: 0", /* 0 - ENOERROR */ "Operation not permitted", /* 1 - EPERM */ "No such file or directory", /* 2 - ENOENT */ "No such process", /* 3 - ESRCH */ Modified: stable/7/lib/libc/string/strerror.3 ============================================================================== --- stable/7/lib/libc/string/strerror.3 Sun Apr 17 21:57:08 2011 (r220758) +++ stable/7/lib/libc/string/strerror.3 Sun Apr 17 22:26:07 2011 (r220759) @@ -32,7 +32,7 @@ .\" @(#)strerror.3 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd October 12, 2004 +.Dd April 5, 2011 .Dt STRERROR 3 .Os .Sh NAME @@ -114,6 +114,9 @@ the range 0 < .Fa errnum < .Fa sys_nerr . +The number 0 is also recognized, although applications that take advantage of +this are likely to use unspecified values of +.Va errno . .Pp If insufficient storage is provided in .Fa strerrbuf Modified: stable/7/lib/libc/string/strerror.c ============================================================================== --- stable/7/lib/libc/string/strerror.c Sun Apr 17 21:57:08 2011 (r220758) +++ stable/7/lib/libc/string/strerror.c Sun Apr 17 22:26:07 2011 (r220759) @@ -87,7 +87,7 @@ strerror_r(int errnum, char *strerrbuf, catd = catopen("libc", NL_CAT_LOCALE); #endif - if (errnum < 1 || errnum >= sys_nerr) { + if (errnum < 0 || errnum >= sys_nerr) { errstr(errnum, #if defined(NLS) catgets(catd, 1, 0xffff, UPREFIX), Modified: stable/7/tools/regression/lib/libc/string/test-strerror.c ============================================================================== --- stable/7/tools/regression/lib/libc/string/test-strerror.c Sun Apr 17 21:57:08 2011 (r220758) +++ stable/7/tools/regression/lib/libc/string/test-strerror.c Sun Apr 17 22:26:07 2011 (r220759) @@ -42,17 +42,12 @@ main(void) char *sret; int iret; - plan_tests(25); + plan_tests(27); /* * strerror() failure tests. */ errno = 0; - sret = strerror(0); - ok1(strcmp(sret, "Unknown error: 0") == 0); - ok1(errno == EINVAL); - - errno = 0; sret = strerror(INT_MAX); snprintf(buf, sizeof(buf), "Unknown error: %d", INT_MAX); ok1(strcmp(sret, buf) == 0); @@ -62,6 +57,11 @@ main(void) * strerror() success tests. */ errno = 0; + sret = strerror(0); + ok1(strcmp(sret, "No error: 0") == 0); + ok1(errno == 0); + + errno = 0; sret = strerror(EPERM); ok1(strcmp(sret, "Operation not permitted") == 0); ok1(errno == 0); @@ -79,8 +79,8 @@ main(void) * strerror_r() failure tests. */ memset(buf, '*', sizeof(buf)); - iret = strerror_r(0, buf, sizeof(buf)); - ok1(strcmp(buf, "Unknown error: 0") == 0); + iret = strerror_r(-1, buf, sizeof(buf)); + ok1(strcmp(buf, "Unknown error: -1") == 0); ok1(iret == EINVAL); memset(buf, '*', sizeof(buf)); @@ -117,6 +117,11 @@ main(void) * strerror_r() success tests. */ memset(buf, '*', sizeof(buf)); + iret = strerror_r(0, buf, sizeof(buf)); + ok1(strcmp(buf, "No error: 0") == 0); + ok1(iret == 0); + + memset(buf, '*', sizeof(buf)); iret = strerror_r(EDEADLK, buf, sizeof(buf)); ok1(strcmp(buf, "Resource deadlock avoided") == 0); ok1(iret == 0); From owner-svn-src-stable-7@FreeBSD.ORG Mon Apr 18 08:53:23 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58183106564A; Mon, 18 Apr 2011 08:53:23 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 469248FC16; Mon, 18 Apr 2011 08:53:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3I8rNqJ064659; Mon, 18 Apr 2011 08:53:23 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3I8rN58064657; Mon, 18 Apr 2011 08:53:23 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201104180853.p3I8rN58064657@svn.freebsd.org> From: Sergey Kandaurov Date: Mon, 18 Apr 2011 08:53:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220766 - stable/7/lib/libdevstat X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 08:53:23 -0000 Author: pluknet Date: Mon Apr 18 08:53:22 2011 New Revision: 220766 URL: http://svn.freebsd.org/changeset/base/220766 Log: MFC r220319: Do not increment num_args if strsep(3) returned an empty field. That fixes devstat_buildmatch(3) crashes with certain strings. Reported by: arundel Modified: stable/7/lib/libdevstat/devstat.c Directory Properties: stable/7/lib/libdevstat/ (props changed) Modified: stable/7/lib/libdevstat/devstat.c ============================================================================== --- stable/7/lib/libdevstat/devstat.c Mon Apr 18 08:49:25 2011 (r220765) +++ stable/7/lib/libdevstat/devstat.c Mon Apr 18 08:53:22 2011 (r220766) @@ -1014,11 +1014,12 @@ devstat_buildmatch(char *match_str, stru * Break the (comma delimited) input string out into separate strings. */ for (tempstr = tstr, num_args = 0; - (*tempstr = strsep(&match_str, ",")) != NULL && (num_args < 5); - num_args++) - if (**tempstr != '\0') + (*tempstr = strsep(&match_str, ",")) != NULL && (num_args < 5);) + if (**tempstr != '\0') { + num_args++; if (++tempstr >= &tstr[5]) break; + } /* The user gave us too many type arguments */ if (num_args > 3) { From owner-svn-src-stable-7@FreeBSD.ORG Mon Apr 18 11:54:00 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48242106564A; Mon, 18 Apr 2011 11:54:00 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from thoth.sbs.de (thoth.sbs.de [192.35.17.2]) by mx1.freebsd.org (Postfix) with ESMTP id 2AA418FC0C; Mon, 18 Apr 2011 11:53:58 +0000 (UTC) Received: from mail1.siemens.de (localhost [127.0.0.1]) by thoth.sbs.de (8.13.6/8.13.6) with ESMTP id p3IBavN5029900; Mon, 18 Apr 2011 13:36:57 +0200 Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130]) by mail1.siemens.de (8.13.6/8.13.6) with ESMTP id p3IBavFp008050; Mon, 18 Apr 2011 13:36:57 +0200 Received: (from localhost) by curry.mchp.siemens.de (8.14.4/8.14.4) id p3IBavs4017083; Date: Mon, 18 Apr 2011 13:36:57 +0200 From: Andre Albsmeier To: John Baldwin Message-ID: <20110418113657.GA6080@curry.mchp.siemens.de> References: <201102041444.p14EixJP087709@svn.freebsd.org> <20110415132525.GA88202@curry.mchp.siemens.de> <201104151235.05114.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ZPt4rx8FFjLCG7dd" Content-Disposition: inline In-Reply-To: <201104151235.05114.jhb@freebsd.org> X-Echelon: X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.20 (2009-06-14) Cc: "svn-src-stable-7@freebsd.org" Subject: Re: svn commit: r218277 - in stable/7/sys: kern sys X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 11:54:00 -0000 --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, 15-Apr-2011 at 18:35:05 +0200, John Baldwin wrote: > On Friday, April 15, 2011 9:25:25 am Andre Albsmeier wrote: > > On Fri, 04-Feb-2011 at 14:44:59 +0000, John Baldwin wrote: > > > Author: jhb > > > Date: Fri Feb 4 14:44:59 2011 > > > New Revision: 218277 > > > URL: http://svn.freebsd.org/changeset/base/218277 > > > > > > Log: > > > MFC 217075: > > > Retire PCONFIG and leave the priority of thread0 alone when waiting for > > > interrupt config hooks to execute. > > > > > > To preserve the KBI, I did not renumber priorities but simply removed > > > PCONFIG. > > > > > > Modified: > > > stable/7/sys/kern/subr_autoconf.c > > > stable/7/sys/sys/priority.h > > > Directory Properties: > > > stable/7/sys/ (props changed) > > > stable/7/sys/cddl/contrib/opensolaris/ (props changed) > > > stable/7/sys/contrib/dev/acpica/ (props changed) > > > stable/7/sys/contrib/pf/ (props changed) > > > > > > Modified: stable/7/sys/kern/subr_autoconf.c > > > > ============================================================================== > > > --- stable/7/sys/kern/subr_autoconf.c Fri Feb 4 14:44:42 2011 > (r218276) > > > +++ stable/7/sys/kern/subr_autoconf.c Fri Feb 4 14:44:59 2011 > (r218277) > > > @@ -108,7 +108,7 @@ run_interrupt_driven_config_hooks(dummy) > > > warned = 0; > > > while (!TAILQ_EMPTY(&intr_config_hook_list)) { > > > if (msleep(&intr_config_hook_list, &intr_config_hook_lock, > > > - PCONFIG, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > + 0, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > EWOULDBLOCK) { > > > mtx_unlock(&intr_config_hook_lock); > > > warned++; > > > > > > This broke several of my machines in a somewhat strange way: > > > > After upgrading them (17) to a recent 7-STABLE (as of 2011-04-12) > > I noticed that some (4) of them didn't start. All 4 didn't find > > their boot device anymore. What they all got in common is: > > > > - an Adaptec 2940 Ultra SCSI adapter > > - two SCSI harddisks (da0 and da1) of various brands > > - one SCSI CDROM drive (cd0) > > > > To be exact, none of the three devices (da0, da1, cd0) were > > detected at all. Other machines with a similar configuration > > (2940 and da0/da1) but _without_ the CDROM drive didn't have > > any problems. So I simply removed the CDROM drives on the 4 > > machines in question and they all booted again. > > > > Today I decided to dig into this and after reverting(*) the > > above change, they worked with the CDROM again. I have cross- > > checked it 3 times. No idea what's happening here... > > > > -Andre > > > > (*) To be honest, I use this patch so I had to modify only one file: > > > > --- sys/kern/subr_autoconf.c.ORI 2011-02-05 13:14:11.000000000 +0100 > > +++ sys/kern/subr_autoconf.c 2011-04-15 14:34:31.000000000 +0200 > > @@ -108,7 +108,7 @@ > > warned = 0; > > while (!TAILQ_EMPTY(&intr_config_hook_list)) { > > if (msleep(&intr_config_hook_list, &intr_config_hook_lock, > > - 0, "conifhk", WARNING_INTERVAL_SECS * hz) == > > + PRI_MIN_KERN + 32, "conifhk", WARNING_INTERVAL_SECS * hz) == > > EWOULDBLOCK) { > > mtx_unlock(&intr_config_hook_lock); > > warned++; > > Do you get any warnings about CAM timeouts, etc. when these probe? A verbose > dmesg might be nice to look at if possible. OK, I have set up a machine for testing. In my other mail I was wrong saying that the pass devices appear when using the problematic kernel... Here are the dmesgs: - dmesg_bad is the original kernel as of Friday - dmesg_ok is the patched kernel (see above) as of Friday - dmesg.diff is the diff between both If you want me to try something just tell me... Thanks, -Andre --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=dmesg_ok Content-Transfer-Encoding: quoted-printable OK boot -sv |=08/=08-=08\=08|=08/=08-=08SMAP type=3D01 base=3D0000000000000000 len=3D00= 0000000009f800 SMAP type=3D02 base=3D000000000009f800 len=3D0000000000000800 SMAP type=3D02 base=3D00000000000f0000 len=3D0000000000010000 SMAP type=3D01 base=3D0000000000100000 len=3D000000000fefd000 SMAP type=3D03 base=3D000000000fffd000 len=3D0000000000002000 SMAP type=3D04 base=3D000000000ffff000 len=3D0000000000001000 SMAP type=3D02 base=3D00000000ffff0000 len=3D0000000000010000 Copyright (c) 1992-2011 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 7.4-STABLE #0: Fri Apr 15 14:58:58 CEST 2011 root@bali:/src/obj-7/src/src-7/sys/smbfix i386 Preloaded elf kernel "/boot/kernel/kernel" at 0xc0802000. Calibrating clock(s) ... i8254 clock: 1193166 Hz CLK_USE_I8254_CALIBRATION not specified - using default frequency Timecounter "i8254" frequency 1193182 Hz quality 0 Calibrating TSC clock ... TSC clock: 1403189147 Hz CPU: Intel(R) Celeron(TM) CPU 1400MHz (1403.19-MHz 686-class= CPU) Origin =3D "GenuineIntel" Id =3D 0x6b4 Family =3D 6 Model =3D b Stepp= ing =3D 4 Features=3D0x383f9ff Instruction TLB: 4 KB pages, 4-way set associative, 32 entries Instruction TLB: 4 MB pages, fully associative, 2 entries Data TLB: 4 KB pages, 4-way set associative, 64 entries 2nd-level cache: 256 KB, 8-way set associative, 32 byte line size 1st-level instruction cache: 16 KB, 4-way set associative, 32 byte line size Data TLB: 4 MB Pages, 4-way set associative, 8 entries 1st-level data cache: 16 KB, 4-way set associative, 32 byte line size real memory =3D 268423168 (255 MB) Physical memory chunk(s): 0x0000000000001000 - 0x000000000009efff, 647168 bytes (158 pages) 0x0000000000100000 - 0x00000000003fffff, 3145728 bytes (768 pages) 0x0000000000c25000 - 0x000000000fb45fff, 250744832 bytes (61217 pages) avail memory =3D 253374464 (241 MB) bios32: Found BIOS32 Service Directory header at 0xc00f9d40 bios32: Entry =3D 0xf0520 (c00f0520) Rev =3D 0 Len =3D 1 pcibios: PCI BIOS entry at 0xf0000+0x720 pnpbios: Found PnP BIOS data at 0xc00fd190 pnpbios: Entry =3D f0000:d1c0 Rev =3D 1.0 pnpbios: OEM ID cd041 Other BIOS signatures found: ULE: setup cpu 0 nfslock: pseudo-device null: random: io: mem: Pentium Pro MTRR support enabled ACPI: RSDP @ 0x0xf7f90/0x0014 (v000 ASUS ) ACPI: RSDT @ 0x0xfffd000/0x002C (v001 ASUS P2B 0x42302E31 MSFT 0x313= 13031) ACPI: FACP @ 0x0xfffd080/0x0074 (v001 ASUS P2B 0x42302E31 MSFT 0x313= 13031) ACPI: DSDT @ 0x0xfffd100/0x1BA8 (v001 ASUS P2B 0x00001000 MSFT 0x010= 00001) ACPI: FACS @ 0x0xffff000/0x0040 ACPI: BOOT @ 0x0xfffd040/0x0028 (v001 ASUS P2B 0x42302E31 MSFT 0x313= 13031) npx0: INT 16 interface acpi0: on motherboard acpi0: [MPSAFE] acpi0: [ITHREAD] acpi0: Power Button (fixed) acpi0: wakeup code va 0xc17e4000 pa 0x1000 atpic: Programming IRQ9 as level/low pci_open(1): mode 1 addr port (0x0cf8) is 0x80002358 pci_open(1a): mode1res=3D0x80000000 (0x80000000) pci_cfgcheck: device 0 [class=3D060000] [hdr=3D00] is there (id=3D71908086) pcibios: BIOS version 2.10 acpi_bus_number: root bus has no _BBN, assuming 0 AcpiOsDerivePciId: \_SB_.PCI0.PX40.PIRQ -> bus 0 dev 4 func 0 acpi_bus_number: root bus has no _BBN, assuming 0 AcpiOsDerivePciId: \_SB_.PCI0.PX43.IPMU -> bus 0 dev 4 func 3 acpi_bus_number: root bus has no _BBN, assuming 0 AcpiOsDerivePciId: \_SB_.PCI0.PX43.ISMB -> bus 0 dev 4 func 3 acpi0: reservation of 0, a0000 (3) failed acpi0: reservation of 100000, ff00000 (3) failed ACPI timer: 0/4 0/4 0/4 0/3 0/16777212 0/4 0/4 0/4 0/4 0/16777209 -> 0 Timecounter "ACPI-safe" frequency 3579545 Hz quality 850 acpi_timer0: <24-bit timer at 3.579545MHz> port 0xe408-0xe40b on acpi0 pci_link0: Index IRQ Rtd Ref IRQs Initial Probe 0 255 N 0 3 4 5 6 7 9 10 11 12 14 15 Validation 0 255 N 0 3 4 5 6 7 9 10 11 12 14 15 After Disable 0 255 N 0 3 4 5 6 7 9 10 11 12 14 15 pci_link1: Index IRQ Rtd Ref IRQs Initial Probe 0 11 N 0 3 4 5 6 7 9 10 11 12 14 15 Validation 0 11 N 0 3 4 5 6 7 9 10 11 12 14 15 After Disable 0 255 N 0 3 4 5 6 7 9 10 11 12 14 15 pci_link2: Index IRQ Rtd Ref IRQs Initial Probe 0 255 N 0 3 4 5 6 7 9 10 11 12 14 15 Validation 0 255 N 0 3 4 5 6 7 9 10 11 12 14 15 After Disable 0 255 N 0 3 4 5 6 7 9 10 11 12 14 15 pci_link3: Index IRQ Rtd Ref IRQs Initial Probe 0 10 N 0 3 4 5 6 7 9 10 11 12 14 15 Validation 0 10 N 0 3 4 5 6 7 9 10 11 12 14 15 After Disable 0 255 N 0 3 4 5 6 7 9 10 11 12 14 15 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 ACPI: Found matching pin for 0.11.INTA at func 0: 11 ACPI: Found matching pin for 0.9.INTA at func 0: 10 ACPI: Found matching pin for 0.4.INTD at func 2: 255 pci0: on pcib0 pci0: domain=3D0, physical bus=3D0 found-> vendor=3D0x8086, dev=3D0x7190, revid=3D0x03 domain=3D0, bus=3D0, slot=3D0, func=3D0 class=3D06-00-00, hdrtype=3D0x00, mfdev=3D0 cmdreg=3D0x0106, statreg=3D0x2210, cachelnsz=3D0 (dwords) lattimer=3D0x40 (1920 ns), mingnt=3D0x00 (0 ns), maxlat=3D0x00 (0 ns) map[10]: type Prefetchable Memory, range 32, base 0xe4000000, size 26, ena= bled found-> vendor=3D0x8086, dev=3D0x7191, revid=3D0x03 domain=3D0, bus=3D0, slot=3D1, func=3D0 class=3D06-04-00, hdrtype=3D0x01, mfdev=3D0 cmdreg=3D0x0117, statreg=3D0x0220, cachelnsz=3D0 (dwords) lattimer=3D0x40 (1920 ns), mingnt=3D0x80 (32000 ns), maxlat=3D0x00 (0 ns) found-> vendor=3D0x8086, dev=3D0x7110, revid=3D0x02 domain=3D0, bus=3D0, slot=3D4, func=3D0 class=3D06-01-00, hdrtype=3D0x00, mfdev=3D1 cmdreg=3D0x000f, statreg=3D0x0280, cachelnsz=3D0 (dwords) lattimer=3D0x00 (0 ns), mingnt=3D0x00 (0 ns), maxlat=3D0x00 (0 ns) found-> vendor=3D0x8086, dev=3D0x7111, revid=3D0x01 domain=3D0, bus=3D0, slot=3D4, func=3D1 class=3D01-01-80, hdrtype=3D0x00, mfdev=3D0 cmdreg=3D0x0000, statreg=3D0x0280, cachelnsz=3D0 (dwords) lattimer=3D0x20 (960 ns), mingnt=3D0x00 (0 ns), maxlat=3D0x00 (0 ns) map[20]: type I/O Port, range 32, base 0xd800, size 4, port disabled found-> vendor=3D0x8086, dev=3D0x7112, revid=3D0x01 domain=3D0, bus=3D0, slot=3D4, func=3D2 class=3D0c-03-00, hdrtype=3D0x00, mfdev=3D0 cmdreg=3D0x0005, statreg=3D0x0280, cachelnsz=3D0 (dwords) lattimer=3D0x20 (960 ns), mingnt=3D0x00 (0 ns), maxlat=3D0x00 (0 ns) intpin=3Dd, irq=3D255 map[20]: type I/O Port, range 32, base 0xd400, size 5, enabled found-> vendor=3D0x8086, dev=3D0x7113, revid=3D0x02 domain=3D0, bus=3D0, slot=3D4, func=3D3 class=3D06-80-00, hdrtype=3D0x00, mfdev=3D0 cmdreg=3D0x0003, statreg=3D0x0280, cachelnsz=3D0 (dwords) lattimer=3D0x00 (0 ns), mingnt=3D0x00 (0 ns), maxlat=3D0x00 (0 ns) map[90]: type I/O Port, range 32, base 0xe800, size 4, enabled found-> vendor=3D0x8086, dev=3D0x1229, revid=3D0x08 domain=3D0, bus=3D0, slot=3D9, func=3D0 class=3D02-00-00, hdrtype=3D0x00, mfdev=3D0 cmdreg=3D0x0017, statreg=3D0x0290, cachelnsz=3D8 (dwords) lattimer=3D0x20 (960 ns), mingnt=3D0x08 (2000 ns), maxlat=3D0x38 (14000 ns) intpin=3Da, irq=3D10 powerspec 2 supports D0 D1 D2 D3 current D0 map[10]: type Memory, range 32, base 0xe3000000, size 12, enabled map[14]: type I/O Port, range 32, base 0xd000, size 6, enabled map[18]: type Memory, range 32, base 0xe2800000, size 20, enabled pcib0: matched entry for 0.9.INTA (src \_SB_.LNKD:0) pcib0: slot 9 INTA routed to irq 10 via \_SB_.LNKD found-> vendor=3D0x9004, dev=3D0x8178, revid=3D0x00 domain=3D0, bus=3D0, slot=3D11, func=3D0 class=3D01-00-00, hdrtype=3D0x00, mfdev=3D0 cmdreg=3D0x0017, statreg=3D0x0280, cachelnsz=3D8 (dwords) lattimer=3D0x20 (960 ns), mingnt=3D0x08 (2000 ns), maxlat=3D0x08 (2000 ns) intpin=3Da, irq=3D11 map[10]: type I/O Port, range 32, base 0xb800, size 8, enabled map[14]: type Memory, range 32, base 0xe2000000, size 12, enabled pcib0: matched entry for 0.11.INTA (src \_SB_.LNKB:0) pcib0: slot 11 INTA routed to irq 11 via \_SB_.LNKB eccmon0: RAM ECC Monitor v0.13 on i440BX/ZX (8086:7190), reporting tested eccmon0: Capabilities: ECC with hardware scrubber eccmon0: Current mode: ECC with hardware scrubber eccmon0: Bank Size Type ILV ECC eccmon0: 2 64M SDR N Y eccmon0: 3 64M SDR N Y eccmon0: 4 64M SDR N Y eccmon0: 5 64M SDR N Y eccmon0: Total RAM detected: 256M eccmon0: on hostb0 eccmon0: attached pcib1: at device 1.0 on pci0 pcib1: domain 0 pcib1: secondary bus 1 pcib1: subordinate bus 1 pcib1: I/O decode 0xe000-0xdfff pcib1: no prefetched decode pci1: on pcib1 pci1: domain=3D0, physical bus=3D1 isab0: at device 4.0 on pci0 isa0: on isab0 pci0: at device 4.1 (no driver attached) pci0: at device 4.2 (no driver attached) intsmb0: port 0xe800-0xe80f at device 4.3 on = pci0 intsmb0: Reserved 0x10 bytes for rid 0x90 type 4 at 0xe800 intsmb0: intr IRQ 9 enabled revision 0 intsmb0: [GIANT-LOCKED] intsmb0: [ITHREAD] smbus0: on intsmb0 smb0: on smbus0 fxp0: port 0xd000-0xd03f mem 0xe3000000-0xe3= 000fff,0xe2800000-0xe28fffff irq 10 at device 9.0 on pci0 fxp0: Reserved 0x1000 bytes for rid 0x10 type 3 at 0xe3000000 fxp0: using memory space register mapping fxp0: PCI IDs: 8086 1229 8086 000c 0008 fxp0: Dynamic Standby mode is disabled miibus0: on fxp0 inphy0: PHY 1 on miibus0 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow fxp0: bpf attached fxp0: Ethernet address: 00:02:b3:5c:a6:23 fxp0: [MPSAFE] fxp0: [ITHREAD] ahc0: port 0xb800-0xb8ff mem 0xe2000000-0= xe2000fff irq 11 at device 11.0 on pci0 ahc0: Defaulting to MEMIO on ahc0: Reserved 0x1000 bytes for rid 0x14 type 3 at 0xe2000000 ahc0: Reading SEEPROM...done. ahc0: Low byte termination Enabled ahc0: Downloading Sequencer Program... 442 instructions downloaded ahc0: Features 0x10001, Bugs 0x25, Flags 0x20485540 ahc0: [MPSAFE] ahc0: [ITHREAD] aic7880: Ultra Single Channel A, SCSI Id=3D7, 16/253 SCBs fdc0: port 0x3f2-0x3f5,0x3f7 irq 6 drq 2 on acpi0 fdc0: ic_type 90 part_id 80 fdc0: [FILTER] fd0: <1440-KB 3.5" drive> on fdc0 drive 0 uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 uart0: [FILTER] uart0: fast interrupt uart0: console (19200,n,8,1) uart1: <16550 or compatible> port 0x2f8-0x2ff irq 3 on acpi0 uart1: [FILTER] uart1: fast interrupt atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 atkbd: the current kbd controller command byte 0067 atkbd: keyboard ID 0x41ab (2) kbdc: RESET_KBD return code:00fa kbdc: RESET_KBD status:00aa kbd0: atkbd0, AT 101/102 (2), config:0x0, flags:0x1d0000 atkbd0: [GIANT-LOCKED] atkbd0: [ITHREAD] cpu0: on acpi0 cpu0: switching to generic Cx mode atkbdc: atkbdc0 already exists; skipping it fdc: fdc0 already exists; skipping it uart: uart0 already exists; skipping it uart: uart1 already exists; skipping it pnp_identify: Trying Read_Port at 203 pnp_identify: Trying Read_Port at 243 pnp_identify: Trying Read_Port at 283 pnp_identify: Trying Read_Port at 2c3 pnp_identify: Trying Read_Port at 303 pnp_identify: Trying Read_Port at 343 pnp_identify: Trying Read_Port at 383 pnp_identify: Trying Read_Port at 3c3 PNP Identify complete sc: sc0 already exists; skipping it vga: vga0 already exists; skipping it isa_probe_children: disabling PnP devices isa_probe_children: probing non-PnP devices orm0: at iomem 0xc0000-0xc7fff pnpid ORM0000 on isa0 adv0: not probed (disabled) aha0: not probed (disabled) aic0: not probed (disabled) ata0 failed to probe at port 0x1f0 irq 14 on isa0 ata1 failed to probe at port 0x170 irq 15 on isa0 bt0: not probed (disabled) cs0: not probed (disabled) ed0: not probed (disabled) fe0: not probed (disabled) ie0: not probed (disabled) it0 failed to probe at port 0x290 on isa0 it1 failed to probe at port 0xc00 on isa0 it2 failed to probe at port 0xd00 on isa0 le0: not probed (disabled) lm0 failed to probe at port 0x290 on isa0 ppc0 failed to probe at irq 7 on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <9 virtual consoles, flags=3D0x100> sc0: fb0, kbd0, terminal emulator: sc (syscons terminal) sn0: not probed (disabled) uart2: not probed (disabled) uart3: not probed (disabled) vga0: at port 0x3b0-0x3df iomem 0xa0000-0xbffff on isa0 vt0: not probed (disabled) isa_probe_children: probing PnP devices Device configuration finished. procfs registered Timecounter "TSC" frequency 1403189147 Hz quality 800 Timecounters tick every 10.000 msec splash: image decoder found: snake_saver lo0: bpf attached (noperiph:ahc0:0:-1:-1): SCSI bus reset delivered. 0 SCBs aborted. ahc0: Selection Timeout on A:2. 0 SCBs aborted ahc0: Selection Timeout on A:3. 0 SCBs aborted ahc0: Selection Timeout on A:4. 0 SCBs aborted ahc0: Selection Timeout on A:5. 0 SCBs aborted (probe6:ahc0:0:6:0): Retrying Command (probe0:ahc0:0:0:0): Retrying Command (probe1:ahc0:0:1:0): Retrying Command (probe6:ahc0:0:6:0): error 22 (probe6:ahc0:0:6:0): Unretryable Error (probe6:ahc0:0:6:0): Down reving Protocol Version from 4 to 2? (ahc0:A:6:0): Sending SDTR period c, offset f (ahc0:A:6:0): Received SDTR period 19, offset f Filtered to period 19, offset f ahc0: target 6 synchronous at 10.0MHz, offset =3D 0xf (ahc0:A:6:0): Sending SDTR period 19, offset f (ahc0:A:6:0): Received SDTR period 19, offset f Filtered to period 19, offset f (probe6:ahc0:0:6:0): error 16 (probe6:ahc0:0:6:0): Unretryable Error (probe0:ahc0:0:0:0): Down reving Protocol Version from 4 to 2? (probe1:ahc0:0:1:0): Down reving Protocol Version from 4 to 2? (ahc0:A:0:0): Sending SDTR period c, offset f (ahc0:A:0:0): Received SDTR period c, offset f Filtered to period c, offset f ahc0: target 0 synchronous at 20.0MHz, offset =3D 0xf (ahc0:A:1:0): Sending SDTR period c, offset f (ahc0:A:1:0): Received SDTR period c, offset f Filtered to period c, offset f ahc0: target 1 synchronous at 20.0MHz, offset =3D 0xf pass0 at ahc0 bus 0 target 0 lun 0 pass0: Fixed Direct Access SCSI-2 device=20 pass0: Serial Number F2H47885 =20 pass0: 20.000MB/s transfers (20.000MHz, offset 15) pass1 at ahc0 bus 0 target 1 lun 0 pass1: Fixed Direct Access SCSI-2 device=20 pass1: Serial Number B2F11956 =20 pass1: 20.000MB/s transfers (20.000MHz, offset 15) pass6 at ahc0 bus 0 target 6 lun 0 pass6: Removable CD-ROM SCSI-2 device=20 pass6: 10.000MB/s transfers (10.000MHz, offset 15) GEOM: new disk da0 GEOM: nda0 at ahc0 bus 0 target 0 lun 0 da0: Fixed Direct Access SCSI-2 device=20 da0: Serial Number F2H47885 =20 da0: 20.000MB/s transfers (20.000MHz, offset 15) da0: 2063MB (4226725 512 byte sectors: 255H 63S/T 263C) da1 at ahc0 bus 0 target 1 lun 0 da1: Fixed Direct Access SCSI-2 device=20 da1: Serial Number B2F11956 =20 da1: 20.000MB/s transfers (20.000MHz, offset 15) da1: 2063MB (4226725 512 byte sectors: 255H 63S/T 263C) ew disk da1 Trying to mount root from ufs:/dev/da0s1a start_init: trying /sbin/init Enter root password, or ^D to go multi-user Password: --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=dmesg_bad Content-Transfer-Encoding: quoted-printable OK boot -sv /=08-=08\=08|=08/=08-=08\=08SMAP type=3D01 base=3D0000000000000000 len=3D00= 0000000009f800 SMAP type=3D02 base=3D000000000009f800 len=3D0000000000000800 SMAP type=3D02 base=3D00000000000f0000 len=3D0000000000010000 SMAP type=3D01 base=3D0000000000100000 len=3D000000000fefd000 SMAP type=3D03 base=3D000000000fffd000 len=3D0000000000002000 SMAP type=3D04 base=3D000000000ffff000 len=3D0000000000001000 SMAP type=3D02 base=3D00000000ffff0000 len=3D0000000000010000 Copyright (c) 1992-2011 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 7.4-STABLE #1: Mon Apr 18 11:46:05 CEST 2011 root@bali:/src/obj-7/src/src-7/sys/smbfix i386 Preloaded elf kernel "/kbad" at 0xc0802000. Calibrating clock(s) ... i8254 clock: 1193166 Hz CLK_USE_I8254_CALIBRATION not specified - using default frequency Timecounter "i8254" frequency 1193182 Hz quality 0 Calibrating TSC clock ... TSC clock: 1403189405 Hz CPU: Intel(R) Celeron(TM) CPU 1400MHz (1403.19-MHz 686-class= CPU) Origin =3D "GenuineIntel" Id =3D 0x6b4 Family =3D 6 Model =3D b Stepp= ing =3D 4 Features=3D0x383f9ff Instruction TLB: 4 KB pages, 4-way set associative, 32 entries Instruction TLB: 4 MB pages, fully associative, 2 entries Data TLB: 4 KB pages, 4-way set associative, 64 entries 2nd-level cache: 256 KB, 8-way set associative, 32 byte line size 1st-level instruction cache: 16 KB, 4-way set associative, 32 byte line size Data TLB: 4 MB Pages, 4-way set associative, 8 entries 1st-level data cache: 16 KB, 4-way set associative, 32 byte line size real memory =3D 268423168 (255 MB) Physical memory chunk(s): 0x0000000000001000 - 0x000000000009efff, 647168 bytes (158 pages) 0x0000000000100000 - 0x00000000003fffff, 3145728 bytes (768 pages) 0x0000000000c25000 - 0x000000000fb45fff, 250744832 bytes (61217 pages) avail memory =3D 253374464 (241 MB) bios32: Found BIOS32 Service Directory header at 0xc00f9d40 bios32: Entry =3D 0xf0520 (c00f0520) Rev =3D 0 Len =3D 1 pcibios: PCI BIOS entry at 0xf0000+0x720 pnpbios: Found PnP BIOS data at 0xc00fd190 pnpbios: Entry =3D f0000:d1c0 Rev =3D 1.0 pnpbios: OEM ID cd041 Other BIOS signatures found: ULE: setup cpu 0 nfslock: pseudo-device null: random: io: mem: Pentium Pro MTRR support enabled ACPI: RSDP @ 0x0xf7f90/0x0014 (v000 ASUS ) ACPI: RSDT @ 0x0xfffd000/0x002C (v001 ASUS P2B 0x42302E31 MSFT 0x313= 13031) ACPI: FACP @ 0x0xfffd080/0x0074 (v001 ASUS P2B 0x42302E31 MSFT 0x313= 13031) ACPI: DSDT @ 0x0xfffd100/0x1BA8 (v001 ASUS P2B 0x00001000 MSFT 0x010= 00001) ACPI: FACS @ 0x0xffff000/0x0040 ACPI: BOOT @ 0x0xfffd040/0x0028 (v001 ASUS P2B 0x42302E31 MSFT 0x313= 13031) npx0: INT 16 interface acpi0: on motherboard acpi0: [MPSAFE] acpi0: [ITHREAD] acpi0: Power Button (fixed) acpi0: wakeup code va 0xc17e4000 pa 0x1000 atpic: Programming IRQ9 as level/low pci_open(1): mode 1 addr port (0x0cf8) is 0x80002358 pci_open(1a): mode1res=3D0x80000000 (0x80000000) pci_cfgcheck: device 0 [class=3D060000] [hdr=3D00] is there (id=3D71908086) pcibios: BIOS version 2.10 acpi_bus_number: root bus has no _BBN, assuming 0 AcpiOsDerivePciId: \_SB_.PCI0.PX40.PIRQ -> bus 0 dev 4 func 0 acpi_bus_number: root bus has no _BBN, assuming 0 AcpiOsDerivePciId: \_SB_.PCI0.PX43.IPMU -> bus 0 dev 4 func 3 acpi_bus_number: root bus has no _BBN, assuming 0 AcpiOsDerivePciId: \_SB_.PCI0.PX43.ISMB -> bus 0 dev 4 func 3 acpi0: reservation of 0, a0000 (3) failed acpi0: reservation of 100000, ff00000 (3) failed ACPI timer: 0/4 0/16777212 0/4 0/4 0/16777209 0/16777212 0/4 0/4 0/4 0/4 ->= 0 Timecounter "ACPI-safe" frequency 3579545 Hz quality 850 acpi_timer0: <24-bit timer at 3.579545MHz> port 0xe408-0xe40b on acpi0 pci_link0: Index IRQ Rtd Ref IRQs Initial Probe 0 255 N 0 3 4 5 6 7 9 10 11 12 14 15 Validation 0 255 N 0 3 4 5 6 7 9 10 11 12 14 15 After Disable 0 255 N 0 3 4 5 6 7 9 10 11 12 14 15 pci_link1: Index IRQ Rtd Ref IRQs Initial Probe 0 11 N 0 3 4 5 6 7 9 10 11 12 14 15 Validation 0 11 N 0 3 4 5 6 7 9 10 11 12 14 15 After Disable 0 255 N 0 3 4 5 6 7 9 10 11 12 14 15 pci_link2: Index IRQ Rtd Ref IRQs Initial Probe 0 255 N 0 3 4 5 6 7 9 10 11 12 14 15 Validation 0 255 N 0 3 4 5 6 7 9 10 11 12 14 15 After Disable 0 255 N 0 3 4 5 6 7 9 10 11 12 14 15 pci_link3: Index IRQ Rtd Ref IRQs Initial Probe 0 10 N 0 3 4 5 6 7 9 10 11 12 14 15 Validation 0 10 N 0 3 4 5 6 7 9 10 11 12 14 15 After Disable 0 255 N 0 3 4 5 6 7 9 10 11 12 14 15 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 ACPI: Found matching pin for 0.11.INTA at func 0: 11 ACPI: Found matching pin for 0.9.INTA at func 0: 10 ACPI: Found matching pin for 0.4.INTD at func 2: 255 pci0: on pcib0 pci0: domain=3D0, physical bus=3D0 found-> vendor=3D0x8086, dev=3D0x7190, revid=3D0x03 domain=3D0, bus=3D0, slot=3D0, func=3D0 class=3D06-00-00, hdrtype=3D0x00, mfdev=3D0 cmdreg=3D0x0106, statreg=3D0x2210, cachelnsz=3D0 (dwords) lattimer=3D0x40 (1920 ns), mingnt=3D0x00 (0 ns), maxlat=3D0x00 (0 ns) map[10]: type Prefetchable Memory, range 32, base 0xe4000000, size 26, ena= bled found-> vendor=3D0x8086, dev=3D0x7191, revid=3D0x03 domain=3D0, bus=3D0, slot=3D1, func=3D0 class=3D06-04-00, hdrtype=3D0x01, mfdev=3D0 cmdreg=3D0x0117, statreg=3D0x0220, cachelnsz=3D0 (dwords) lattimer=3D0x40 (1920 ns), mingnt=3D0x80 (32000 ns), maxlat=3D0x00 (0 ns) found-> vendor=3D0x8086, dev=3D0x7110, revid=3D0x02 domain=3D0, bus=3D0, slot=3D4, func=3D0 class=3D06-01-00, hdrtype=3D0x00, mfdev=3D1 cmdreg=3D0x000f, statreg=3D0x0280, cachelnsz=3D0 (dwords) lattimer=3D0x00 (0 ns), mingnt=3D0x00 (0 ns), maxlat=3D0x00 (0 ns) found-> vendor=3D0x8086, dev=3D0x7111, revid=3D0x01 domain=3D0, bus=3D0, slot=3D4, func=3D1 class=3D01-01-80, hdrtype=3D0x00, mfdev=3D0 cmdreg=3D0x0000, statreg=3D0x0280, cachelnsz=3D0 (dwords) lattimer=3D0x20 (960 ns), mingnt=3D0x00 (0 ns), maxlat=3D0x00 (0 ns) map[20]: type I/O Port, range 32, base 0xd800, size 4, port disabled found-> vendor=3D0x8086, dev=3D0x7112, revid=3D0x01 domain=3D0, bus=3D0, slot=3D4, func=3D2 class=3D0c-03-00, hdrtype=3D0x00, mfdev=3D0 cmdreg=3D0x0005, statreg=3D0x0280, cachelnsz=3D0 (dwords) lattimer=3D0x20 (960 ns), mingnt=3D0x00 (0 ns), maxlat=3D0x00 (0 ns) intpin=3Dd, irq=3D255 map[20]: type I/O Port, range 32, base 0xd400, size 5, enabled found-> vendor=3D0x8086, dev=3D0x7113, revid=3D0x02 domain=3D0, bus=3D0, slot=3D4, func=3D3 class=3D06-80-00, hdrtype=3D0x00, mfdev=3D0 cmdreg=3D0x0003, statreg=3D0x0280, cachelnsz=3D0 (dwords) lattimer=3D0x00 (0 ns), mingnt=3D0x00 (0 ns), maxlat=3D0x00 (0 ns) map[90]: type I/O Port, range 32, base 0xe800, size 4, enabled found-> vendor=3D0x8086, dev=3D0x1229, revid=3D0x08 domain=3D0, bus=3D0, slot=3D9, func=3D0 class=3D02-00-00, hdrtype=3D0x00, mfdev=3D0 cmdreg=3D0x0017, statreg=3D0x0290, cachelnsz=3D8 (dwords) lattimer=3D0x20 (960 ns), mingnt=3D0x08 (2000 ns), maxlat=3D0x38 (14000 ns) intpin=3Da, irq=3D10 powerspec 2 supports D0 D1 D2 D3 current D0 map[10]: type Memory, range 32, base 0xe3000000, size 12, enabled map[14]: type I/O Port, range 32, base 0xd000, size 6, enabled map[18]: type Memory, range 32, base 0xe2800000, size 20, enabled pcib0: matched entry for 0.9.INTA (src \_SB_.LNKD:0) pcib0: slot 9 INTA routed to irq 10 via \_SB_.LNKD found-> vendor=3D0x9004, dev=3D0x8178, revid=3D0x00 domain=3D0, bus=3D0, slot=3D11, func=3D0 class=3D01-00-00, hdrtype=3D0x00, mfdev=3D0 cmdreg=3D0x0017, statreg=3D0x0280, cachelnsz=3D8 (dwords) lattimer=3D0x20 (960 ns), mingnt=3D0x08 (2000 ns), maxlat=3D0x08 (2000 ns) intpin=3Da, irq=3D11 map[10]: type I/O Port, range 32, base 0xb800, size 8, enabled map[14]: type Memory, range 32, base 0xe2000000, size 12, enabled pcib0: matched entry for 0.11.INTA (src \_SB_.LNKB:0) pcib0: slot 11 INTA routed to irq 11 via \_SB_.LNKB eccmon0: RAM ECC Monitor v0.13 on i440BX/ZX (8086:7190), reporting tested eccmon0: Capabilities: ECC with hardware scrubber eccmon0: Current mode: ECC with hardware scrubber eccmon0: Bank Size Type ILV ECC eccmon0: 2 64M SDR N Y eccmon0: 3 64M SDR N Y eccmon0: 4 64M SDR N Y eccmon0: 5 64M SDR N Y eccmon0: Total RAM detected: 256M eccmon0: on hostb0 eccmon0: attached pcib1: at device 1.0 on pci0 pcib1: domain 0 pcib1: secondary bus 1 pcib1: subordinate bus 1 pcib1: I/O decode 0xe000-0xdfff pcib1: no prefetched decode pci1: on pcib1 pci1: domain=3D0, physical bus=3D1 isab0: at device 4.0 on pci0 isa0: on isab0 pci0: at device 4.1 (no driver attached) pci0: at device 4.2 (no driver attached) intsmb0: port 0xe800-0xe80f at device 4.3 on = pci0 intsmb0: Reserved 0x10 bytes for rid 0x90 type 4 at 0xe800 intsmb0: intr IRQ 9 enabled revision 0 intsmb0: [GIANT-LOCKED] intsmb0: [ITHREAD] smbus0: on intsmb0 smb0: on smbus0 fxp0: port 0xd000-0xd03f mem 0xe3000000-0xe3= 000fff,0xe2800000-0xe28fffff irq 10 at device 9.0 on pci0 fxp0: Reserved 0x1000 bytes for rid 0x10 type 3 at 0xe3000000 fxp0: using memory space register mapping fxp0: PCI IDs: 8086 1229 8086 000c 0008 fxp0: Dynamic Standby mode is disabled miibus0: on fxp0 inphy0: PHY 1 on miibus0 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow fxp0: bpf attached fxp0: Ethernet address: 00:02:b3:5c:a6:23 fxp0: [MPSAFE] fxp0: [ITHREAD] ahc0: port 0xb800-0xb8ff mem 0xe2000000-0= xe2000fff irq 11 at device 11.0 on pci0 ahc0: Defaulting to MEMIO on ahc0: Reserved 0x1000 bytes for rid 0x14 type 3 at 0xe2000000 ahc0: Reading SEEPROM...done. ahc0: Low byte termination Enabled ahc0: Downloading Sequencer Program... 442 instructions downloaded ahc0: Features 0x10001, Bugs 0x25, Flags 0x20485540 ahc0: [MPSAFE] ahc0: [ITHREAD] aic7880: Ultra Single Channel A, SCSI Id=3D7, 16/253 SCBs fdc0: port 0x3f2-0x3f5,0x3f7 irq 6 drq 2 on acpi0 fdc0: ic_type 90 part_id 80 fdc0: [FILTER] fd0: <1440-KB 3.5" drive> on fdc0 drive 0 uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 uart0: [FILTER] uart0: fast interrupt uart0: console (19200,n,8,1) uart1: <16550 or compatible> port 0x2f8-0x2ff irq 3 on acpi0 uart1: [FILTER] uart1: fast interrupt atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 atkbd: the current kbd controller command byte 0067 atkbd: keyboard ID 0x41ab (2) kbdc: RESET_KBD return code:00fa kbdc: RESET_KBD status:00aa kbd0: atkbd0, AT 101/102 (2), config:0x0, flags:0x1d0000 atkbd0: [GIANT-LOCKED] atkbd0: [ITHREAD] cpu0: on acpi0 cpu0: switching to generic Cx mode atkbdc: atkbdc0 already exists; skipping it fdc: fdc0 already exists; skipping it uart: uart0 already exists; skipping it uart: uart1 already exists; skipping it pnp_identify: Trying Read_Port at 203 pnp_identify: Trying Read_Port at 243 pnp_identify: Trying Read_Port at 283 pnp_identify: Trying Read_Port at 2c3 pnp_identify: Trying Read_Port at 303 pnp_identify: Trying Read_Port at 343 pnp_identify: Trying Read_Port at 383 pnp_identify: Trying Read_Port at 3c3 PNP Identify complete sc: sc0 already exists; skipping it vga: vga0 already exists; skipping it isa_probe_children: disabling PnP devices isa_probe_children: probing non-PnP devices orm0: at iomem 0xc0000-0xc7fff pnpid ORM0000 on isa0 adv0: not probed (disabled) aha0: not probed (disabled) aic0: not probed (disabled) ata0 failed to probe at port 0x1f0 irq 14 on isa0 ata1 failed to probe at port 0x170 irq 15 on isa0 bt0: not probed (disabled) cs0: not probed (disabled) ed0: not probed (disabled) fe0: not probed (disabled) ie0: not probed (disabled) it0 failed to probe at port 0x290 on isa0 it1 failed to probe at port 0xc00 on isa0 it2 failed to probe at port 0xd00 on isa0 le0: not probed (disabled) lm0 failed to probe at port 0x290 on isa0 ppc0 failed to probe at irq 7 on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <9 virtual consoles, flags=3D0x100> sc0: fb0, kbd0, terminal emulator: sc (syscons terminal) sn0: not probed (disabled) uart2: not probed (disabled) uart3: not probed (disabled) vga0: at port 0x3b0-0x3df iomem 0xa0000-0xbffff on isa0 vt0: not probed (disabled) isa_probe_children: probing PnP devices Device configuration finished. procfs registered Timecounter "TSC" frequency 1403189405 Hz quality 800 Timecounters tick every 10.000 msec splash: image decoder found: snake_saver lo0: bpf attached (noperiph:ahc0:0:-1:-1): SCSI bus reset delivered. 0 SCBs aborted. ahc0: Selection Timeout on A:2. 0 SCBs aborted ahc0: Selection Timeout on A:3. 0 SCBs aborted ahc0: Selection Timeout on A:4. 0 SCBs aborted ahc0: Selection Timeout on A:5. 0 SCBs aborted (probe6:ahc0:0:6:0): Retrying Command (probe0:ahc0:0:0:0): Retrying Command (probe1:ahc0:0:1:0): Retrying Command (probe6:ahc0:0:6:0): error 22 (probe6:ahc0:0:6:0): Unretryable Error (probe6:ahc0:0:6:0): Down reving Protocol Version from 4 to 2? (ahc0:A:6:0): Sending SDTR period c, offset f (ahc0:A:6:0): Received SDTR period 19, offset f Filtered to period 19, offset f ahc0: target 6 synchronous at 10.0MHz, offset =3D 0xf (ahc0:A:6:0): Sending SDTR period 19, offset f (ahc0:A:6:0): Received SDTR period 19, offset f Filtered to period 19, offset f (probe6:ahc0:0:6:0): error 16 (probe6:ahc0:0:6:0): Unretryable Error (probe0:ahc0:0:0:0): Down reving Protocol Version from 4 to 2? (probe1:ahc0:0:1:0): Down reving Protocol Version from 4 to 2? (ahc0:A:0:0): Sending SDTR period c, offset f (ahc0:A:0:0): Received SDTR period c, offset f Filtered to period c, offset f ahc0: target 0 synchronous at 20.0MHz, offset =3D 0xf (ahc0:A:1:0): Sending SDTR period c, offset f (ahc0:A:1:0): Received SDTR period c, offset f Filtered to period c, offset f ahc0: target 1 synchronous at 20.0MHz, offset =3D 0xf passTrying to mount root from ufs:/dev/da0s1a Manual root filesystem specification: : Mount using filesystem eg. ufs:da0s1a ? List valid disk boot devices Abort manual input mountroot>=20 --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="dmesg.diff" Content-Transfer-Encoding: quoted-printable --- dmesg_ok 2011-04-18 13:29:44.000000000 +0200 +++ dmesg_bad 2011-04-18 13:29:51.000000000 +0200 @@ -1,5 +1,5 @@ OK boot -sv -|=08/=08-=08\=08|=08/=08-=08SMAP type=3D01 base=3D0000000000000000 len=3D0= 00000000009f800 +/=08-=08\=08|=08/=08-=08\=08SMAP type=3D01 base=3D0000000000000000 len=3D0= 00000000009f800 SMAP type=3D02 base=3D000000000009f800 len=3D0000000000000800 SMAP type=3D02 base=3D00000000000f0000 len=3D0000000000010000 SMAP type=3D01 base=3D0000000000100000 len=3D000000000fefd000 @@ -10,13 +10,13 @@ Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. -FreeBSD 7.4-STABLE #0: Fri Apr 15 14:58:58 CEST 2011 +FreeBSD 7.4-STABLE #1: Mon Apr 18 11:46:05 CEST 2011 root@bali:/src/obj-7/src/src-7/sys/smbfix i386 -Preloaded elf kernel "/boot/kernel/kernel" at 0xc0802000. +Preloaded elf kernel "/kbad" at 0xc0802000. Calibrating clock(s) ... i8254 clock: 1193166 Hz CLK_USE_I8254_CALIBRATION not specified - using default frequency Timecounter "i8254" frequency 1193182 Hz quality 0 -Calibrating TSC clock ... TSC clock: 1403189147 Hz +Calibrating TSC clock ... TSC clock: 1403189405 Hz CPU: Intel(R) Celeron(TM) CPU 1400MHz (1403.19-MHz 686-clas= s CPU) Origin =3D "GenuineIntel" Id =3D 0x6b4 Family =3D 6 Model =3D b Step= ping =3D 4 Features=3D0x383f9ff @@ -73,7 +73,7 @@ AcpiOsDerivePciId: \_SB_.PCI0.PX43.ISMB -> bus 0 dev 4 func 3 acpi0: reservation of 0, a0000 (3) failed acpi0: reservation of 100000, ff00000 (3) failed -ACPI timer: 0/4 0/4 0/4 0/3 0/16777212 0/4 0/4 0/4 0/4 0/16777209 -> 0 +ACPI timer: 0/4 0/16777212 0/4 0/4 0/16777209 0/16777212 0/4 0/4 0/4 0/4 -= > 0 Timecounter "ACPI-safe" frequency 3579545 Hz quality 850 acpi_timer0: <24-bit timer at 3.579545MHz> port 0xe408-0xe40b on acpi0 pci_link0: Index IRQ Rtd Ref IRQs @@ -275,7 +275,7 @@ isa_probe_children: probing PnP devices Device configuration finished. procfs registered -Timecounter "TSC" frequency 1403189147 Hz quality 800 +Timecounter "TSC" frequency 1403189405 Hz quality 800 Timecounters tick every 10.000 msec splash: image decoder found: snake_saver lo0: bpf attached @@ -309,30 +309,12 @@ (ahc0:A:1:0): Received SDTR period c, offset f Filtered to period c, offset f ahc0: target 1 synchronous at 20.0MHz, offset =3D 0xf -pass0 at ahc0 bus 0 target 0 lun 0 -pass0: Fixed Direct Access SCSI-2 device=20 -pass0: Serial Number F2H47885 =20 -pass0: 20.000MB/s transfers (20.000MHz, offset 15) -pass1 at ahc0 bus 0 target 1 lun 0 -pass1: Fixed Direct Access SCSI-2 device=20 -pass1: Serial Number B2F11956 =20 -pass1: 20.000MB/s transfers (20.000MHz, offset 15) -pass6 at ahc0 bus 0 target 6 lun 0 -pass6: Removable CD-ROM SCSI-2 device=20 -pass6: 10.000MB/s transfers (10.000MHz, offset 15) -GEOM: new disk da0 -GEOM: nda0 at ahc0 bus 0 target 0 lun 0 -da0: Fixed Direct Access SCSI-2 device=20 -da0: Serial Number F2H47885 =20 -da0: 20.000MB/s transfers (20.000MHz, offset 15) -da0: 2063MB (4226725 512 byte sectors: 255H 63S/T 263C) -da1 at ahc0 bus 0 target 1 lun 0 -da1: Fixed Direct Access SCSI-2 device=20 -da1: Serial Number B2F11956 =20 -da1: 20.000MB/s transfers (20.000MHz, offset 15) -da1: 2063MB (4226725 512 byte sectors: 255H 63S/T 263C) -ew disk da1 -Trying to mount root from ufs:/dev/da0s1a -start_init: trying /sbin/init -Enter root password, or ^D to go multi-user -Password: +passTrying to mount root from ufs:/dev/da0s1a + +Manual root filesystem specification: + : Mount using filesystem + eg. ufs:da0s1a + ? List valid disk boot devices + Abort manual input + +mountroot>=20 --ZPt4rx8FFjLCG7dd-- From owner-svn-src-stable-7@FreeBSD.ORG Mon Apr 18 12:32:07 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E577106566C; Mon, 18 Apr 2011 12:32:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 29D208FC08; Mon, 18 Apr 2011 12:32:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3ICW7eG071810; Mon, 18 Apr 2011 12:32:07 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3ICW75Q071808; Mon, 18 Apr 2011 12:32:07 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104181232.p3ICW75Q071808@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 18 Apr 2011 12:32:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220775 - stable/7/sys/netinet6 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 12:32:07 -0000 Author: bz Date: Mon Apr 18 12:32:06 2011 New Revision: 220775 URL: http://svn.freebsd.org/changeset/base/220775 Log: MFC r220743: Fix IPv6 ND. After r219562 we in nd6_ns_input() were erroneously always passing the cached proxydl reference (sockaddr_dl initialized or not) to nd6_na_output(). nd6_na_output() will thus assume a proxy NA. Revert to conditionally passing either &proxydl or NULL if no proxy case desired. Tested by: ipv6gw and ref9-i386 Tested by: Pete French (petefrench ingresso.co.uk) Reported by: Pete French (petefrench ingresso.co.uk on stable) Reported by: bz, simon on Y! cluster Reported by: kib PR: kern/151908 X-Early-MFC: yes Modified: stable/7/sys/netinet6/nd6_nbr.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet6/nd6_nbr.c ============================================================================== --- stable/7/sys/netinet6/nd6_nbr.c Mon Apr 18 12:27:57 2011 (r220774) +++ stable/7/sys/netinet6/nd6_nbr.c Mon Apr 18 12:32:06 2011 (r220775) @@ -327,7 +327,7 @@ nd6_ns_input(struct mbuf *m, int off, in nd6_na_output(ifp, &in6_all, &taddr6, ((anycast || proxy || !tlladdr) ? 0 : ND_NA_FLAG_OVERRIDE) | (ip6_forwarding ? ND_NA_FLAG_ROUTER : 0), - tlladdr, (struct sockaddr *)&proxydl); + tlladdr, proxy ? (struct sockaddr *)&proxydl : NULL); goto freeit; } @@ -337,7 +337,7 @@ nd6_ns_input(struct mbuf *m, int off, in nd6_na_output(ifp, &saddr6, &taddr6, ((anycast || proxy || !tlladdr) ? 0 : ND_NA_FLAG_OVERRIDE) | (ip6_forwarding ? ND_NA_FLAG_ROUTER : 0) | ND_NA_FLAG_SOLICITED, - tlladdr, (struct sockaddr *)&proxydl); + tlladdr, proxy ? (struct sockaddr *)&proxydl : NULL); freeit: m_freem(m); return; From owner-svn-src-stable-7@FreeBSD.ORG Mon Apr 18 16:56:30 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4ADC3106566C; Mon, 18 Apr 2011 16:56:30 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 1EEF38FC16; Mon, 18 Apr 2011 16:56:30 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id C66AE46B06; Mon, 18 Apr 2011 12:56:29 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3B6308A02B; Mon, 18 Apr 2011 12:56:29 -0400 (EDT) From: John Baldwin To: Andre Albsmeier Date: Mon, 18 Apr 2011 09:18:25 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <201102041444.p14EixJP087709@svn.freebsd.org> <201104151235.05114.jhb@freebsd.org> <20110418113657.GA6080@curry.mchp.siemens.de> In-Reply-To: <20110418113657.GA6080@curry.mchp.siemens.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201104180918.26054.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 18 Apr 2011 12:56:29 -0400 (EDT) Cc: "svn-src-stable-7@freebsd.org" , scsi@freebsd.org Subject: Re: svn commit: r218277 - in stable/7/sys: kern sys X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 16:56:30 -0000 On Monday, April 18, 2011 7:36:57 am Andre Albsmeier wrote: > On Fri, 15-Apr-2011 at 18:35:05 +0200, John Baldwin wrote: > > On Friday, April 15, 2011 9:25:25 am Andre Albsmeier wrote: > > > On Fri, 04-Feb-2011 at 14:44:59 +0000, John Baldwin wrote: > > > > Author: jhb > > > > Date: Fri Feb 4 14:44:59 2011 > > > > New Revision: 218277 > > > > URL: http://svn.freebsd.org/changeset/base/218277 > > > > > > > > Log: > > > > MFC 217075: > > > > Retire PCONFIG and leave the priority of thread0 alone when waiting for > > > > interrupt config hooks to execute. > > > > > > > > To preserve the KBI, I did not renumber priorities but simply removed > > > > PCONFIG. > > > > > > > > Modified: > > > > stable/7/sys/kern/subr_autoconf.c > > > > stable/7/sys/sys/priority.h > > > > Directory Properties: > > > > stable/7/sys/ (props changed) > > > > stable/7/sys/cddl/contrib/opensolaris/ (props changed) > > > > stable/7/sys/contrib/dev/acpica/ (props changed) > > > > stable/7/sys/contrib/pf/ (props changed) > > > > > > > > Modified: stable/7/sys/kern/subr_autoconf.c > > > > > > ============================================================================== > > > > --- stable/7/sys/kern/subr_autoconf.c Fri Feb 4 14:44:42 2011 > > (r218276) > > > > +++ stable/7/sys/kern/subr_autoconf.c Fri Feb 4 14:44:59 2011 > > (r218277) > > > > @@ -108,7 +108,7 @@ run_interrupt_driven_config_hooks(dummy) > > > > warned = 0; > > > > while (!TAILQ_EMPTY(&intr_config_hook_list)) { > > > > if (msleep(&intr_config_hook_list, &intr_config_hook_lock, > > > > - PCONFIG, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > + 0, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > EWOULDBLOCK) { > > > > mtx_unlock(&intr_config_hook_lock); > > > > warned++; > > > > > > > > > This broke several of my machines in a somewhat strange way: > > > > > > After upgrading them (17) to a recent 7-STABLE (as of 2011-04-12) > > > I noticed that some (4) of them didn't start. All 4 didn't find > > > their boot device anymore. What they all got in common is: > > > > > > - an Adaptec 2940 Ultra SCSI adapter > > > - two SCSI harddisks (da0 and da1) of various brands > > > - one SCSI CDROM drive (cd0) > > > > > > To be exact, none of the three devices (da0, da1, cd0) were > > > detected at all. Other machines with a similar configuration > > > (2940 and da0/da1) but _without_ the CDROM drive didn't have > > > any problems. So I simply removed the CDROM drives on the 4 > > > machines in question and they all booted again. > > > > > > Today I decided to dig into this and after reverting(*) the > > > above change, they worked with the CDROM again. I have cross- > > > checked it 3 times. No idea what's happening here... > > > > > > -Andre > > > > > > (*) To be honest, I use this patch so I had to modify only one file: > > > > > > --- sys/kern/subr_autoconf.c.ORI 2011-02-05 13:14:11.000000000 +0100 > > > +++ sys/kern/subr_autoconf.c 2011-04-15 14:34:31.000000000 +0200 > > > @@ -108,7 +108,7 @@ > > > warned = 0; > > > while (!TAILQ_EMPTY(&intr_config_hook_list)) { > > > if (msleep(&intr_config_hook_list, &intr_config_hook_lock, > > > - 0, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > + PRI_MIN_KERN + 32, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > EWOULDBLOCK) { > > > mtx_unlock(&intr_config_hook_lock); > > > warned++; > > > > Do you get any warnings about CAM timeouts, etc. when these probe? A verbose > > dmesg might be nice to look at if possible. > > OK, I have set up a machine for testing. In my other mail > I was wrong saying that the pass devices appear when using > the problematic kernel... > > Here are the dmesgs: > > - dmesg_bad is the original kernel as of Friday > - dmesg_ok is the patched kernel (see above) as of Friday > - dmesg.diff is the diff between both > > If you want me to try something just tell me... Hmmm, what if you make SCSI_DELAY larger? Also, can you let it fail the mount and drop into ddb and then get 'ps' output? I think the CAM boot probe is broken a bit. xpt_rescan_done() always calls xpt_release_boot(), but we don't hold the boot for each bus added while buses_config_done is 0, so it seems CAM only waits for at least one bus to rescan before it lets the boot continue? This seems wrong (i.e. one would think it would let all the busses added before this point scan before continuing). However, in your dmesg, it starts to print out an announcement for a pass device before it starts mounting root, so it seems that xpt is finishing too early somehow. -- John Baldwin From owner-svn-src-stable-7@FreeBSD.ORG Mon Apr 18 17:20:34 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D098106567B; Mon, 18 Apr 2011 17:20:34 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) by mx1.freebsd.org (Postfix) with ESMTP id F263A8FC15; Mon, 18 Apr 2011 17:20:33 +0000 (UTC) Received: from mail3.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.13.6/8.13.6) with ESMTP id p3IHKWqG001226; Mon, 18 Apr 2011 19:20:32 +0200 Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130]) by mail3.siemens.de (8.13.6/8.13.6) with ESMTP id p3IHKW5N000886; Mon, 18 Apr 2011 19:20:32 +0200 Received: (from localhost) by curry.mchp.siemens.de (8.14.4/8.14.4) id p3IHKWUc017794; Date: Mon, 18 Apr 2011 19:20:32 +0200 From: Andre Albsmeier To: John Baldwin Message-ID: <20110418172032.GA8849@curry.mchp.siemens.de> References: <201102041444.p14EixJP087709@svn.freebsd.org> <201104151235.05114.jhb@freebsd.org> <20110418113657.GA6080@curry.mchp.siemens.de> <201104180918.26054.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201104180918.26054.jhb@freebsd.org> X-Echelon: X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.20 (2009-06-14) Cc: "svn-src-stable-7@freebsd.org" , "scsi@freebsd.org" Subject: Re: svn commit: r218277 - in stable/7/sys: kern sys X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 17:20:34 -0000 On Mon, 18-Apr-2011 at 15:18:25 +0200, John Baldwin wrote: > On Monday, April 18, 2011 7:36:57 am Andre Albsmeier wrote: > > On Fri, 15-Apr-2011 at 18:35:05 +0200, John Baldwin wrote: > > > On Friday, April 15, 2011 9:25:25 am Andre Albsmeier wrote: > > > > On Fri, 04-Feb-2011 at 14:44:59 +0000, John Baldwin wrote: > > > > > Author: jhb > > > > > Date: Fri Feb 4 14:44:59 2011 > > > > > New Revision: 218277 > > > > > URL: http://svn.freebsd.org/changeset/base/218277 > > > > > > > > > > Log: > > > > > MFC 217075: > > > > > Retire PCONFIG and leave the priority of thread0 alone when waiting for > > > > > interrupt config hooks to execute. > > > > > > > > > > To preserve the KBI, I did not renumber priorities but simply removed > > > > > PCONFIG. > > > > > > > > > > Modified: > > > > > stable/7/sys/kern/subr_autoconf.c > > > > > stable/7/sys/sys/priority.h > > > > > Directory Properties: > > > > > stable/7/sys/ (props changed) > > > > > stable/7/sys/cddl/contrib/opensolaris/ (props changed) > > > > > stable/7/sys/contrib/dev/acpica/ (props changed) > > > > > stable/7/sys/contrib/pf/ (props changed) > > > > > > > > > > Modified: stable/7/sys/kern/subr_autoconf.c > > > > > > > > ============================================================================== > > > > > --- stable/7/sys/kern/subr_autoconf.c Fri Feb 4 14:44:42 2011 > > > (r218276) > > > > > +++ stable/7/sys/kern/subr_autoconf.c Fri Feb 4 14:44:59 2011 > > > (r218277) > > > > > @@ -108,7 +108,7 @@ run_interrupt_driven_config_hooks(dummy) > > > > > warned = 0; > > > > > while (!TAILQ_EMPTY(&intr_config_hook_list)) { > > > > > if (msleep(&intr_config_hook_list, &intr_config_hook_lock, > > > > > - PCONFIG, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > > + 0, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > > EWOULDBLOCK) { > > > > > mtx_unlock(&intr_config_hook_lock); > > > > > warned++; > > > > > > > > > > > > This broke several of my machines in a somewhat strange way: > > > > > > > > After upgrading them (17) to a recent 7-STABLE (as of 2011-04-12) > > > > I noticed that some (4) of them didn't start. All 4 didn't find > > > > their boot device anymore. What they all got in common is: > > > > > > > > - an Adaptec 2940 Ultra SCSI adapter > > > > - two SCSI harddisks (da0 and da1) of various brands > > > > - one SCSI CDROM drive (cd0) > > > > > > > > To be exact, none of the three devices (da0, da1, cd0) were > > > > detected at all. Other machines with a similar configuration > > > > (2940 and da0/da1) but _without_ the CDROM drive didn't have > > > > any problems. So I simply removed the CDROM drives on the 4 > > > > machines in question and they all booted again. > > > > > > > > Today I decided to dig into this and after reverting(*) the > > > > above change, they worked with the CDROM again. I have cross- > > > > checked it 3 times. No idea what's happening here... > > > > > > > > -Andre > > > > > > > > (*) To be honest, I use this patch so I had to modify only one file: > > > > > > > > --- sys/kern/subr_autoconf.c.ORI 2011-02-05 13:14:11.000000000 +0100 > > > > +++ sys/kern/subr_autoconf.c 2011-04-15 14:34:31.000000000 +0200 > > > > @@ -108,7 +108,7 @@ > > > > warned = 0; > > > > while (!TAILQ_EMPTY(&intr_config_hook_list)) { > > > > if (msleep(&intr_config_hook_list, &intr_config_hook_lock, > > > > - 0, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > + PRI_MIN_KERN + 32, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > EWOULDBLOCK) { > > > > mtx_unlock(&intr_config_hook_lock); > > > > warned++; > > > > > > Do you get any warnings about CAM timeouts, etc. when these probe? A verbose > > > dmesg might be nice to look at if possible. > > > > OK, I have set up a machine for testing. In my other mail > > I was wrong saying that the pass devices appear when using > > the problematic kernel... > > > > Here are the dmesgs: > > > > - dmesg_bad is the original kernel as of Friday > > - dmesg_ok is the patched kernel (see above) as of Friday > > - dmesg.diff is the diff between both > > > > If you want me to try something just tell me... > > Hmmm, what if you make SCSI_DELAY larger? Also, can you let it fail the I tried this already. Normally, I use 500 (which works on all machines) and retried with 5000. No change... > mount and drop into ddb and then get 'ps' output? I will try it tomorrow. > > I think the CAM boot probe is broken a bit. xpt_rescan_done() always calls > xpt_release_boot(), but we don't hold the boot for each bus added while > buses_config_done is 0, so it seems CAM only waits for at least one bus to > rescan before it lets the boot continue? This seems wrong (i.e. one would > think it would let all the busses added before this point scan before > continuing). Hmm, I got only one SCSI bus in that machine. Of my 17 machines, 15 are SCSI-based. Only 4 had this problem. One of them has gut two busses, the others only one. > > However, in your dmesg, it starts to print out an announcement for a pass > device before it starts mounting root, so it seems that xpt is finishing too > early somehow. Yes, I saw this as well. And in the "good" dmesg there are these two lines which look a bit screwn up: GEOM: nda0 at ahc0 bus 0 target 0 lun 0 ... ew disk da1 Don't know if this indicates some problem... As I said, when I first run into this problem last week, I _THINK_ I saw the pass devices appear at least on one broken box. But I won't swear on this. Another thing I remember is that there was at least one problematic box which booted successfully on the second try. Thanks, -Andre > > -- > John Baldwin -- Linux: Sozialismus, der nicht funktioniert From owner-svn-src-stable-7@FreeBSD.ORG Tue Apr 19 07:45:55 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B974106566B; Tue, 19 Apr 2011 07:45:55 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 487148FC16; Tue, 19 Apr 2011 07:45:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3J7jtGI098741; Tue, 19 Apr 2011 07:45:55 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3J7jt8S098737; Tue, 19 Apr 2011 07:45:55 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104190745.p3J7jt8S098737@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 19 Apr 2011 07:45:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220817 - in stable/7/sys: netinet netinet6 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2011 07:45:55 -0000 Author: bz Date: Tue Apr 19 07:45:54 2011 New Revision: 220817 URL: http://svn.freebsd.org/changeset/base/220817 Log: MFC r219579: Merge the two (logically) identical implementations for local port selections from in_pcbbind_setup() and in6_pcbsetport() in a single in_pcb_lport(). Modified: stable/7/sys/netinet/in_pcb.c stable/7/sys/netinet/in_pcb.h stable/7/sys/netinet6/in6_src.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/in_pcb.c ============================================================================== --- stable/7/sys/netinet/in_pcb.c Tue Apr 19 07:44:12 2011 (r220816) +++ stable/7/sys/netinet/in_pcb.c Tue Apr 19 07:45:54 2011 (r220817) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" #include "opt_ipsec.h" +#include "opt_inet.h" #include "opt_inet6.h" #include "opt_mac.h" @@ -73,6 +74,7 @@ __FBSDID("$FreeBSD$"); #ifdef INET6 #include #include +#include #endif /* INET6 */ @@ -257,6 +259,124 @@ in_pcbbind(struct inpcb *inp, struct soc return (0); } +#if defined(INET) || defined(INET6) +int +in_pcb_lport(struct inpcb *inp, struct in_addr *laddrp, u_short *lportp, + struct ucred *cred, int wild) +{ + struct inpcbinfo *pcbinfo; + struct inpcb *tmpinp; + unsigned short *lastport; + int count, dorandom, error; + u_short aux, first, last, lport; +#ifdef INET + struct in_addr laddr; +#endif + + pcbinfo = inp->inp_pcbinfo; + + /* + * Because no actual state changes occur here, a global write lock on + * the pcbinfo isn't required. + */ + INP_INFO_LOCK_ASSERT(pcbinfo); + INP_LOCK_ASSERT(inp); + + if (inp->inp_flags & INP_HIGHPORT) { + first = ipport_hifirstauto; /* sysctl */ + last = ipport_hilastauto; + lastport = &pcbinfo->ipi_lasthi; + } else if (inp->inp_flags & INP_LOWPORT) { + error = priv_check_cred(cred, PRIV_NETINET_RESERVEDPORT, 0); + if (error) + return (error); + first = ipport_lowfirstauto; /* 1023 */ + last = ipport_lowlastauto; /* 600 */ + lastport = &pcbinfo->ipi_lastlow; + } else { + first = ipport_firstauto; /* sysctl */ + last = ipport_lastauto; + lastport = &pcbinfo->ipi_lastport; + } + /* + * For UDP, use random port allocation as long as the user + * allows it. For TCP (and as of yet unknown) connections, + * use random port allocation only if the user allows it AND + * ipport_tick() allows it. + */ + if (ipport_randomized && + (!ipport_stoprandom || pcbinfo == &udbinfo)) + dorandom = 1; + else + dorandom = 0; + /* + * It makes no sense to do random port allocation if + * we have the only port available. + */ + if (first == last) + dorandom = 0; + /* Make sure to not include UDP packets in the count. */ + if (pcbinfo != &udbinfo) + ipport_tcpallocs++; + /* + * Instead of having two loops further down counting up or down + * make sure that first is always <= last and go with only one + * code path implementing all logic. + */ + if (first > last) { + aux = first; + first = last; + last = aux; + } + +#ifdef INET + /* Make the compiler happy. */ + laddr.s_addr = 0; + if ((inp->inp_vflag & INP_IPV4) != 0) { + KASSERT(laddrp != NULL, ("%s: laddrp NULL for v4 inp %p", + __func__, inp)); + laddr = *laddrp; + } +#endif + lport = *lportp; + + if (dorandom) + *lastport = first + (arc4random() % (last - first)); + + count = last - first; + + do { + if (count-- < 0) /* completely used? */ + return (EADDRNOTAVAIL); + ++*lastport; + if (*lastport < first || *lastport > last) + *lastport = first; + lport = htons(*lastport); + +#ifdef INET6 + if ((inp->inp_vflag & INP_IPV6) != 0) + tmpinp = in6_pcblookup_local(pcbinfo, + &inp->in6p_laddr, lport, wild, cred); +#endif +#if defined(INET) && defined(INET6) + else +#endif +#ifdef INET + tmpinp = in_pcblookup_local(pcbinfo, laddr, + lport, wild, cred); +#endif + } while (tmpinp != NULL); + +#ifdef INET + if ((inp->inp_vflag & INP_IPV4) != 0) + laddrp->s_addr = laddr.s_addr; +#endif + *lportp = lport; + + return (0); +} +#endif /* INET || INET6 */ + /* * Set up a bind operation on a PCB, performing port allocation * as required, but do not actually modify the PCB. Callers can @@ -271,14 +391,12 @@ in_pcbbind_setup(struct inpcb *inp, stru u_short *lportp, struct ucred *cred) { struct socket *so = inp->inp_socket; - unsigned short *lastport; struct sockaddr_in *sin; struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; struct in_addr laddr; u_short lport = 0; int wild = 0, reuseport = (so->so_options & SO_REUSEPORT); int error; - int dorandom; /* * Because no actual state changes occur here, a global write lock on @@ -397,91 +515,9 @@ in_pcbbind_setup(struct inpcb *inp, stru if (*lportp != 0) lport = *lportp; if (lport == 0) { - u_short first, last; - int count; - - if (inp->inp_flags & INP_HIGHPORT) { - first = ipport_hifirstauto; /* sysctl */ - last = ipport_hilastauto; - lastport = &pcbinfo->ipi_lasthi; - } else if (inp->inp_flags & INP_LOWPORT) { - error = priv_check_cred(cred, - PRIV_NETINET_RESERVEDPORT, 0); - if (error) - return error; - first = ipport_lowfirstauto; /* 1023 */ - last = ipport_lowlastauto; /* 600 */ - lastport = &pcbinfo->ipi_lastlow; - } else { - first = ipport_firstauto; /* sysctl */ - last = ipport_lastauto; - lastport = &pcbinfo->ipi_lastport; - } - /* - * For UDP, use random port allocation as long as the user - * allows it. For TCP (and as of yet unknown) connections, - * use random port allocation only if the user allows it AND - * ipport_tick() allows it. - */ - if (ipport_randomized && - (!ipport_stoprandom || pcbinfo == &udbinfo)) - dorandom = 1; - else - dorandom = 0; - /* - * It makes no sense to do random port allocation if - * we have the only port available. - */ - if (first == last) - dorandom = 0; - /* Make sure to not include UDP packets in the count. */ - if (pcbinfo != &udbinfo) - ipport_tcpallocs++; - /* - * Instead of having two loops further down counting up or down - * make sure that first is always <= last and go with only one - * code path implementing all logic. - * - * We split the two cases (up and down) so that the direction - * is not being tested on each round of the loop. - */ - if (first > last) { - /* - * counting down - */ - if (dorandom) - *lastport = first - - (arc4random() % (first - last)); - count = first - last; - - do { - if (count-- < 0) /* completely used? */ - return (EADDRNOTAVAIL); - --*lastport; - if (*lastport > first || *lastport < last) - *lastport = first; - lport = htons(*lastport); - } while (in_pcblookup_local(pcbinfo, laddr, lport, - wild, cred)); - } else { - /* - * counting up - */ - if (dorandom) - *lastport = first + - (arc4random() % (last - first)); - count = last - first; - - do { - if (count-- < 0) /* completely used? */ - return (EADDRNOTAVAIL); - ++*lastport; - if (*lastport < first || *lastport > last) - *lastport = first; - lport = htons(*lastport); - } while (in_pcblookup_local(pcbinfo, laddr, lport, - wild, cred)); - } + error = in_pcb_lport(inp, &laddr, &lport, cred, wild); + if (error != 0) + return (error); } *laddrp = laddr.s_addr; *lportp = lport; Modified: stable/7/sys/netinet/in_pcb.h ============================================================================== --- stable/7/sys/netinet/in_pcb.h Tue Apr 19 07:44:12 2011 (r220816) +++ stable/7/sys/netinet/in_pcb.h Tue Apr 19 07:45:54 2011 (r220817) @@ -496,6 +496,8 @@ extern struct callout ipport_tick_callou void in_pcbpurgeif0(struct inpcbinfo *, struct ifnet *); int in_pcballoc(struct socket *, struct inpcbinfo *); int in_pcbbind(struct inpcb *, struct sockaddr *, struct ucred *); +int in_pcb_lport(struct inpcb *, struct in_addr *, u_short *, + struct ucred *, int); int in_pcbbind_setup(struct inpcb *, struct sockaddr *, in_addr_t *, u_short *, struct ucred *); int in_pcbconnect(struct inpcb *, struct sockaddr *, struct ucred *); Modified: stable/7/sys/netinet6/in6_src.c ============================================================================== --- stable/7/sys/netinet6/in6_src.c Tue Apr 19 07:44:12 2011 (r220816) +++ stable/7/sys/netinet6/in6_src.c Tue Apr 19 07:45:54 2011 (r220817) @@ -783,9 +783,11 @@ int in6_pcbsetport(struct in6_addr *laddr, struct inpcb *inp, struct ucred *cred) { struct socket *so = inp->inp_socket; - u_int16_t lport = 0, first, last, *lastport; - int count, error, wild = 0, dorandom; + u_int16_t lport = 0; + int error, wild = 0; +#ifdef INVARIANTS struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; +#endif INP_INFO_WLOCK_ASSERT(pcbinfo); INP_WLOCK_ASSERT(inp); @@ -801,71 +803,9 @@ in6_pcbsetport(struct in6_addr *laddr, s inp->inp_flags |= INP_ANONPORT; - if (inp->inp_flags & INP_HIGHPORT) { - first = ipport_hifirstauto; /* sysctl */ - last = ipport_hilastauto; - lastport = &pcbinfo->ipi_lasthi; - } else if (inp->inp_flags & INP_LOWPORT) { - error = priv_check_cred(cred, PRIV_NETINET_RESERVEDPORT, 0); - if (error) - return error; - first = ipport_lowfirstauto; /* 1023 */ - last = ipport_lowlastauto; /* 600 */ - lastport = &pcbinfo->ipi_lastlow; - } else { - first = ipport_firstauto; /* sysctl */ - last = ipport_lastauto; - lastport = &pcbinfo->ipi_lastport; - } - - /* - * For UDP, use random port allocation as long as the user - * allows it. For TCP (and as of yet unknown) connections, - * use random port allocation only if the user allows it AND - * ipport_tick() allows it. - */ - if (ipport_randomized && - (!ipport_stoprandom || pcbinfo == &udbinfo)) - dorandom = 1; - else - dorandom = 0; - /* - * It makes no sense to do random port allocation if - * we have the only port available. - */ - if (first == last) - dorandom = 0; - /* Make sure to not include UDP packets in the count. */ - if (pcbinfo != &udbinfo) - ipport_tcpallocs++; - - /* - * Instead of having two loops further down counting up or down - * make sure that first is always <= last and go with only one - * code path implementing all logic. - */ - if (first > last) { - u_int16_t aux; - - aux = first; - first = last; - last = aux; - } - - if (dorandom) - *lastport = first + (arc4random() % (last - first)); - - count = last - first; - - do { - if (count-- < 0) /* completely used? */ - return (EADDRNOTAVAIL); - ++*lastport; - if (*lastport < first || *lastport > last) - *lastport = first; - lport = htons(*lastport); - } while (in6_pcblookup_local(pcbinfo, &inp->in6p_laddr, - lport, wild, cred)); + error = in_pcb_lport(inp, NULL, &lport, cred, wild); + if (error != 0) + return (error); inp->inp_lport = lport; if (in_pcbinshash(inp) != 0) { From owner-svn-src-stable-7@FreeBSD.ORG Tue Apr 19 08:00:44 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6521106567B; Tue, 19 Apr 2011 08:00:44 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C48508FC12; Tue, 19 Apr 2011 08:00:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3J80io2099306; Tue, 19 Apr 2011 08:00:44 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3J80iP6099304; Tue, 19 Apr 2011 08:00:44 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104190800.p3J80iP6099304@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 19 Apr 2011 08:00:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220821 - stable/7/sys/netinet X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2011 08:00:45 -0000 Author: bz Date: Tue Apr 19 08:00:44 2011 New Revision: 220821 URL: http://svn.freebsd.org/changeset/base/220821 Log: MFC r219779: Properly check for an IPv4 socket after r219579. In some cases as udp6_connect() without an earlier bind(2) to an address, v4-mapped sockets allowed and a non mapped destination address, we can end up here with both v4 and v6 indicated: inp_vflag = (INP_IPV4|INP_IPV6|INP_IPV6PROTO) In that case however laddrp is NULL as the IPv6 path does not pass in a copy currently. Reported by: Pawel Worach (pawel.worach gmail.com) Tested by: Pawel Worach (pawel.worach gmail.com) Modified: stable/7/sys/netinet/in_pcb.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/in_pcb.c ============================================================================== --- stable/7/sys/netinet/in_pcb.c Tue Apr 19 07:54:21 2011 (r220820) +++ stable/7/sys/netinet/in_pcb.c Tue Apr 19 08:00:44 2011 (r220821) @@ -332,7 +332,7 @@ in_pcb_lport(struct inpcb *inp, struct i #ifdef INET /* Make the compiler happy. */ laddr.s_addr = 0; - if ((inp->inp_vflag & INP_IPV4) != 0) { + if ((inp->inp_vflag & (INP_IPV4|INP_IPV6)) == INP_IPV4) { KASSERT(laddrp != NULL, ("%s: laddrp NULL for v4 inp %p", __func__, inp)); laddr = *laddrp; @@ -368,7 +368,7 @@ in_pcb_lport(struct inpcb *inp, struct i } while (tmpinp != NULL); #ifdef INET - if ((inp->inp_vflag & INP_IPV4) != 0) + if ((inp->inp_vflag & (INP_IPV4|INP_IPV6)) == INP_IPV4) laddrp->s_addr = laddr.s_addr; #endif *lportp = lport; From owner-svn-src-stable-7@FreeBSD.ORG Tue Apr 19 08:17:37 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FBB91065674; Tue, 19 Apr 2011 08:17:37 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 132D58FC12; Tue, 19 Apr 2011 08:17:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3J8Havr099771; Tue, 19 Apr 2011 08:17:36 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3J8Ha2V099769; Tue, 19 Apr 2011 08:17:36 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104190817.p3J8Ha2V099769@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 19 Apr 2011 08:17:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220824 - stable/7/sys/netinet6 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2011 08:17:37 -0000 Author: bz Date: Tue Apr 19 08:17:36 2011 New Revision: 220824 URL: http://svn.freebsd.org/changeset/base/220824 Log: MFC r220462: After r219579 and r219779 unbreak v4-mapped v6 sockets for UDP some more. Similar to what we do for TCP check for v4-mapped addresses and then handle them or the normal v6 address case. For either set inp_vflags before calling into the pcb connect function so that we have an unambiguous view in case we need to set the local address or port. Looked at: tuexen (as part of more) Modified: stable/7/sys/netinet6/udp6_usrreq.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet6/udp6_usrreq.c ============================================================================== --- stable/7/sys/netinet6/udp6_usrreq.c Tue Apr 19 08:17:20 2011 (r220823) +++ stable/7/sys/netinet6/udp6_usrreq.c Tue Apr 19 08:17:36 2011 (r220824) @@ -850,43 +850,41 @@ udp6_connect(struct socket *so, struct s INP_INFO_WLOCK(&udbinfo); INP_WLOCK(inp); - if ((inp->inp_flags & IN6P_IPV6_V6ONLY) == 0 && - IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) { + if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) { struct sockaddr_in sin; + if ((inp->inp_flags & IN6P_IPV6_V6ONLY) != 0) { + error = EINVAL; + goto out; + } if (inp->inp_faddr.s_addr != INADDR_ANY) { error = EISCONN; goto out; } in6_sin6_2_sin(&sin, sin6); + inp->inp_vflag |= INP_IPV4; + inp->inp_vflag &= ~INP_IPV6; error = prison_remote_ip4(td->td_ucred, &sin.sin_addr); if (error != 0) goto out; error = in_pcbconnect(inp, (struct sockaddr *)&sin, td->td_ucred); - if (error == 0) { - inp->inp_vflag |= INP_IPV4; - inp->inp_vflag &= ~INP_IPV6; + if (error == 0) soisconnected(so); - } goto out; } if (!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) { error = EISCONN; goto out; } + inp->inp_vflag &= ~INP_IPV4; + inp->inp_vflag |= INP_IPV6; error = prison_remote_ip6(td->td_ucred, &sin6->sin6_addr); if (error != 0) goto out; error = in6_pcbconnect(inp, nam, td->td_ucred); - if (error == 0) { - if ((inp->inp_flags & IN6P_IPV6_V6ONLY) == 0) { - /* should be non mapped addr */ - inp->inp_vflag &= ~INP_IPV4; - inp->inp_vflag |= INP_IPV6; - } + if (error == 0) soisconnected(so); - } out: INP_WUNLOCK(inp); INP_INFO_WUNLOCK(&udbinfo); From owner-svn-src-stable-7@FreeBSD.ORG Tue Apr 19 08:35:07 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68A201065670; Tue, 19 Apr 2011 08:35:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 566018FC14; Tue, 19 Apr 2011 08:35:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3J8Z7Ek000386; Tue, 19 Apr 2011 08:35:07 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3J8Z787000384; Tue, 19 Apr 2011 08:35:07 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104190835.p3J8Z787000384@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 19 Apr 2011 08:35:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220826 - stable/7/sys/netinet6 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2011 08:35:07 -0000 Author: bz Date: Tue Apr 19 08:35:07 2011 New Revision: 220826 URL: http://svn.freebsd.org/changeset/base/220826 Log: MFC r220463: Remove a check in udp6_send() that prevented v4-mapped v6 addresses from working. We store v4 and v6 addresses as a union but for v4-mapped addresses only store the 32bits w/o the ::ffff: word. That failed the check as for example 127.0.0.1 would be ::7f00:1 rather than ::ffff:7f00:1 and the IN6_IS_ADDR_V4MAPPED() never worked here. Given we can hardly get here with an unbound local address or invalid inp_vflags remove the check. Reported by: tuexen Reviewed by: tuexen Modified: stable/7/sys/netinet6/udp6_usrreq.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet6/udp6_usrreq.c ============================================================================== --- stable/7/sys/netinet6/udp6_usrreq.c Tue Apr 19 08:29:28 2011 (r220825) +++ stable/7/sys/netinet6/udp6_usrreq.c Tue Apr 19 08:35:07 2011 (r220826) @@ -986,18 +986,6 @@ udp6_send(struct socket *so, int flags, if (hasv4addr) { struct pr_usrreqs *pru; - if (!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr) && - !IN6_IS_ADDR_V4MAPPED(&inp->in6p_laddr)) { - /* - * When remote addr is IPv4-mapped address, - * local addr should not be an IPv6 address; - * since you cannot determine how to map IPv6 - * source address to IPv4. - */ - error = EINVAL; - goto out; - } - /* * XXXRW: We release UDP-layer locks before calling * udp_send() in order to avoid recursion. However, @@ -1021,7 +1009,6 @@ udp6_send(struct socket *so, int flags, mac_create_mbuf_from_inpcb(inp, m); #endif error = udp6_output(inp, m, addr, control, td); -out: INP_WUNLOCK(inp); INP_INFO_WUNLOCK(&udbinfo); return (error); From owner-svn-src-stable-7@FreeBSD.ORG Tue Apr 19 08:56:10 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C4CB106566C; Tue, 19 Apr 2011 08:56:10 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EE7CF8FC16; Tue, 19 Apr 2011 08:56:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3J8u9o4000901; Tue, 19 Apr 2011 08:56:09 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3J8u9i4000899; Tue, 19 Apr 2011 08:56:09 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104190856.p3J8u9i4000899@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 19 Apr 2011 08:56:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220827 - stable/7/sys/netinet X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2011 08:56:10 -0000 Author: bz Date: Tue Apr 19 08:56:09 2011 New Revision: 220827 URL: http://svn.freebsd.org/changeset/base/220827 Log: MFC r220619: The mbuf_frag_size always was and is file local and not queried from base user space tools via kvm. Mark it static. Modified: stable/7/sys/netinet/ip_output.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/ip_output.c ============================================================================== --- stable/7/sys/netinet/ip_output.c Tue Apr 19 08:35:07 2011 (r220826) +++ stable/7/sys/netinet/ip_output.c Tue Apr 19 08:56:09 2011 (r220827) @@ -81,7 +81,7 @@ __FBSDID("$FreeBSD$"); u_short ip_id; #ifdef MBUF_STRESS_TEST -int mbuf_frag_size = 0; +static int mbuf_frag_size = 0; SYSCTL_INT(_net_inet_ip, OID_AUTO, mbuf_frag_size, CTLFLAG_RW, &mbuf_frag_size, 0, "Fragment outgoing mbufs to this size"); #endif From owner-svn-src-stable-7@FreeBSD.ORG Tue Apr 19 12:56:52 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E8E91065674; Tue, 19 Apr 2011 12:56:50 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) by mx1.freebsd.org (Postfix) with ESMTP id 362928FC22; Tue, 19 Apr 2011 12:56:49 +0000 (UTC) Received: from mail2.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.13.6/8.13.6) with ESMTP id p3JCumXC030826; Tue, 19 Apr 2011 14:56:48 +0200 Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130]) by mail2.siemens.de (8.13.6/8.13.6) with ESMTP id p3JCumIP006686; Tue, 19 Apr 2011 14:56:48 +0200 Received: (from localhost) by curry.mchp.siemens.de (8.14.4/8.14.4) id p3JCumrp020303; Date: Tue, 19 Apr 2011 14:56:48 +0200 From: Andre Albsmeier To: John Baldwin Message-ID: <20110419125648.GA17780@curry.mchp.siemens.de> References: <201102041444.p14EixJP087709@svn.freebsd.org> <201104151235.05114.jhb@freebsd.org> <20110418113657.GA6080@curry.mchp.siemens.de> <201104180918.26054.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201104180918.26054.jhb@freebsd.org> X-Echelon: X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.20 (2009-06-14) Cc: "svn-src-stable-7@freebsd.org" , "scsi@freebsd.org" Subject: Re: svn commit: r218277 - in stable/7/sys: kern sys X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2011 12:56:52 -0000 On Mon, 18-Apr-2011 at 15:18:25 +0200, John Baldwin wrote: > On Monday, April 18, 2011 7:36:57 am Andre Albsmeier wrote: > > On Fri, 15-Apr-2011 at 18:35:05 +0200, John Baldwin wrote: > > > On Friday, April 15, 2011 9:25:25 am Andre Albsmeier wrote: > > > > On Fri, 04-Feb-2011 at 14:44:59 +0000, John Baldwin wrote: > > > > > Author: jhb > > > > > Date: Fri Feb 4 14:44:59 2011 > > > > > New Revision: 218277 > > > > > URL: http://svn.freebsd.org/changeset/base/218277 > > > > > > > > > > Log: > > > > > MFC 217075: > > > > > Retire PCONFIG and leave the priority of thread0 alone when waiting for > > > > > interrupt config hooks to execute. > > > > > > > > > > To preserve the KBI, I did not renumber priorities but simply removed > > > > > PCONFIG. > > > > > > > > > > Modified: > > > > > stable/7/sys/kern/subr_autoconf.c > > > > > stable/7/sys/sys/priority.h > > > > > Directory Properties: > > > > > stable/7/sys/ (props changed) > > > > > stable/7/sys/cddl/contrib/opensolaris/ (props changed) > > > > > stable/7/sys/contrib/dev/acpica/ (props changed) > > > > > stable/7/sys/contrib/pf/ (props changed) > > > > > > > > > > Modified: stable/7/sys/kern/subr_autoconf.c > > > > > > > > ============================================================================== > > > > > --- stable/7/sys/kern/subr_autoconf.c Fri Feb 4 14:44:42 2011 > > > (r218276) > > > > > +++ stable/7/sys/kern/subr_autoconf.c Fri Feb 4 14:44:59 2011 > > > (r218277) > > > > > @@ -108,7 +108,7 @@ run_interrupt_driven_config_hooks(dummy) > > > > > warned = 0; > > > > > while (!TAILQ_EMPTY(&intr_config_hook_list)) { > > > > > if (msleep(&intr_config_hook_list, &intr_config_hook_lock, > > > > > - PCONFIG, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > > + 0, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > > EWOULDBLOCK) { > > > > > mtx_unlock(&intr_config_hook_lock); > > > > > warned++; > > > > > > > > > > > > This broke several of my machines in a somewhat strange way: > > > > > > > > After upgrading them (17) to a recent 7-STABLE (as of 2011-04-12) > > > > I noticed that some (4) of them didn't start. All 4 didn't find > > > > their boot device anymore. What they all got in common is: > > > > > > > > - an Adaptec 2940 Ultra SCSI adapter > > > > - two SCSI harddisks (da0 and da1) of various brands > > > > - one SCSI CDROM drive (cd0) > > > > > > > > To be exact, none of the three devices (da0, da1, cd0) were > > > > detected at all. Other machines with a similar configuration > > > > (2940 and da0/da1) but _without_ the CDROM drive didn't have > > > > any problems. So I simply removed the CDROM drives on the 4 > > > > machines in question and they all booted again. > > > > > > > > Today I decided to dig into this and after reverting(*) the > > > > above change, they worked with the CDROM again. I have cross- > > > > checked it 3 times. No idea what's happening here... > > > > > > > > -Andre > > > > > > > > (*) To be honest, I use this patch so I had to modify only one file: > > > > > > > > --- sys/kern/subr_autoconf.c.ORI 2011-02-05 13:14:11.000000000 +0100 > > > > +++ sys/kern/subr_autoconf.c 2011-04-15 14:34:31.000000000 +0200 > > > > @@ -108,7 +108,7 @@ > > > > warned = 0; > > > > while (!TAILQ_EMPTY(&intr_config_hook_list)) { > > > > if (msleep(&intr_config_hook_list, &intr_config_hook_lock, > > > > - 0, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > + PRI_MIN_KERN + 32, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > EWOULDBLOCK) { > > > > mtx_unlock(&intr_config_hook_lock); > > > > warned++; > > > > > > Do you get any warnings about CAM timeouts, etc. when these probe? A verbose > > > dmesg might be nice to look at if possible. > > > > OK, I have set up a machine for testing. In my other mail > > I was wrong saying that the pass devices appear when using > > the problematic kernel... > > > > Here are the dmesgs: > > > > - dmesg_bad is the original kernel as of Friday > > - dmesg_ok is the patched kernel (see above) as of Friday > > - dmesg.diff is the diff between both > > > > If you want me to try something just tell me... > > Hmmm, what if you make SCSI_DELAY larger? Also, can you let it fail the > mount and drop into ddb and then get 'ps' output? As soon as I include the debugger into the kernel the problem is gone. I have double-checked it two times now: With debugger the drives are detected, without debugger mostly (but not always) not. I currently have it running in an endless rebooting loop hoping, that it fails eventually... -Andre > > I think the CAM boot probe is broken a bit. xpt_rescan_done() always calls > xpt_release_boot(), but we don't hold the boot for each bus added while > buses_config_done is 0, so it seems CAM only waits for at least one bus to > rescan before it lets the boot continue? This seems wrong (i.e. one would > think it would let all the busses added before this point scan before > continuing). > > However, in your dmesg, it starts to print out an announcement for a pass > device before it starts mounting root, so it seems that xpt is finishing too > early somehow. > > -- > John Baldwin -- UNIX is an operating system, OS/2 is half an operating system, Windows is a shell, and DOS is a bootsector virus. From owner-svn-src-stable-7@FreeBSD.ORG Tue Apr 19 13:22:27 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEA97106566B; Tue, 19 Apr 2011 13:22:27 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id A3AA38FC16; Tue, 19 Apr 2011 13:22:27 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 3D9F446B51; Tue, 19 Apr 2011 09:22:27 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B24A28A02A; Tue, 19 Apr 2011 09:22:26 -0400 (EDT) From: John Baldwin To: Andre Albsmeier Date: Tue, 19 Apr 2011 09:20:25 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <201102041444.p14EixJP087709@svn.freebsd.org> <201104180918.26054.jhb@freebsd.org> <20110419125648.GA17780@curry.mchp.siemens.de> In-Reply-To: <20110419125648.GA17780@curry.mchp.siemens.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201104190920.25924.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 19 Apr 2011 09:22:26 -0400 (EDT) Cc: "svn-src-stable-7@freebsd.org" , "scsi@freebsd.org" Subject: Re: svn commit: r218277 - in stable/7/sys: kern sys X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2011 13:22:27 -0000 On Tuesday, April 19, 2011 8:56:48 am Andre Albsmeier wrote: > On Mon, 18-Apr-2011 at 15:18:25 +0200, John Baldwin wrote: > > On Monday, April 18, 2011 7:36:57 am Andre Albsmeier wrote: > > > On Fri, 15-Apr-2011 at 18:35:05 +0200, John Baldwin wrote: > > > > On Friday, April 15, 2011 9:25:25 am Andre Albsmeier wrote: > > > > > On Fri, 04-Feb-2011 at 14:44:59 +0000, John Baldwin wrote: > > > > > > Author: jhb > > > > > > Date: Fri Feb 4 14:44:59 2011 > > > > > > New Revision: 218277 > > > > > > URL: http://svn.freebsd.org/changeset/base/218277 > > > > > > > > > > > > Log: > > > > > > MFC 217075: > > > > > > Retire PCONFIG and leave the priority of thread0 alone when waiting for > > > > > > interrupt config hooks to execute. > > > > > > > > > > > > To preserve the KBI, I did not renumber priorities but simply removed > > > > > > PCONFIG. > > > > > > > > > > > > Modified: > > > > > > stable/7/sys/kern/subr_autoconf.c > > > > > > stable/7/sys/sys/priority.h > > > > > > Directory Properties: > > > > > > stable/7/sys/ (props changed) > > > > > > stable/7/sys/cddl/contrib/opensolaris/ (props changed) > > > > > > stable/7/sys/contrib/dev/acpica/ (props changed) > > > > > > stable/7/sys/contrib/pf/ (props changed) > > > > > > > > > > > > Modified: stable/7/sys/kern/subr_autoconf.c > > > > > > > > > > ============================================================================== > > > > > > --- stable/7/sys/kern/subr_autoconf.c Fri Feb 4 14:44:42 2011 > > > > (r218276) > > > > > > +++ stable/7/sys/kern/subr_autoconf.c Fri Feb 4 14:44:59 2011 > > > > (r218277) > > > > > > @@ -108,7 +108,7 @@ run_interrupt_driven_config_hooks(dummy) > > > > > > warned = 0; > > > > > > while (!TAILQ_EMPTY(&intr_config_hook_list)) { > > > > > > if (msleep(&intr_config_hook_list, &intr_config_hook_lock, > > > > > > - PCONFIG, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > > > + 0, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > > > EWOULDBLOCK) { > > > > > > mtx_unlock(&intr_config_hook_lock); > > > > > > warned++; > > > > > > > > > > > > > > > This broke several of my machines in a somewhat strange way: > > > > > > > > > > After upgrading them (17) to a recent 7-STABLE (as of 2011-04-12) > > > > > I noticed that some (4) of them didn't start. All 4 didn't find > > > > > their boot device anymore. What they all got in common is: > > > > > > > > > > - an Adaptec 2940 Ultra SCSI adapter > > > > > - two SCSI harddisks (da0 and da1) of various brands > > > > > - one SCSI CDROM drive (cd0) > > > > > > > > > > To be exact, none of the three devices (da0, da1, cd0) were > > > > > detected at all. Other machines with a similar configuration > > > > > (2940 and da0/da1) but _without_ the CDROM drive didn't have > > > > > any problems. So I simply removed the CDROM drives on the 4 > > > > > machines in question and they all booted again. > > > > > > > > > > Today I decided to dig into this and after reverting(*) the > > > > > above change, they worked with the CDROM again. I have cross- > > > > > checked it 3 times. No idea what's happening here... > > > > > > > > > > -Andre > > > > > > > > > > (*) To be honest, I use this patch so I had to modify only one file: > > > > > > > > > > --- sys/kern/subr_autoconf.c.ORI 2011-02-05 13:14:11.000000000 +0100 > > > > > +++ sys/kern/subr_autoconf.c 2011-04-15 14:34:31.000000000 +0200 > > > > > @@ -108,7 +108,7 @@ > > > > > warned = 0; > > > > > while (!TAILQ_EMPTY(&intr_config_hook_list)) { > > > > > if (msleep(&intr_config_hook_list, &intr_config_hook_lock, > > > > > - 0, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > > + PRI_MIN_KERN + 32, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > > EWOULDBLOCK) { > > > > > mtx_unlock(&intr_config_hook_lock); > > > > > warned++; > > > > > > > > Do you get any warnings about CAM timeouts, etc. when these probe? A verbose > > > > dmesg might be nice to look at if possible. > > > > > > OK, I have set up a machine for testing. In my other mail > > > I was wrong saying that the pass devices appear when using > > > the problematic kernel... > > > > > > Here are the dmesgs: > > > > > > - dmesg_bad is the original kernel as of Friday > > > - dmesg_ok is the patched kernel (see above) as of Friday > > > - dmesg.diff is the diff between both > > > > > > If you want me to try something just tell me... > > > > Hmmm, what if you make SCSI_DELAY larger? Also, can you let it fail the > > mount and drop into ddb and then get 'ps' output? > > As soon as I include the debugger into the kernel the problem > is gone. I have double-checked it two times now: With debugger > the drives are detected, without debugger mostly (but not always) > not. > > I currently have it running in an endless rebooting loop hoping, > that it fails eventually... Hummm. This seems like it is a timing related race. :( -- John Baldwin From owner-svn-src-stable-7@FreeBSD.ORG Tue Apr 19 13:26:51 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9F5A106564A; Tue, 19 Apr 2011 13:26:51 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) by mx1.freebsd.org (Postfix) with ESMTP id 4CBCD8FC16; Tue, 19 Apr 2011 13:26:51 +0000 (UTC) Received: from mail1.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.13.6/8.13.6) with ESMTP id p3JDQoMM003051; Tue, 19 Apr 2011 15:26:50 +0200 Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130]) by mail1.siemens.de (8.13.6/8.13.6) with ESMTP id p3JDQoR7016930; Tue, 19 Apr 2011 15:26:50 +0200 Received: (from localhost) by curry.mchp.siemens.de (8.14.4/8.14.4) id p3JDQorH020367; Date: Tue, 19 Apr 2011 15:26:50 +0200 From: Andre Albsmeier To: John Baldwin Message-ID: <20110419132650.GA17934@curry.mchp.siemens.de> References: <201102041444.p14EixJP087709@svn.freebsd.org> <201104180918.26054.jhb@freebsd.org> <20110419125648.GA17780@curry.mchp.siemens.de> <201104190920.25924.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201104190920.25924.jhb@freebsd.org> X-Echelon: X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.20 (2009-06-14) Cc: "svn-src-stable-7@freebsd.org" , "scsi@freebsd.org" Subject: Re: svn commit: r218277 - in stable/7/sys: kern sys X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2011 13:26:51 -0000 On Tue, 19-Apr-2011 at 15:20:25 +0200, John Baldwin wrote: > On Tuesday, April 19, 2011 8:56:48 am Andre Albsmeier wrote: > > On Mon, 18-Apr-2011 at 15:18:25 +0200, John Baldwin wrote: > > > On Monday, April 18, 2011 7:36:57 am Andre Albsmeier wrote: > > > > On Fri, 15-Apr-2011 at 18:35:05 +0200, John Baldwin wrote: > > > > > On Friday, April 15, 2011 9:25:25 am Andre Albsmeier wrote: > > > > > > On Fri, 04-Feb-2011 at 14:44:59 +0000, John Baldwin wrote: > > > > > > > Author: jhb > > > > > > > Date: Fri Feb 4 14:44:59 2011 > > > > > > > New Revision: 218277 > > > > > > > URL: http://svn.freebsd.org/changeset/base/218277 > > > > > > > > > > > > > > Log: > > > > > > > MFC 217075: > > > > > > > Retire PCONFIG and leave the priority of thread0 alone when waiting for > > > > > > > interrupt config hooks to execute. > > > > > > > > > > > > > > To preserve the KBI, I did not renumber priorities but simply removed > > > > > > > PCONFIG. > > > > > > > > > > > > > > Modified: > > > > > > > stable/7/sys/kern/subr_autoconf.c > > > > > > > stable/7/sys/sys/priority.h > > > > > > > Directory Properties: > > > > > > > stable/7/sys/ (props changed) > > > > > > > stable/7/sys/cddl/contrib/opensolaris/ (props changed) > > > > > > > stable/7/sys/contrib/dev/acpica/ (props changed) > > > > > > > stable/7/sys/contrib/pf/ (props changed) > > > > > > > > > > > > > > Modified: stable/7/sys/kern/subr_autoconf.c > > > > > > > > > > > > ============================================================================== > > > > > > > --- stable/7/sys/kern/subr_autoconf.c Fri Feb 4 14:44:42 2011 > > > > > (r218276) > > > > > > > +++ stable/7/sys/kern/subr_autoconf.c Fri Feb 4 14:44:59 2011 > > > > > (r218277) > > > > > > > @@ -108,7 +108,7 @@ run_interrupt_driven_config_hooks(dummy) > > > > > > > warned = 0; > > > > > > > while (!TAILQ_EMPTY(&intr_config_hook_list)) { > > > > > > > if (msleep(&intr_config_hook_list, &intr_config_hook_lock, > > > > > > > - PCONFIG, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > > > > + 0, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > > > > EWOULDBLOCK) { > > > > > > > mtx_unlock(&intr_config_hook_lock); > > > > > > > warned++; > > > > > > > > > > > > > > > > > > This broke several of my machines in a somewhat strange way: > > > > > > > > > > > > After upgrading them (17) to a recent 7-STABLE (as of 2011-04-12) > > > > > > I noticed that some (4) of them didn't start. All 4 didn't find > > > > > > their boot device anymore. What they all got in common is: > > > > > > > > > > > > - an Adaptec 2940 Ultra SCSI adapter > > > > > > - two SCSI harddisks (da0 and da1) of various brands > > > > > > - one SCSI CDROM drive (cd0) > > > > > > > > > > > > To be exact, none of the three devices (da0, da1, cd0) were > > > > > > detected at all. Other machines with a similar configuration > > > > > > (2940 and da0/da1) but _without_ the CDROM drive didn't have > > > > > > any problems. So I simply removed the CDROM drives on the 4 > > > > > > machines in question and they all booted again. > > > > > > > > > > > > Today I decided to dig into this and after reverting(*) the > > > > > > above change, they worked with the CDROM again. I have cross- > > > > > > checked it 3 times. No idea what's happening here... > > > > > > > > > > > > -Andre > > > > > > > > > > > > (*) To be honest, I use this patch so I had to modify only one file: > > > > > > > > > > > > --- sys/kern/subr_autoconf.c.ORI 2011-02-05 13:14:11.000000000 +0100 > > > > > > +++ sys/kern/subr_autoconf.c 2011-04-15 14:34:31.000000000 +0200 > > > > > > @@ -108,7 +108,7 @@ > > > > > > warned = 0; > > > > > > while (!TAILQ_EMPTY(&intr_config_hook_list)) { > > > > > > if (msleep(&intr_config_hook_list, &intr_config_hook_lock, > > > > > > - 0, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > > > + PRI_MIN_KERN + 32, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > > > EWOULDBLOCK) { > > > > > > mtx_unlock(&intr_config_hook_lock); > > > > > > warned++; > > > > > > > > > > Do you get any warnings about CAM timeouts, etc. when these probe? A verbose > > > > > dmesg might be nice to look at if possible. > > > > > > > > OK, I have set up a machine for testing. In my other mail > > > > I was wrong saying that the pass devices appear when using > > > > the problematic kernel... > > > > > > > > Here are the dmesgs: > > > > > > > > - dmesg_bad is the original kernel as of Friday > > > > - dmesg_ok is the patched kernel (see above) as of Friday > > > > - dmesg.diff is the diff between both > > > > > > > > If you want me to try something just tell me... > > > > > > Hmmm, what if you make SCSI_DELAY larger? Also, can you let it fail the > > > mount and drop into ddb and then get 'ps' output? > > > > As soon as I include the debugger into the kernel the problem > > is gone. I have double-checked it two times now: With debugger > > the drives are detected, without debugger mostly (but not always) > > not. > > > > I currently have it running in an endless rebooting loop hoping, > > that it fails eventually... > > Hummm. This seems like it is a timing related race. :( Yes, especially since it does not fail reliably -- even when using a kernel without debugger... -Andre > > -- > John Baldwin -- C:\>WIN The computer obeys and wins. You lose and Bill collects. From owner-svn-src-stable-7@FreeBSD.ORG Wed Apr 20 05:32:28 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5B34106566C; Wed, 20 Apr 2011 05:32:28 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from thoth.sbs.de (thoth.sbs.de [192.35.17.2]) by mx1.freebsd.org (Postfix) with ESMTP id 2E9858FC1F; Wed, 20 Apr 2011 05:32:27 +0000 (UTC) Received: from mail2.siemens.de (localhost [127.0.0.1]) by thoth.sbs.de (8.13.6/8.13.6) with ESMTP id p3K5WRQh015819; Wed, 20 Apr 2011 07:32:27 +0200 Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130]) by mail2.siemens.de (8.13.6/8.13.6) with ESMTP id p3K5WQqJ024901; Wed, 20 Apr 2011 07:32:26 +0200 Received: (from localhost) by curry.mchp.siemens.de (8.14.4/8.14.4) id p3K5WQf5023278; Date: Wed, 20 Apr 2011 07:32:26 +0200 From: Andre Albsmeier To: John Baldwin Message-ID: <20110420053226.GA22854@curry.mchp.siemens.de> References: <201102041444.p14EixJP087709@svn.freebsd.org> <201104180918.26054.jhb@freebsd.org> <20110419125648.GA17780@curry.mchp.siemens.de> <201104190920.25924.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201104190920.25924.jhb@freebsd.org> X-Echelon: X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.20 (2009-06-14) Cc: "svn-src-stable-7@freebsd.org" , "scsi@freebsd.org" Subject: Re: svn commit: r218277 - in stable/7/sys: kern sys X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2011 05:32:29 -0000 On Tue, 19-Apr-2011 at 15:20:25 +0200, John Baldwin wrote: > On Tuesday, April 19, 2011 8:56:48 am Andre Albsmeier wrote: > > On Mon, 18-Apr-2011 at 15:18:25 +0200, John Baldwin wrote: > > > On Monday, April 18, 2011 7:36:57 am Andre Albsmeier wrote: > > > > On Fri, 15-Apr-2011 at 18:35:05 +0200, John Baldwin wrote: > > > > > On Friday, April 15, 2011 9:25:25 am Andre Albsmeier wrote: > > > > > > On Fri, 04-Feb-2011 at 14:44:59 +0000, John Baldwin wrote: > > > > > > > Author: jhb > > > > > > > Date: Fri Feb 4 14:44:59 2011 > > > > > > > New Revision: 218277 > > > > > > > URL: http://svn.freebsd.org/changeset/base/218277 > > > > > > > > > > > > > > Log: > > > > > > > MFC 217075: > > > > > > > Retire PCONFIG and leave the priority of thread0 alone when waiting for > > > > > > > interrupt config hooks to execute. > > > > > > > > > > > > > > To preserve the KBI, I did not renumber priorities but simply removed > > > > > > > PCONFIG. > > > > > > > > > > > > > > Modified: > > > > > > > stable/7/sys/kern/subr_autoconf.c > > > > > > > stable/7/sys/sys/priority.h > > > > > > > Directory Properties: > > > > > > > stable/7/sys/ (props changed) > > > > > > > stable/7/sys/cddl/contrib/opensolaris/ (props changed) > > > > > > > stable/7/sys/contrib/dev/acpica/ (props changed) > > > > > > > stable/7/sys/contrib/pf/ (props changed) > > > > > > > > > > > > > > Modified: stable/7/sys/kern/subr_autoconf.c > > > > > > > > > > > > ============================================================================== > > > > > > > --- stable/7/sys/kern/subr_autoconf.c Fri Feb 4 14:44:42 2011 > > > > > (r218276) > > > > > > > +++ stable/7/sys/kern/subr_autoconf.c Fri Feb 4 14:44:59 2011 > > > > > (r218277) > > > > > > > @@ -108,7 +108,7 @@ run_interrupt_driven_config_hooks(dummy) > > > > > > > warned = 0; > > > > > > > while (!TAILQ_EMPTY(&intr_config_hook_list)) { > > > > > > > if (msleep(&intr_config_hook_list, &intr_config_hook_lock, > > > > > > > - PCONFIG, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > > > > + 0, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > > > > EWOULDBLOCK) { > > > > > > > mtx_unlock(&intr_config_hook_lock); > > > > > > > warned++; > > > > > > > > > > > > > > > > > > This broke several of my machines in a somewhat strange way: > > > > > > > > > > > > After upgrading them (17) to a recent 7-STABLE (as of 2011-04-12) > > > > > > I noticed that some (4) of them didn't start. All 4 didn't find > > > > > > their boot device anymore. What they all got in common is: > > > > > > > > > > > > - an Adaptec 2940 Ultra SCSI adapter > > > > > > - two SCSI harddisks (da0 and da1) of various brands > > > > > > - one SCSI CDROM drive (cd0) > > > > > > > > > > > > To be exact, none of the three devices (da0, da1, cd0) were > > > > > > detected at all. Other machines with a similar configuration > > > > > > (2940 and da0/da1) but _without_ the CDROM drive didn't have > > > > > > any problems. So I simply removed the CDROM drives on the 4 > > > > > > machines in question and they all booted again. > > > > > > > > > > > > Today I decided to dig into this and after reverting(*) the > > > > > > above change, they worked with the CDROM again. I have cross- > > > > > > checked it 3 times. No idea what's happening here... > > > > > > > > > > > > -Andre > > > > > > > > > > > > (*) To be honest, I use this patch so I had to modify only one file: > > > > > > > > > > > > --- sys/kern/subr_autoconf.c.ORI 2011-02-05 13:14:11.000000000 +0100 > > > > > > +++ sys/kern/subr_autoconf.c 2011-04-15 14:34:31.000000000 +0200 > > > > > > @@ -108,7 +108,7 @@ > > > > > > warned = 0; > > > > > > while (!TAILQ_EMPTY(&intr_config_hook_list)) { > > > > > > if (msleep(&intr_config_hook_list, &intr_config_hook_lock, > > > > > > - 0, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > > > + PRI_MIN_KERN + 32, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > > > EWOULDBLOCK) { > > > > > > mtx_unlock(&intr_config_hook_lock); > > > > > > warned++; > > > > > > > > > > Do you get any warnings about CAM timeouts, etc. when these probe? A verbose > > > > > dmesg might be nice to look at if possible. > > > > > > > > OK, I have set up a machine for testing. In my other mail > > > > I was wrong saying that the pass devices appear when using > > > > the problematic kernel... > > > > > > > > Here are the dmesgs: > > > > > > > > - dmesg_bad is the original kernel as of Friday > > > > - dmesg_ok is the patched kernel (see above) as of Friday > > > > - dmesg.diff is the diff between both > > > > > > > > If you want me to try something just tell me... > > > > > > Hmmm, what if you make SCSI_DELAY larger? Also, can you let it fail the > > > mount and drop into ddb and then get 'ps' output? > > > > As soon as I include the debugger into the kernel the problem > > is gone. I have double-checked it two times now: With debugger > > the drives are detected, without debugger mostly (but not always) > > not. > > > > I currently have it running in an endless rebooting loop hoping, > > that it fails eventually... > > Hummm. This seems like it is a timing related race. :( Success! Sometimes at night it finally panic'ed even with the debugger in the kernel. Here is the output of 'ps' and some other commands I remembered (no idea if any of these make sense in this context :-)). It is still in this state with the serial console attached so just tell me what to type ;-). KDB: enter: manual escape to debugger [thread pid 1 tid 100001 ] Stopped at kdb_enter_why+0x3b: xorl %eax,%eax db> ps pid ppid pgrp uid state wmesg wchan cmd 35 0 0 0 RL [softdepflush] 34 0 0 0 RL [syncer] 33 0 0 0 RL [vnlru] 32 0 0 0 RL [bufdaemon] 31 0 0 0 RL [pagezero] 30 0 0 0 RL [idlepoll] 29 0 0 0 RL [vmdaemon] 28 0 0 0 RL [pagedaemon] 27 0 0 0 WL [irq1: atkbd0] 26 0 0 0 WL [swi0: uart uart] 25 0 0 0 SL - 0xc182a63c [fdc0] 24 0 0 0 SL idle 0xc1829600 [aic_recovery0] 23 0 0 0 WL [irq11: ahc0] 22 0 0 0 SL idle 0xc1829600 [aic_recovery0] 21 0 0 0 WL [irq10: fxp0] 20 0 0 0 WL [irq9: acpi0 intsmb0] 19 0 0 0 SL - 0xc181b800 [kqueue taskq] 18 0 0 0 WL [swi6: task queue] 17 0 0 0 WL [swi6: Giant taskq] --More-- 9 0 0 0 RL [thread taskq] 16 0 0 0 WL [swi5: Fast task queue] 15 0 0 0 WL [swi2: cambio] 8 0 0 0 SL ccb_scan 0xc0766714 [xpt_thrd] 7 0 0 0 SL - 0xc181bd80 [acpi_task_2] 6 0 0 0 SL - 0xc181bd80 [acpi_task_1] 5 0 0 0 SL - 0xc181bd80 [acpi_task_0] 14 0 0 0 SL - 0xc077be54 [yarrow] 4 0 0 0 SL - 0xc077942c [g_down] 3 0 0 0 SL - 0xc0779428 [g_up] 2 0 0 0 SL - 0xc0779420 [g_event] 13 0 0 0 WL [swi3: vm] 12 0 0 0 LL *Giant 0xc1821dc0 [swi4: clock] 11 0 0 0 WL [swi1: net] 10 0 0 0 RL [idle] 1 0 0 0 RL CPU 0 [swapper] 0 0 0 0 SLs sched 0xc07794c0 [swapper] db> show threads 100035 (0xc1a474c0) fork_trampoline() at fork_trampoline 100034 (0xc19a8000) fork_trampoline() at fork_trampoline 100033 (0xc19a8260) fork_trampoline() at fork_trampoline 100032 (0xc19a84c0) fork_trampoline() at fork_trampoline 100031 (0xc19a8720) fork_trampoline() at fork_trampoline 100030 (0xc19a8980) fork_trampoline() at fork_trampoline 100029 (0xc19a8be0) fork_trampoline() at fork_trampoline 100028 (0xc19a9000) fork_trampoline() at fork_trampoline 100027 (0xc19a9260) fork_trampoline() at fork_trampoline 100026 (0xc19a94c0) fork_trampoline() at fork_trampoline 100025 (0xc19a9720) sched_switch(c19a9720,0,1,7a3b3f3c,11,...) at sched_switch+0xa0 100024 (0xc1855720) sched_switch(c1855720,0,1,2419c5c9,11,...) at sched_switch+0xa0 100023 (0xc1855980) sched_switch(c1855980,0,1,b2704d4a,11,...) at sched_switch+0xa0 100022 (0xc1855be0) sched_switch(c1855be0,0,1,2419b12b,11,...) at sched_switch+0xa0 100021 (0xc18ad000) fork_trampoline() at fork_trampoline 100020 (0xc18ad260) fork_trampoline() at fork_trampoline 100019 (0xc18ad4c0) sched_switch(c18ad4c0,0,1,241f3621,11,...) at sched_switch+0xa0 100018 (0xc18ad720) fork_trampoline() at fork_trampoline 100017 (0xc18ad980) fork_trampoline() at fork_trampoline 100016 (0xc18adbe0) sched_switch(c18adbe0,0,4,b27f7ade,11,...) at sched_switch+0xa0 --More-- 100015 (0xc183e260) fork_trampoline() at fork_trampoline 100014 (0xc183e4c0) sched_switch(c183e4c0,0,1,b270879a,11,...) at sched_switch+0xa0 100013 (0xc183e720) sched_switch(c183e720,0,1,24199731,11,...) at sched_switch+0xa0 100012 (0xc183e980) sched_switch(c183e980,0,1,241f0bf7,11,...) at sched_switch+0xa0 100011 (0xc183ebe0) sched_switch(c183ebe0,0,1,241ef695,11,...) at sched_switch+0xa0 100010 (0xc1855000) sched_switch(c1855000,0,1,241ee335,11,...) at sched_switch+0xa0 100009 (0xc1855260) sched_switch(c1855260,0,1,b01ec712,11,...) at sched_switch+0xa0 100008 (0xc18554c0) sched_switch(c18554c0,0,1,241960e3,11,...) at sched_switch+0xa0 100007 (0xc183d000) sched_switch(c183d000,0,1,241943af,11,...) at sched_switch+0xa0 100006 (0xc183d260) sched_switch(c183d260,0,1,b01ecf55,11,...) at sched_switch+0xa0 100005 (0xc183d4c0) fork_trampoline() at fork_trampoline 100004 (0xc183d720) sched_switch(c183d720,0,1,b357cafa,11,...) at sched_switch+0xa0 100003 (0xc183d980) fork_trampoline() at fork_trampoline 100002 (0xc183dbe0) sched_switch(c183dbe0,0,6,b2703e6d,11,...) at sched_switch+0xa0 100001 (0xc183e000) kdb_enter_why(c06feb01,c0708b8f,ffffffff,c17e7b6c,c06bf6f1,...) at kdb_enter_why+0x3b 100000 (0xc07797a0) sched_switch(c07797a0,0,1,b28c7b89,11,...) at sched_switch+0xa0 db> show thread Thread 100001 at 0xc183e000: proc (pid 1): 0xc183c000 flags: 0x10005 pflags: 0 state: RUNNING (CPU 0) priority: 52 db> show geom class: FD (0xc0758720) geom: fd0 (0xc19e9880), rank=1 provider: fd0 (0xc19e9800), access=r0w0e0 consumer: 0xc19e4280 (fd0), access=r0w0e0 class: DEV (0xc073bca0) geom: fd0 (0xc19e9680), rank=2 consumer: 0xc19e4280 (fd0), access=r0w0e0 class: PART (0xc073c4a0) class: VFS (0xc073c3a0) class: MBR (0xc073c320) class: MBREXT (0xc073c2c0) class: BSD (0xc073bbc0) class: MD (0xc0737400) class: SWAP (0xc0754e20) class: DISK (0xc073bda0) db> trace Tracing pid 1 tid 100001 td 0xc183e000 kdb_enter_why(c06feb01,c0708b8f,ffffffff,c17e7b6c,c06bf6f1,...) at kdb_enter_why+0x3b scgetc(c07866e0,1,c07790c4,c07825e0,c17e7bd4,...) at scgetc+0x47d sc_cngetc(c0739ea0,0,c17e7ba0,c059568a,c17e7bc0,...) at sc_cngetc+0xe1 cncheckc(c17e7bc0,c05ddd55,0,0,c17e7c53,...) at cncheckc+0x58 cngetc(0,0,c17e7c53,c17e7bd4,c1a411b0,...) at cngetc+0x1a gets(c17e7bd4,80,1,0,0,...) at gets+0x25 vfs_mountroot_ask(c1a411b0,c0709785,c0715a97,1,c05c3910,...) at vfs_mountroot_ask+0x72 vfs_mountroot(0,0,0,0,0,...) at vfs_mountroot+0x39c start_init(0,c17e7d38,0,0,0,...) at start_init+0x3c fork_exit(c0504f70,0,c17e7d38) at fork_exit+0x94 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc17e7d70, ebp = 0 --- db> show proc 8 Process 8 (xpt_thrd) at 0xc183c2dc: state: NORMAL uid: 0 gids: 0 parent: pid 0 at 0xc07794c0 ABI: null threads: 1 100013 D ccb_scan 0xc0766714 [xpt_thrd] db> show proc 23 Process 23 (irq11: ahc0) at 0xc1996894: state: NORMAL uid: 0 gids: 0 parent: pid 0 at 0xc07794c0 ABI: null threads: 1 100023 I [irq11: ahc0] Thanks, -Andre From owner-svn-src-stable-7@FreeBSD.ORG Wed Apr 20 11:17:21 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99804106564A; Wed, 20 Apr 2011 11:17:21 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 87D3E8FC0C; Wed, 20 Apr 2011 11:17:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3KBHLFM045926; Wed, 20 Apr 2011 11:17:21 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KBHLek045924; Wed, 20 Apr 2011 11:17:21 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201104201117.p3KBHLek045924@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 20 Apr 2011 11:17:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220884 - stable/7/sys/boot/forth X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2011 11:17:21 -0000 Author: pluknet Date: Wed Apr 20 11:17:21 2011 New Revision: 220884 URL: http://svn.freebsd.org/changeset/base/220884 Log: MFC r220594: Remove the now defunct kern.ipc.nmbufs tunable. PR: kern/132497 (part) Modified: stable/7/sys/boot/forth/loader.conf Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/boot/forth/loader.conf ============================================================================== --- stable/7/sys/boot/forth/loader.conf Wed Apr 20 11:15:17 2011 (r220883) +++ stable/7/sys/boot/forth/loader.conf Wed Apr 20 11:17:21 2011 (r220884) @@ -105,7 +105,6 @@ module_path="/boot/modules" # Set the mo #kern.cam.scsi_delay="2000" # Delay (in ms) before probing SCSI #kern.ipc.maxsockets="" # Set the maximum number of sockets avaliable #kern.ipc.nmbclusters="" # Set the number of mbuf clusters -#kern.ipc.nmbufs="" # Set the maximum number of mbufs #kern.ipc.nsfbufs="" # Set the number of sendfile(2) bufs #net.inet.tcp.tcbhashsize="" # Set the value of TCBHASHSIZE #vfs.root.mountfrom="" # Specify root partition in a way the From owner-svn-src-stable-7@FreeBSD.ORG Wed Apr 20 21:00:25 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 497331065677; Wed, 20 Apr 2011 21:00:25 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 358288FC1A; Wed, 20 Apr 2011 21:00:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3KL0PQW066215; Wed, 20 Apr 2011 21:00:25 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KL0PBx066213; Wed, 20 Apr 2011 21:00:25 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201104202100.p3KL0PBx066213@svn.freebsd.org> From: Colin Percival Date: Wed, 20 Apr 2011 21:00:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220901 - releng/7.3 releng/7.3/sys/conf releng/7.3/usr.sbin/mountd releng/7.4 releng/7.4/sys/conf releng/7.4/usr.sbin/mountd releng/8.1 releng/8.1/sys/conf releng/8.1/usr.sbin/mountd r... X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2011 21:00:25 -0000 Author: cperciva Date: Wed Apr 20 21:00:24 2011 New Revision: 220901 URL: http://svn.freebsd.org/changeset/base/220901 Log: Fix CIDR parsing bug in mountd ACLs. Approved by: so (cperciva) Security: FreeBSD-SA-11:01.mountd Modified: stable/7/usr.sbin/mountd/mountd.c Changes in other areas also in this revision: Modified: releng/7.3/UPDATING releng/7.3/sys/conf/newvers.sh releng/7.3/usr.sbin/mountd/mountd.c releng/7.4/UPDATING releng/7.4/sys/conf/newvers.sh releng/7.4/usr.sbin/mountd/mountd.c releng/8.1/UPDATING releng/8.1/sys/conf/newvers.sh releng/8.1/usr.sbin/mountd/mountd.c releng/8.2/UPDATING releng/8.2/sys/conf/newvers.sh releng/8.2/usr.sbin/mountd/mountd.c stable/8/usr.sbin/mountd/mountd.c Modified: stable/7/usr.sbin/mountd/mountd.c ============================================================================== --- stable/7/usr.sbin/mountd/mountd.c Wed Apr 20 19:41:08 2011 (r220900) +++ stable/7/usr.sbin/mountd/mountd.c Wed Apr 20 21:00:24 2011 (r220901) @@ -2676,7 +2676,7 @@ makemask(struct sockaddr_storage *ssp, i for (i = 0; i < len; i++) { bits = (bitlen > CHAR_BIT) ? CHAR_BIT : bitlen; - *p++ = (1 << bits) - 1; + *p++ = (u_char)~0 << (CHAR_BIT - bits); bitlen -= bits; } return 0; From owner-svn-src-stable-7@FreeBSD.ORG Thu Apr 21 09:03:48 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F18E91065675; Thu, 21 Apr 2011 09:03:48 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF7238FC12; Thu, 21 Apr 2011 09:03:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3L93mSd088505; Thu, 21 Apr 2011 09:03:48 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3L93m92088502; Thu, 21 Apr 2011 09:03:48 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201104210903.p3L93m92088502@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 21 Apr 2011 09:03:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220918 - in stable/7/sys: kern sys X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2011 09:03:49 -0000 Author: pluknet Date: Thu Apr 21 09:03:48 2011 New Revision: 220918 URL: http://svn.freebsd.org/changeset/base/220918 Log: MFC r220621: Remove stale M_ZOMBIE malloc type. Modified: stable/7/sys/kern/kern_exit.c stable/7/sys/sys/proc.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/kern_exit.c ============================================================================== --- stable/7/sys/kern/kern_exit.c Thu Apr 21 09:02:19 2011 (r220917) +++ stable/7/sys/kern/kern_exit.c Thu Apr 21 09:03:48 2011 (r220918) @@ -94,9 +94,6 @@ SDT_PROVIDER_DECLARE(proc); SDT_PROBE_DEFINE(proc, kernel, , exit); SDT_PROBE_ARGTYPE(proc, kernel, , exit, 0, "int"); -/* Required to be non-static for SysVR4 emulator */ -MALLOC_DEFINE(M_ZOMBIE, "zombie", "zombie proc status"); - /* Hook for NFS teardown procedure. */ void (*nlminfo_release_p)(struct proc *p); Modified: stable/7/sys/sys/proc.h ============================================================================== --- stable/7/sys/sys/proc.h Thu Apr 21 09:02:19 2011 (r220917) +++ stable/7/sys/sys/proc.h Thu Apr 21 09:03:48 2011 (r220918) @@ -680,7 +680,6 @@ MALLOC_DECLARE(M_PARGS); MALLOC_DECLARE(M_PGRP); MALLOC_DECLARE(M_SESSION); MALLOC_DECLARE(M_SUBPROC); -MALLOC_DECLARE(M_ZOMBIE); #endif #define FOREACH_PROC_IN_SYSTEM(p) \ From owner-svn-src-stable-7@FreeBSD.ORG Fri Apr 22 00:32:17 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D3141065679; Fri, 22 Apr 2011 00:32:17 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39B9E8FC1C; Fri, 22 Apr 2011 00:32:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3M0WH6k018992; Fri, 22 Apr 2011 00:32:17 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3M0WH3M018990; Fri, 22 Apr 2011 00:32:17 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201104220032.p3M0WH3M018990@svn.freebsd.org> From: Xin LI Date: Fri, 22 Apr 2011 00:32:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220934 - stable/7/lib/libutil X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2011 00:32:17 -0000 Author: delphij Date: Fri Apr 22 00:32:16 2011 New Revision: 220934 URL: http://svn.freebsd.org/changeset/base/220934 Log: MFC r219939: humanize_number(3) multiply the input number by 100, which could cause an integer overflow when the input is very large (for example, 100 Pi would become about 10 Ei which exceeded signed int64_t). Solve this issue by splitting the division into two parts and avoid the multiplication. PR: bin/146205 Reviewed by: arundel Modified: stable/7/lib/libutil/humanize_number.c Directory Properties: stable/7/lib/libutil/ (props changed) Modified: stable/7/lib/libutil/humanize_number.c ============================================================================== --- stable/7/lib/libutil/humanize_number.c Fri Apr 22 00:31:07 2011 (r220933) +++ stable/7/lib/libutil/humanize_number.c Fri Apr 22 00:32:16 2011 (r220934) @@ -50,11 +50,11 @@ __FBSDID("$FreeBSD$"); #include int -humanize_number(char *buf, size_t len, int64_t bytes, +humanize_number(char *buf, size_t len, int64_t quotient, const char *suffix, int scale, int flags) { const char *prefixes, *sep; - int b, i, r, maxscale, s1, s2, sign; + int i, r, remainder, maxscale, s1, s2, sign; int64_t divisor, max; size_t baselen; @@ -62,6 +62,8 @@ humanize_number(char *buf, size_t len, i assert(suffix != NULL); assert(scale >= 0); + remainder = 0; + if (flags & HN_DIVISOR_1000) { /* SI for decimal multiplies */ divisor = 1000; @@ -93,13 +95,12 @@ humanize_number(char *buf, size_t len, i if (len > 0) buf[0] = '\0'; - if (bytes < 0) { + if (quotient < 0) { sign = -1; - bytes *= -100; + quotient = -quotient; baselen = 3; /* sign, digit, prefix */ } else { sign = 1; - bytes *= 100; baselen = 2; /* digit, prefix */ } if (flags & HN_NOSPACE) @@ -116,7 +117,7 @@ humanize_number(char *buf, size_t len, i if (scale & (HN_AUTOSCALE | HN_GETSCALE)) { /* See if there is additional columns can be used. */ - for (max = 100, i = len - baselen; i-- > 0;) + for (max = 1, i = len - baselen; i-- > 0;) max *= 10; /* @@ -124,30 +125,37 @@ humanize_number(char *buf, size_t len, i * If there will be an overflow by the rounding below, * divide once more. */ - for (i = 0; bytes >= max - 50 && i < maxscale; i++) - bytes /= divisor; + for (i = 0; + (quotient >= max || (quotient == max - 1 && remainder >= 950)) && + i < maxscale; i++) { + remainder = quotient % divisor; + quotient /= divisor; + } if (scale & HN_GETSCALE) return (i); - } else - for (i = 0; i < scale && i < maxscale; i++) - bytes /= divisor; + } else { + for (i = 0; i < scale && i < maxscale; i++) { + remainder = quotient % divisor; + quotient /= divisor; + } + } /* If a value <= 9.9 after rounding and ... */ - if (bytes < 995 && i > 0 && flags & HN_DECIMAL) { + if (quotient <= 9 && remainder < 950 && i > 0 && flags & HN_DECIMAL) { /* baselen + \0 + .N */ if (len < baselen + 1 + 2) return (-1); - b = ((int)bytes + 5) / 10; - s1 = b / 10; - s2 = b % 10; + s1 = (int)quotient + ((remainder + 50) / 1000); + s2 = ((remainder + 50) / 100) % 10; r = snprintf(buf, len, "%d%s%d%s%s%s", sign * s1, localeconv()->decimal_point, s2, sep, SCALE2PREFIX(i), suffix); } else r = snprintf(buf, len, "%" PRId64 "%s%s%s", - sign * ((bytes + 50) / 100), + sign * (quotient + (remainder + 50) / 1000), sep, SCALE2PREFIX(i), suffix); return (r); } + From owner-svn-src-stable-7@FreeBSD.ORG Fri Apr 22 14:42:42 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73B57106564A; Fri, 22 Apr 2011 14:42:42 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6399C8FC1C; Fri, 22 Apr 2011 14:42:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3MEggwa046606; Fri, 22 Apr 2011 14:42:42 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3MEggj0046604; Fri, 22 Apr 2011 14:42:42 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201104221442.p3MEggj0046604@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 22 Apr 2011 14:42:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220953 - stable/7/lib/libc/sys X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2011 14:42:42 -0000 Author: jilles Date: Fri Apr 22 14:42:42 2011 New Revision: 220953 URL: http://svn.freebsd.org/changeset/base/220953 Log: MFC r220646: getfh(2): Add xrefs for fhopen(2), open(2), stat(2). Modified: stable/7/lib/libc/sys/getfh.2 Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/sys/getfh.2 ============================================================================== --- stable/7/lib/libc/sys/getfh.2 Fri Apr 22 14:41:29 2011 (r220952) +++ stable/7/lib/libc/sys/getfh.2 Fri Apr 22 14:42:42 2011 (r220953) @@ -28,7 +28,7 @@ .\" @(#)getfh.2 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd April 6, 2004 +.Dd April 14, 2011 .Dt GETFH 2 .Os .Sh NAME @@ -104,6 +104,10 @@ An .Tn I/O error occurred while reading from or writing to the file system. .El +.Sh SEE ALSO +.Xr fhopen 2 , +.Xr open 2 , +.Xr stat 2 .Sh HISTORY The .Fn getfh From owner-svn-src-stable-7@FreeBSD.ORG Fri Apr 22 23:45:34 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30F4A1065675; Fri, 22 Apr 2011 23:45:34 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DF628FC0A; Fri, 22 Apr 2011 23:45:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3MNjYWP062810; Fri, 22 Apr 2011 23:45:34 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3MNjYrd062808; Fri, 22 Apr 2011 23:45:34 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201104222345.p3MNjYrd062808@svn.freebsd.org> From: Doug Barton Date: Fri, 22 Apr 2011 23:45:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220959 - stable/7/etc X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2011 23:45:34 -0000 Author: dougb Date: Fri Apr 22 23:45:33 2011 New Revision: 220959 URL: http://svn.freebsd.org/changeset/base/220959 Log: MFC r220760: The change in r206686 to allow the stop argument to work for a service that is running even though not _enable'd had an annoying side effect. If the service was already started at boot time by another means when the related script came around again in rcorder it would start again, regardless of _enable, because there was a valid pid. [1] So, split the test into 2 parts, one for (!rcvar && !stop), and one for (stop && !valid_pid). This preserves the behavior from r206686 while preventing the undesired side effect. Modified: stable/7/etc/rc.subr Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/rc.subr ============================================================================== --- stable/7/etc/rc.subr Fri Apr 22 23:44:25 2011 (r220958) +++ stable/7/etc/rc.subr Fri Apr 22 23:45:33 2011 (r220959) @@ -623,7 +623,8 @@ run_rc_command() # checkyesno ${rcvar} # and return if that failed # - if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a -z "${rc_pid}" ]; then + if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a "$rc_arg" != "stop" ] || + [ -n "${rcvar}" -a "$rc_arg" = "stop" -a -z "${rc_pid}" ]; then if ! checkyesno ${rcvar}; then if [ -n "${rc_quiet}" ]; then return 0 From owner-svn-src-stable-7@FreeBSD.ORG Sat Apr 23 02:10:38 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6D0B1065675; Sat, 23 Apr 2011 02:10:38 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4C818FC18; Sat, 23 Apr 2011 02:10:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3N2Acth067159; Sat, 23 Apr 2011 02:10:38 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3N2Acpf067157; Sat, 23 Apr 2011 02:10:38 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201104230210.p3N2Acpf067157@svn.freebsd.org> From: Doug Barton Date: Sat, 23 Apr 2011 02:10:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220961 - stable/7/etc X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Apr 2011 02:10:38 -0000 Author: dougb Date: Sat Apr 23 02:10:38 2011 New Revision: 220961 URL: http://svn.freebsd.org/changeset/base/220961 Log: MFC r201038: Update the comments about files ending in .sh Modified: stable/7/etc/rc.subr Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/rc.subr ============================================================================== --- stable/7/etc/rc.subr Sat Apr 23 02:03:18 2011 (r220960) +++ stable/7/etc/rc.subr Sat Apr 23 02:10:38 2011 (r220961) @@ -876,10 +876,11 @@ _run_rc_killcmd() # # run_rc_script file arg # Start the script `file' with `arg', and correctly handle the -# return value from the script. If `file' ends with `.sh', it's -# sourced into the current environment. If `file' appears to be -# a backup or scratch file, ignore it. Otherwise if it's -# executable run as a child process. +# return value from the script. +# If `file' ends with `.sh', it's sourced into the current environment +# when $rc_fast_and_loose is set, otherwise it is run as a child process. +# If `file' appears to be a backup or scratch file, ignore it. +# Otherwise if it is executable run as a child process. # run_rc_script() {