amd64/179996: lib32/libcrypto.so.6 causes apache SSL to crash due to wrong opensslconf.h

2013-06-26 Thread John Wehle

Number: 179996
Category:   amd64
Synopsis:   lib32/libcrypto.so.6 causes apache SSL to crash due to wrong 
opensslconf.h
Confidential:   no
Severity:   non-critical
Priority:   low
Responsible:freebsd-amd64
State:  open
Quarter:
Keywords:   
Date-Required:
Class:  sw-bug
Submitter-Id:   current-users
Arrival-Date:   Wed Jun 26 06:30:00 UTC 2013
Closed-Date:
Last-Modified:
Originator: John Wehle
Release:FreeBSD 9.1-STABLE 252047M
Organization:
Environment:
FreeBSD carmen.FEITH.COM 9.1-STABLE FreeBSD 9.1-STABLE #1 r235103:252047M: Fri 
Jun 21 23:31:53 EDT 2013 
r...@wagner.feith.com:/usr/obj/amd64.amd64/usr/src/sys/CUSTOM amd64
Description:
32bit httpd-2.2.24 built with SSL crashes during startup when run on a
freebsd amd64 machine recently updated by building 9.1-STABLE amd64 on
a freebsd i386 machine.

Stack trace shows:

#0  0x282a3c50 in bn_div_words () from /usr/lib32/libcrypto.so.6
#1  0x2829cf7d in BN_div (dv=0x0, rm=0x289432e4, num=0x289432e4, 
divisor=0x289432f8, ctx=0x289370a0)
at 
/usr/src/secure/lib/libcrypto/../../../crypto/openssl/crypto/bn/bn_div.c:345

The 32bit httpd-2.2.24 works fine on the i386 build machine.  Rebuilding
the 32bit httpd-2.2.24 without SSL avoids the problem on the amd64 machine.

Rebuilding lib32/libcrypto by doing:

  rm -rf /usr/obj/amd64.amd64/lib32 /usr/obj/amd64.amd64/usr/src/lib32
  make TARGET=amd64 TARGET_ARCH=amd64 build32

shows some warning messages:

  crypto/openssl/crypto/bn/bn_div.c: In function 'BN_div':
  crypto/openssl/crypto/bn/bn_div.c:304: warning: integer constant is too large 
for 'long' type
  crypto/openssl/crypto/bn/bn_div.c:304: warning: large integer implicitly 
truncated to unsigned type
  crypto/openssl/crypto/bn/bn_div.c:361: warning: right shift count = width of 
type
  crypto/openssl/crypto/bn/bn_div.c:362: warning: right shift count = width of 
type
  ...

How-To-Repeat:
Build httpd-2.2.24 on a 9.1-STABLE i386 machine.
Install it on a 9.1-STABLE amd64 machine.
Configure SSL.
Attempt to start httpd.
Notice immediate crash.

httpd source code was configured using:

./configure --enable-modules=ssl proxy rewrite --disable-ipv6
Fix:
Rebuilding lib32/libcrypto by doing:

  rm -rf /usr/obj/amd64.amd64/lib32 /usr/obj/amd64.amd64/usr/src/lib32
  mkdir -p /usr/obj/amd64.amd64/usr/src/lib32/usr/include/openssl
  cp /usr/src/secure/lib/libcrypto/opensslconf-i386.h \
/usr/obj/amd64.amd64/usr/src/lib32/usr/include/openssl/opensslconf.h
  make TARGET=amd64 TARGET_ARCH=amd64 build32

fixes the warning messages and allows the 32bit httpd-2.2.24 built with
SSL to work fine on the amd64 machine.

It appears that the lib32/libcrypto build is picking up the amd64
opensslconf.h by default.



Release-Note:
Audit-Trail:
Unformatted:
___
freebsd-amd64@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to freebsd-amd64-unsubscr...@freebsd.org


Re: amd64/179376: xhci ehci irq storm

2013-06-26 Thread Michal Sviba
The following reply was made to PR amd64/179376; it has been noted by GNATS.

From: Michal Sviba mic...@sviba.cz
To: bug-follo...@freebsd.org, mic...@sviba.cz
Cc: Konstantin Belousov kostik...@gmail.com
Subject: Re: amd64/179376: xhci ehci irq storm
Date: Wed, 26 Jun 2013 10:32:46 +0200

 I tried remove xhci support from kernel. But without success.
 Maybe the problem isn't in xhci.
 
 ms10~#uptime
 10:13AM  up 12:46, 1 user, load averages: 0.20, 0.34, 0.32
 
 
  ms10~#vmstat -i
 interrupt  total   rate
 irq1: atkbd0  18  0
 irq16: ehci0  9855800830 214485
 irq23: ehci1   91988  2
 cpu0:timer  51247683   1115
 irq264: em0  1095725 23
 irq265: hdac0 74  0
 irq266: ahci0 261277  5
 cpu2:timer   1566559 34
 cpu3:timer   1232863 26
 cpu1:timer   1234862 26
 Total 9912531879 215719
___
freebsd-amd64@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to freebsd-amd64-unsubscr...@freebsd.org


amd64/180018: System panics when bsnmpd is started

2013-06-26 Thread Alan Amesbury

Number: 180018
Category:   amd64
Synopsis:   System panics when bsnmpd is started
Confidential:   no
Severity:   critical
Priority:   medium
Responsible:freebsd-amd64
State:  open
Quarter:
Keywords:   
Date-Required:
Class:  sw-bug
Submitter-Id:   current-users
Arrival-Date:   Thu Jun 27 01:00:00 UTC 2013
Closed-Date:
Last-Modified:
Originator: Alan Amesbury
Release:FreeBSD 9.1-RELEASE-p4 amd64
Organization:
Environment:
System: FreeBSD tumbrel.oitsec.umn.edu 9.1-RELEASE-p4 FreeBSD 9.1-RELEASE-p4 
#3: Wed Jun 26 15:47:13 CDT 2013 
r...@tumbrel.oitsec.umn.edu:/usr/obj/usr/src/sys/OITSEC-9 amd64

Hardware is a Dell PowerEdge R620 with current BIOS (1.6.0).  OS was
just updated to 9.1-RELEASE-p4.


Description:
Starting bsnmpd on this system triggers a panic.  The hardware is thought to
be OK, but dedicated testing of RAM, etc., isn't possible at the moment.
I've captured two backtraces and, to my admittedly novice eye, they appear
identical.  Output to follow shortly.


How-To-Repeat:
Starting bsnmpd reliably triggers this panic.

Fix:
Release-Note:
Audit-Trail:
Unformatted:
___
freebsd-amd64@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to freebsd-amd64-unsubscr...@freebsd.org


Re: amd64/180018: System panics when bsnmpd is started

2013-06-26 Thread Alan Amesbury
The following reply was made to PR amd64/180018; it has been noted by GNATS.

From: Alan Amesbury amesb...@oitsec.umn.edu
To: bug-follo...@freebsd.org
Cc:  
Subject: Re: amd64/180018: System panics when bsnmpd is started
Date: Wed, 26 Jun 2013 20:07:57 -0500

 This is a multi-part message in MIME format.
 --040001040900060009020400
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 
 Two example console output and crash dumps are attached.  The first is
 what happens when bsnmpd is enabled and the system is allowed to boot.
 The second is the result of starting bsnmpd after the system had been up
 for a while (about 30 minutes).
 
 
 -- 
 Alan Amesbury
 University Information Security
 University of Minnesota
 
 --040001040900060009020400
 Content-Type: text/plain; charset=us-ascii;
  name=crash_1_console.text
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename=crash_1_console.text
 
 
 Starting bsnmpd.
 
 Wed Jun 26 18:45:52 CDT 2013
 
 
 Fatal trap 12: page fault while in kernel mode
 cpuid = 30; apic id = 2e
 fault virtual address   = 0xbff001019
 fault code  = supervisor write data, page not present
 instruction pointer = 0x20:0x8067ad6b
 stack pointer   = 0x28:0xff88c41a9720
 frame pointer   = 0x28:0xff88c41a9800
 code segment= base 0x0, limit 0xf, type 0x1b
 = DPL 0, pres 1, long 1, def32 0, gran 1
 processor eflags= interrupt enabled, resume, IOPL = 0
 current process = 60934 (bsnmpd)
 trap number = 12
 panic: page fault
 cpuid = 27
 KDB: stack backtrace:
 #0 0x806747d8 at kdb_backtrace+0x68
 #1 0x8063f2ab at panic+0x21b
 #2 0x808c475d at trap_fatal+0x39d
 #3 0x808c48a0 at trap_pfault+0x120
 #4 0x808c4f99 at trap+0x3d9
 #5 0x808af70f at calltrap+0x8
 #6 0x80649057 at sysctl_root+0x1e7
 #7 0x80649337 at userland_sysctl+0x1f7
 #8 0x80649773 at sys___sysctl+0x93
 #9 0x808c3d6d at amd64_syscall+0x2fd
 #10 0x808af9f7 at Xfast_syscall+0xf7
 Uptime: 44s
 Dumping 1538 out of 32708 MB:..2%..11%..21%..31%..41%..51%..61%..71%..81%..91%
 Dump complete
 Automatic reboot in 15 seconds - press a key on the console to abort
 Rebooting...
 cpu_reset: Restarting BSP
 cpu_reset_proxy: Stopped CPU 27
 
 --040001040900060009020400
 Content-Type: text/plain; charset=us-ascii;
  name=crash_1_kgdb.text
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename=crash_1_kgdb.text
 
 GNU gdb 6.1.1 [FreeBSD]
 Copyright 2004 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you are
 welcome to change it and/or distribute copies of it under certain conditions.
 Type show copying to see the conditions.
 There is absolutely no warranty for GDB.  Type show warranty for details.
 This GDB was configured as amd64-marcel-freebsd...
 
 Unread portion of the kernel message buffer:
 118Starting bsnmpd.
 118
 118Wed Jun 26 18:45:52 CDT 2013
 
 
 Fatal trap 12: page fault while in kernel mode
 cpuid = 30; apic id = 2e
 fault virtual address   = 0xbff001019
 fault code  = supervisor write data, page not present
 instruction pointer = 0x20:0x8067ad6b
 stack pointer   = 0x28:0xff88c41a9720
 frame pointer   = 0x28:0xff88c41a9800
 code segment= base 0x0, limit 0xf, type 0x1b
 = DPL 0, pres 1, long 1, def32 0, gran 1
 processor eflags= interrupt enabled, resume, IOPL = 0
 current process = 60934 (bsnmpd)
 trap number = 12
 panic: page fault
 cpuid = 27
 KDB: stack backtrace:
 #0 0x806747d8 at kdb_backtrace+0x68
 #1 0x8063f2ab at panic+0x21b
 #2 0x808c475d at trap_fatal+0x39d
 #3 0x808c48a0 at trap_pfault+0x120
 #4 0x808c4f99 at trap+0x3d9
 #5 0x808af70f at calltrap+0x8
 #6 0x80649057 at sysctl_root+0x1e7
 #7 0x80649337 at userland_sysctl+0x1f7
 #8 0x80649773 at sys___sysctl+0x93
 #9 0x808c3d6d at amd64_syscall+0x2fd
 #10 0x808af9f7 at Xfast_syscall+0xf7
 Uptime: 44s
 Dumping 1538 out of 32708 MB:..2%..11%..21%..31%..41%..51%..61%..71%..81%..91%
 
 Reading symbols from /boot/kernel/aesni.ko...done.
 Loaded symbols for /boot/kernel/aesni.ko
 Reading symbols from /boot/kernel/cryptodev.ko...done.
 Loaded symbols for /boot/kernel/cryptodev.ko
 Reading symbols from /boot/kernel/zfs.ko...done.
 Loaded symbols for /boot/kernel/zfs.ko
 Reading symbols from /boot/kernel/opensolaris.ko...done.
 Loaded symbols for /boot/kernel/opensolaris.ko
 #0  doadump (textdump=Variable textdump is not available.
 ) at pcpu.h:224
 224 __asm(movq %%gs:0,%0 : =r (td));
 (kgdb) list *0x8067ad6b
 0x8067ad6b is in sysctl_rman (atomic.h:160).
 155 static __inline int
 

[head tinderbox] failure on amd64/amd64

2013-06-26 Thread FreeBSD Tinderbox
TB --- 2013-06-27 01:20:18 - tinderbox 2.10 running on freebsd-current.sentex.ca
TB --- 2013-06-27 01:20:18 - FreeBSD freebsd-current.sentex.ca 8.3-PRERELEASE 
FreeBSD 8.3-PRERELEASE #0: Mon Mar 26 13:54:12 EDT 2012 
d...@freebsd-current.sentex.ca:/usr/obj/usr/src/sys/GENERIC  amd64
TB --- 2013-06-27 01:20:18 - starting HEAD tinderbox run for amd64/amd64
TB --- 2013-06-27 01:20:18 - cleaning the object tree
TB --- 2013-06-27 01:20:18 - /usr/local/bin/svn stat /src
TB --- 2013-06-27 01:20:22 - At svn revision 252287
TB --- 2013-06-27 01:20:23 - building world
TB --- 2013-06-27 01:20:23 - CROSS_BUILD_TESTING=YES
TB --- 2013-06-27 01:20:23 - MAKEOBJDIRPREFIX=/obj
TB --- 2013-06-27 01:20:23 - PATH=/usr/bin:/usr/sbin:/bin:/sbin
TB --- 2013-06-27 01:20:23 - SRCCONF=/dev/null
TB --- 2013-06-27 01:20:23 - TARGET=amd64
TB --- 2013-06-27 01:20:23 - TARGET_ARCH=amd64
TB --- 2013-06-27 01:20:23 - TZ=UTC
TB --- 2013-06-27 01:20:23 - __MAKE_CONF=/dev/null
TB --- 2013-06-27 01:20:23 - cd /src
TB --- 2013-06-27 01:20:23 - /usr/bin/make -B buildworld
 Building an up-to-date make(1)
 World build started on Thu Jun 27 01:20:30 UTC 2013
 Rebuilding the temporary build tree
 stage 1.1: legacy release compatibility shims
 stage 1.2: bootstrap tools
 stage 2.1: cleaning up the object tree
 stage 2.2: rebuilding the object tree
 stage 2.3: build tools
 stage 3: cross tools
 stage 4.1: building includes
 stage 4.2: building libraries
 stage 4.3: make dependencies
 stage 4.4: building everything
[...]
cc  -O2 -pipe  -std=gnu99 -Qunused-arguments -fstack-protector -Wsystem-headers 
-Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign 
-Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare 
-Wno-unused-value -Wno-parentheses-equality -Wno-unused-function 
-Wno-conversion  -o nos-tun nos-tun.o 
gzip -cn /src/sbin/nos-tun/nos-tun.8  nos-tun.8.gz
=== sbin/nvmecontrol (all)
cc  -O2 -pipe  -std=gnu99 -Qunused-arguments -fstack-protector -Wsystem-headers 
-Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings 
-Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline 
-Wnested-externs -Wredundant-decls -Wold-style-definition 
-Wmissing-variable-declarations -Wno-pointer-sign -Wno-empty-body 
-Wno-string-plus-int -c /src/sbin/nvmecontrol/nvmecontrol.c
/src/sbin/nvmecontrol/nvmecontrol.c:53:3: error: no previous extern declaration 
for non-static variable 'funcs' [-Werror,-Wmissing-variable-declarations]
} funcs[] = {
  ^
1 error generated.
*** Error code 1

Stop.
make: stopped in /src/sbin/nvmecontrol
*** Error code 1

Stop.
make: stopped in /src/sbin
*** Error code 1

Stop.
make: stopped in /src
*** Error code 1

Stop.
make: stopped in /src
*** Error code 1

Stop in /src.
TB --- 2013-06-27 04:15:15 - WARNING: /usr/bin/make returned exit code  1 
TB --- 2013-06-27 04:15:15 - ERROR: failed to build world
TB --- 2013-06-27 04:15:15 - 8751.40 user 1346.94 system 10496.48 real


http://tinderbox.freebsd.org/tinderbox-head-build-HEAD-amd64-amd64.full
___
freebsd-amd64@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to freebsd-amd64-unsubscr...@freebsd.org