misc/148674: fix graphics/mupdf

2010-07-16 Thread Dominic Fandrey

>Number: 148674
>Category:   misc
>Synopsis:   fix graphics/mupdf
>Confidential:   no
>Severity:   non-critical
>Priority:   low
>Responsible:freebsd-bugs
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 16 07:20:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Dominic Fandrey
>Release:RELENG_8
>Organization:
private
>Environment:
FreeBSD mobileKamikaze.norad 8.1-PRERELEASE FreeBSD 8.1-PRERELEASE #0: Fri Jul  
9 19:00:24 CEST 2010 
r...@mobilekamikaze.norad:/usr/obj/HP6510b-8/amd64/usr/src/sys/HP6510b-8  amd64
>Description:
/ is a really bad separator for file name substitution.
>How-To-Repeat:
# make -VCC
env CCACHE_PREFIX=/usr/local/bin/distcc /usr/local/bin/ccache cc
# make
===>  License accepted by the user
===>  Extracting for mupdf-0.6,1
=> MD5 Checksum OK for mupdf-0.6-source.tar.gz.
=> SHA256 Checksum OK for mupdf-0.6-source.tar.gz.
===>  Patching for mupdf-0.6,1
sed: 1: "s/CC = .*/CC = env CCAC ...": bad flag in substitute command: 'u'
*** Error code 1

Stop in /usr/ports/graphics/mupdf.
>Fix:


Patch attached with submission follows:

diff -Nur mupdf.orig/Makefile mupdf/Makefile
--- mupdf.orig/Makefile 2010-07-16 08:29:41.0 +0200
+++ mupdf/Makefile  2010-07-16 08:49:12.0 +0200
@@ -43,7 +43,7 @@
 post-patch:
@${REINPLACE_CMD} 's/LAGS :=/LAGS +=/g' ${WRKSRC}/Makerules
@${REINPLACE_CMD} 's/Linux/FreeBSD/g' ${WRKSRC}/Makerules
-   @${REINPLACE_CMD} 's/CC = .*/CC = ${CC}/g' ${WRKSRC}/Makerules
+   @${REINPLACE_CMD} 's|CC = .*|CC = ${CC}|g' ${WRKSRC}/Makerules
@${REINPLACE_CMD} 's#\(PDF.*_EXE=.*DIR./\)#\1mu_#g' ${WRKSRC}/Makefile
 
 .include 


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


kern/148676: kernel panic lockmgr: locking against myself

2010-07-16 Thread Markus Wild

>Number: 148676
>Category:   kern
>Synopsis:   kernel panic lockmgr: locking against myself
>Confidential:   no
>Severity:   serious
>Priority:   medium
>Responsible:freebsd-bugs
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 16 07:40:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Markus Wild
>Release:7.3-STABLE
>Organization:
VirtualTec Solutions AG
>Environment:
FreeBSD zrhcz-ux1.virtualtec.ch 7.3-STABLE FreeBSD 7.3-STABLE #5: Thu Jul 15 
19:04:12 CEST 2010 
m...@zrhcz-ux1.virtualtec.ch:/usr/obj/usr/src/sys/VTMASTER  amd64

>Description:
This system keeps crashing about every 4 months or so with the following 
panic:

lockmgr: locking against myself

I've exchanged SCHED_ULE yesterday for SCHED_4BSD, but this time the system
crashed after only about 6h. This system runs 20 jails with apache httpds and
mysql servers in each jail, and my gut feeling is the crash is somehow related
to increased disk activity. With SCHED_ULE, after a panic there are usually
soft update inconsistencies that need to be fixed with fsck -y. After the crash
this morning with SCHED_4BSD, the filesystem didn't have any soft update issues.

I had updated the system with cvs right before compiling and installing the 
4BSD scheduler kernel, so kernel sources are current (for RELENG_7).

Unfortunately, most of dmesg output is not usable because it's cluttered with
ipfw logs. Here's some output of kgdb with those ipfw lines omitted:

Unread portion of the kernel message buffer:
panic: lockmgr: locking against myself
cpuid = 1
Uptime: 6h20m11s
Physical memory: 16374 MB
Dumping 3213 MB:

..

Reading symbols from /boot/kernel/accf_data.ko...Reading symbols from 
/boot/kernel/accf_data.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/accf_data.ko
Reading symbols from /boot/kernel/accf_http.ko...Reading symbols from 
/boot/kernel/accf_http.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/accf_http.ko
Reading symbols from /boot/kernel/coretemp.ko...Reading symbols from 
/boot/kernel/coretemp.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/coretemp.ko
#0  doadump () at pcpu.h:196
196 pcpu.h: No such file or directory.
in pcpu.h

(kgdb) where
#0  doadump () at pcpu.h:196
#1  0x0004 in ?? ()
#2  0x802e5b29 in boot (howto=260) at 
/usr/src/sys/kern/kern_shutdown.c:418
#3  0x802e5f32 in panic (fmt=0x104 ) at 
/usr/src/sys/kern/kern_shutdown.c:574
#4  0x802d1bda in _lockmgr (lkp=0xff0144b00c68, flags=0, 
interlkp=Variable "interlkp" is not available.
) at /usr/src/sys/kern/kern_lock.c:366
#5  0x80548b55 in VOP_LOCK1_APV (vop=0x806eb360, 
a=0xff81d47e6760) at vnode_if.c:1618
#6  0x803776d5 in _vn_lock (vp=0xff0144b00bd0, flags=4098, 
td=0xff02fe701ab0, file=0x80586b82 "/usr/src/sys/kern/vfs_subr.c", 
line=2062) at vnode_if.h:851
#7  0x8036a3cf in vget (vp=0xff0144b00bd0, flags=4098, 
td=0xff02fe701ab0) at /usr/src/sys/kern/vfs_subr.c:2062
#8  0x804ed7c7 in vm_object_reference (object=Variable "object" is not 
available.
) at /usr/src/sys/vm/vm_object.c:411
#9  0x802bce64 in kern_execve (td=0xff02fe701ab0, 
args=0xff81d47e6b00, mac_p=Variable "mac_p" is not available.
) at /usr/src/sys/kern/kern_exec.c:404
#10 0x802bdf07 in execve (td=0xff02fe701ab0, uap=Variable "uap" is 
not available.
) at /usr/src/sys/kern/kern_exec.c:207
#11 0x80518277 in syscall (frame=0xff81d47e6c80) at 
/usr/src/sys/amd64/amd64/trap.c:920
#12 0x80500a5b in Xfast_syscall () at 
/usr/src/sys/amd64/amd64/exception.S:339
#13 0x0008008b748c in ?? ()
Previous frame inner to this frame (corrupt stack?)


The system runs mostly a GENERIC kernel with the following additions:

options HZ=1000
options MSGBUF_SIZE=40960

options IPFIREWALL  #firewall
options IPFIREWALL_VERBOSE  #enable logging to syslogd(8)
options IPFIREWALL_DEFAULT_TO_ACCEPT#allow everything by default
options IPFIREWALL_FORWARD  #packet destination changes
options DUMMYNET
options IPDIVERT

options CONSPEED=115200 # speed for serial console  

options ROUTETABLES=10


Since this system is in production, and already busy, I can't really turn on
any witness options that will slow it down considerably. I'll revert to 
SCHED_ULE tonight, but would consider upgrading to FreeBSD8 if there's a really
good chance that this will solve the issue.



>How-To-Repeat:
I can't provide a recipe. This is a live server with live traffic and thus
all kinds of interactions between applications. From what I determined, the
main backup cycle was completed before the crash, so at least the additional
disk i/o of that cycle didn't directly contribute to the crash.
>Fix

Re: ports/148674: fix graphics/mupdf

2010-07-16 Thread linimon
Synopsis: fix graphics/mupdf

Responsible-Changed-From-To: freebsd-bugs->freebsd-ports-bugs
Responsible-Changed-By: linimon
Responsible-Changed-When: Fri Jul 16 10:14:59 UTC 2010
Responsible-Changed-Why: 
ports PR.

http://www.freebsd.org/cgi/query-pr.cgi?pr=148674
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: kern/148655: [zfs] Booting from a degraded raidz no longer works in 8-STABLE [regression]

2010-07-16 Thread linimon
Synopsis: [zfs] Booting from a degraded raidz no longer works in 8-STABLE 
[regression]

Responsible-Changed-From-To: freebsd-bugs->freebsd-fs
Responsible-Changed-By: linimon
Responsible-Changed-When: Fri Jul 16 11:17:49 UTC 2010
Responsible-Changed-Why: 
Over to maintainer(s).

http://www.freebsd.org/cgi/query-pr.cgi?pr=148655
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: kern/144824: [boot] [patch] boot problem on USB (root partition mounting)

2010-07-16 Thread Daniel Hartmeier
The following reply was made to PR kern/144824; it has been noted by GNATS.

From: Daniel Hartmeier 
To: bug-follo...@freebsd.org
Cc: gbl...@linagora.com
Subject: Re: kern/144824: [boot] [patch] boot problem on USB (root partition 
mounting)
Date: Fri, 16 Jul 2010 12:56:05 +0200

 You have to move the ma initialization inside the retry loop,
 because kernel_mount() frees it, otherwise I get a kernel panic.
 
 With that changed, the patch solves the issue with an Intel
 S5000PAL board booting from USB, where da0 attaches slightly
 too late. Possibly related to the RMM2 (remote management
 module), which attaches multiple (virtual) CD-ROM drives to
 USB, which produce CAM/SCSI status errors.
 
 Daniel
 
 --- vfs_mount.c 30 Jan 2010 12:11:21 -  1.312.2.3
 +++ vfs_mount.c 16 Jul 2010 10:38:46 -
 @@ -1798,6 +1798,8 @@
 int error;
 charpatt[32];
 charerrmsg[255];
 +   charnbtry;
 +   int rootmounttrymax;
 
 vfsname = NULL;
 path= NULL;
 @@ -1805,6 +1807,8 @@
 ma  = NULL;
 error   = EINVAL;
 bzero(errmsg, sizeof(errmsg));
 +   nbtry   = 0;
 +   rootmounttrymax = 3;
 
 if (mountfrom == NULL)
 return (error); /* don't complain */
 @@ -1821,13 +1825,23 @@
 if (path[0] == '\0')
 strcpy(path, ROOTNAME);
 
 -   ma = mount_arg(ma, "fstype", vfsname, -1);
 -   ma = mount_arg(ma, "fspath", "/", -1);
 -   ma = mount_arg(ma, "from", path, -1);
 -   ma = mount_arg(ma, "errmsg", errmsg, sizeof(errmsg));
 -   ma = mount_arg(ma, "ro", NULL, 0);
 -   ma = parse_mountroot_options(ma, options);
 -   error = kernel_mount(ma, MNT_ROOTFS);
 +   while (1) {
 +   ma = NULL;
 +   ma = mount_arg(ma, "fstype", vfsname, -1);
 +   ma = mount_arg(ma, "fspath", "/", -1);
 +   ma = mount_arg(ma, "from", path, -1);
 +   ma = mount_arg(ma, "errmsg", errmsg, sizeof(errmsg));
 +   ma = mount_arg(ma, "ro", NULL, 0);
 +   ma = parse_mountroot_options(ma, options);
 +   error = kernel_mount(ma, MNT_ROOTFS);
 +   if (nbtry < rootmounttrymax && error != 0) {
 +   printf("Mount failed, retrying mount root from %s\n",
 +   mountfrom);
 +   tsleep(&rootmounttrymax, PZERO | PDROP, "mount", hz);
 +   nbtry++;
 +   } else
 +   break;
 +   }
 
 if (error == 0) {
 /*
 
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


bin/148686: ftp-proxy -T tag patch for FBSD

2010-07-16 Thread Mario Lobo

>Number: 148686
>Category:   bin
>Synopsis:   ftp-proxy -T tag patch for FBSD
>Confidential:   no
>Severity:   non-critical
>Priority:   low
>Responsible:freebsd-bugs
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 16 16:10:07 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Mario Lobo
>Release:8.1-PRERELEASE
>Organization:
>Environment:
FreeBSD Papi 8.1-PRERELEASE FreeBSD 8.1-PRERELEASE #0: Sat Jul  3 13:06:10 UTC 
2010 r...@papi:/usr/src/sys/amd64/compile/LOBO  amd64
>Description:
I felt sorry the -T tag option was present in Linux and not on FBSD because I 
got to a situation where it would really be useful for me. So I decided to 
stuff my hands on the grease can.

What this does is to give the option to put a tag instead of a queue, to the 
dynamic rules that ftp-proxy creates on the fly. The option to put a queue is 
nice but it confines the rule to THAT queue only, and you cannot create queues 
with the same name on different interfaces. You could specify 2 interfaces on 
the same altq rule, but then again, both interfaces will be confined to the 
same queue tunings.

The -T "tag" option  however, besides tagging the packets for the rule, takes 
the "quick" keyword out of it, so rule processing can continue, to later find 
a rule that has the keyword "tagged tag", and be sent to any queue you want. A 
really welcomed flexibility.

The lines bellow were taken during an ftp session to ftp.openbsd.com from a 
LAN client station.


# Server [20:14:03]
[~]>pfctl -vv -sA
  ftp-proxy
  ftp-proxy/15780.1

# Server [20:15:01]
[~]> pfctl -vv -a ftp-proxy/15780.1 -sr
@0 pass in log inet proto tcp from 172.16.3.145 to 129.128.5.191 port = 61076 
flags S/SA keep state (max 1) tag ftp_proxy rtable 0
  [ Evaluations: 4 Packets: 0 Bytes: 0   States: 0 
]
  [ Inserted: uid 62 pid 15780 ]
@1 pass out log inet proto tcp from 189.12.120.67 to 129.128.5.191 port = 
61076 flags S/SA keep state (max 1) tag ftp_proxy rtable 0
  [ Evaluations: 4 Packets: 0 Bytes: 0   States: 0 
]
  [ Inserted: uid 62 pid 15780 ]

# Server [20:15:11]
[~]>pfctl -vv -sA
  ftp-proxy
  ftp-proxy/15780.1

# Server [20:15:16]
[~]> pfctl -vv -a ftp-proxy/15780.1 -sn
@0 nat inet proto tcp from 172.16.3.145 to 129.128.5.191 port = 61076 rtable 0 
-> 189.12.120.67
  [ Evaluations: 1 Packets: 0 Bytes: 0   States: 0 
]
  [ Inserted: uid 62 pid 15780 ]
@0 rdr inet proto tcp from 172.16.3.145 to 129.128.5.191 port = 51973 rtable 0 
-> 129.128.5.191 port 61076
  [ Evaluations: 6 Packets: 8 Bytes: 1485States: 0 
]
  [ Inserted: uid 62 pid 15780 ]

# Server [20:15:23]
[~]> pfctl -vv -a ftp-proxy/15780.1 -sn
pfctl: DIOCGETRULES: Invalid argument

# Server [20:16:12]
[~]>pfctl -vv -sA
  ftp-proxy


The nat, rdr and pass rules are correctly created and tagged.
Observe the times to see that ftp-proxy removes the rule really fast.

To apply the patch, copy it to 
/usr/src/contrib/pf/ftp-proxy/
then,
cd /usr/src/usr.sbin/ftp-proxy/ftp-proxy

make [clean]
make install
>How-To-Repeat:
NA
>Fix:


Patch attached with submission follows:

--- ftp-proxy.c.orig2009-08-03 08:13:06.0 +
+++ ftp-proxy.c 2010-07-13 12:56:07.0 +
@@ -116,7 +116,7 @@
 
 struct sockaddr_storage fixed_server_ss, fixed_proxy_ss;
 char *fixed_server, *fixed_server_port, *fixed_proxy, *listen_ip, *listen_port,
-*qname;
+*qname, *tname;
 int anonymous_only, daemonize, id_count, ipv6_mode, loglevel, max_sessions,
 rfc_mode, session_count, timeout, verbose;
 extern char *__progname;
@@ -601,6 +601,7 @@
loglevel= LOG_NOTICE;
max_sessions= 100;
qname   = NULL;
+   tname   = NULL;
rfc_mode= 0;
timeout = 24 * 3600;
verbose = 0;
@@ -609,7 +610,7 @@
id_count= 1;
session_count   = 0;
 
-   while ((ch = getopt(argc, argv, "6Aa:b:D:dm:P:p:q:R:rt:v")) != -1) {
+   while ((ch = getopt(argc, argv, "6Aa:b:D:dm:P:p:q:R:rt:T:v")) != -1) {
switch (ch) {
case '6':
ipv6_mode = 1;
@@ -647,8 +648,9 @@
if (strlen(optarg) >= PF_QNAME_SIZE)
errx(1, "queuename too long");
qname = optarg;
+   tname = NULL;
break;
-   case 'R':
+   case 'R':
fixed_server = optarg;
break;
case 'r':
@@ -659,6 +661,12 @@
if (errstr)
errx(1, "timeout %s", errstr);
break;
+   case 'T':
+  

Re: conf/148656: rc.firewall(8): {oip} and {iip} variables in rc.firewall script undefined in FreeBSD 7.2 and 8.0

2010-07-16 Thread linimon
Old Synopsis: {oip} and {iip} variables in rc.firewall script undefined in 
FreeBSD 7.2 and 8.0
New Synopsis: rc.firewall(8): {oip} and {iip} variables in rc.firewall script 
undefined in FreeBSD 7.2 and 8.0

Responsible-Changed-From-To: freebsd-bugs->freebsd-rc
Responsible-Changed-By: linimon
Responsible-Changed-When: Fri Jul 16 16:21:32 UTC 2010
Responsible-Changed-Why: 
Over to maintainer(s).

http://www.freebsd.org/cgi/query-pr.cgi?pr=148656
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: bin/148661: [patch] pc-sysinstall(8) updates to support ftp install of FreeBSD

2010-07-16 Thread linimon
Old Synopsis: pc-sysinstall updates to support ftp install of FreeBSD
New Synopsis: [patch] pc-sysinstall(8) updates to support ftp install of FreeBSD

Responsible-Changed-From-To: freebsd-bugs->imp
Responsible-Changed-By: linimon
Responsible-Changed-When: Fri Jul 16 16:22:26 UTC 2010
Responsible-Changed-Why: 
Sounds like imp territory.

http://www.freebsd.org/cgi/query-pr.cgi?pr=148661
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: bin/148606: [patch] pc-sysinstall(8) updates to support installation of packages

2010-07-16 Thread linimon
Old Synopsis: pc-sysinstall updates to support installation of packages
New Synopsis: [patch] pc-sysinstall(8) updates to support installation of 
packages

Responsible-Changed-From-To: freebsd-bugs->imp
Responsible-Changed-By: linimon
Responsible-Changed-When: Fri Jul 16 16:23:50 UTC 2010
Responsible-Changed-Why: 
Over to maintainer.

http://www.freebsd.org/cgi/query-pr.cgi?pr=148606
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: kern/145064: commit references a PR

2010-07-16 Thread dfilter service
The following reply was made to PR kern/145064; it has been noted by GNATS.

From: dfil...@freebsd.org (dfilter service)
To: bug-follo...@freebsd.org
Cc:  
Subject: Re: kern/145064: commit references a PR
Date: Fri, 16 Jul 2010 17:27:57 + (UTC)

 Author: mav
 Date: Fri Jul 16 17:27:43 2010
 New Revision: 210168
 URL: http://svn.freebsd.org/changeset/base/210168
 
 Log:
   Make legacy ATA emulation detection more strict. This should fix false
   positive legacy detection and attach failure/panic for Marvell 88SX6141
   controller and potentially some others.
   
   PR:  kern/145064
 
 Modified:
   head/sys/dev/ata/ata-pci.c
 
 Modified: head/sys/dev/ata/ata-pci.c
 ==
 --- head/sys/dev/ata/ata-pci.c Fri Jul 16 17:01:36 2010(r210167)
 +++ head/sys/dev/ata/ata-pci.c Fri Jul 16 17:27:43 2010(r210168)
 @@ -769,7 +769,8 @@ DRIVER_MODULE(ata, atapci, ata_pcichanne
  int
  ata_legacy(device_t dev)
  {
 -return (((pci_read_config(dev, PCIR_PROGIF, 
1)&PCIP_STORAGE_IDE_MASTERDEV)&&
 +return (((pci_read_config(dev, PCIR_SUBCLASS, 1) == PCIS_STORAGE_IDE) &&
 +   (pci_read_config(dev, PCIR_PROGIF, 1)&PCIP_STORAGE_IDE_MASTERDEV)&&
 ((pci_read_config(dev, PCIR_PROGIF, 1) &
   (PCIP_STORAGE_IDE_MODEPRIM | PCIP_STORAGE_IDE_MODESEC)) !=
  (PCIP_STORAGE_IDE_MODEPRIM | PCIP_STORAGE_IDE_MODESEC))) ||
 ___
 svn-src-...@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
 
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


bin/148687: [geom] gpart prints invalid partition number when destroying

2010-07-16 Thread Bruce Cran

>Number: 148687
>Category:   bin
>Synopsis:   [geom] gpart prints invalid partition number when destroying
>Confidential:   no
>Severity:   non-critical
>Priority:   medium
>Responsible:freebsd-bugs
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 16 17:40:07 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Bruce Cran
>Release:FreeBSD 9.0-HEAD-20100715-JPSNAP amd64
>Organization:
>Environment:
System: FreeBSD bsdbook.nessbank 9.0-HEAD-20100715-JPSNAP FreeBSD 
9.0-HEAD-20100715-JPSNAP #0: Thu Jul 15 06:37:19 UTC 2010 
r...@build-amd64-fbsd.allbsd.org:/usr/obj/usr/src/sys/GENERIC amd64



>Description:
After using the feature which allows the creation of slices and 
partitions to be undone within gpart, deleting a freebsd partition results in 
geom printing a large negative number instead of "1". 
>How-To-Repeat:
gpart create -s mbr -f x da0
gpart add -t freebsd -f x da0
gpart create -s bsd -f x da0s1
gpart destroy da0s1
gpart delete -i 1 da0

A log of the output is attached.
>Fix:



--- gpart.log begins here ---
bsdbook# dmesg | grep da0
da0 at umass-sim0 bus 0 scbus1 target 0 lun 0
da0:  Removable Direct Access SCSI-2 device 
da0: 40.000MB/s transfers
da0: 1967MB (4030463 512 byte sectors: 255H 63S/T 250C)
bsdbook# gpart show da0
gpart: No such geom: da0.
bsdbook# gpart create -f x -s mbr da0
da0 created
bsdbook# gpart add -f x -t freebsd da0
da0s1 added
bsdbook# gpart create -f x -s bsd da0s1
da0s1 created
bsdbook# gpart destroy da0s1
da0s1 destroyed
bsdbook# gpart delete -i 1 da0
da0s-559038242 deleted
--- gpart.log ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:
 >uncommitted slice/partition.
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: bin/148687: [geom] gpart prints invalid partition number when destroying

2010-07-16 Thread brucec
Synopsis: [geom] gpart prints invalid partition number when destroying

State-Changed-From-To: open->open 
State-Changed-By: brucec
State-Changed-When: Fri Jul 16 18:14:58 UTC 2010
State-Changed-Why: 
This actually appears to be kernel memory corruption: soon afterwards 
I found that gpart was crashing with a segmentation fault and I then 
got a panic, apparently within bcopy called from the ipi nmi handler.
After rebooting I found that the first few sectors of the disk had 
been overwritten with the contents of random files from my main disk.
found that contents from some scripts were on da0.

http://www.freebsd.org/cgi/query-pr.cgi?pr=148687
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


kern/148688: [geom][panic] panic when committing undone partitioning with BSD slice

2010-07-16 Thread Bruce Cran

>Number: 148688
>Category:   kern
>Synopsis:   [geom][panic] panic when committing undone partitioning with 
>BSD slice
>Confidential:   no
>Severity:   serious
>Priority:   medium
>Responsible:freebsd-bugs
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 16 18:20:06 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Bruce Cran
>Release:FreeBSD 9.0-HEAD-20100715-JPSNAP amd64
>Organization:
>Environment:
System: FreeBSD bsdbook.nessbank 9.0-HEAD-20100715-JPSNAP FreeBSD 
9.0-HEAD-20100715-JPSNAP #0: Thu Jul 15 06:37:19 UTC 2010 
r...@build-amd64-fbsd.allbsd.org:/usr/obj/usr/src/sys/GENERIC amd64



>Description:
When attemting to commit a partition table which has been created with a BSD 
slice and then undone, the kernel panics in g_part_ctl_commit.
>How-To-Repeat:
gpart create -s mbr -f x da0
gpart add -t freebsd -f x da0
gpart create -s bsd -f x da0s1
gpart undo da0
gpart commit da0
>Fix:




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


kern/148689: [ipfw2] antispoof wrongly triggers on link local IPv6 addresses

2010-07-16 Thread Alexander

>Number: 148689
>Category:   kern
>Synopsis:   [ipfw2] antispoof wrongly triggers on link local IPv6 addresses
>Confidential:   no
>Severity:   non-critical
>Priority:   low
>Responsible:freebsd-bugs
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 16 18:20:06 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Alexander
>Release:8.1-PRERELEASE
>Organization:
Wittig
>Environment:
FreeBSD hotzenplotz.wittig.name 8.1-PRERELEASE FreeBSD 8.1-PRERELEASE #2: Tue 
Jul 13 11:09:46 CEST 2010 
r...@hotzenplotz.wittig.name:/usr/obj/usr/src/sys/ALEX  amd64
>Description:
It seems as if the IPFW2 option "antispoof" is not properly implemented for 
IPv6 packages.
The rule "deny ip from any to any not antispoof in" will block all IPv6 traffic 
to locally set up IPv6 addresses on interfaces. However, traffic coming in to 
the very same IPv6 address from outside (i.e. a different machine) passes 
without problem.

This was already described in this thread back in 2006 along with a workaround:
http://www.mail-archive.com/freebsd-questi...@freebsd.org/msg127596.html

This issue should probably be mentioned in ipfw(8) if it is not fixed.
>How-To-Repeat:
Note: Addresses are anonymized.

1) Set up an interface with public IPv6 address as well as automatic link local 
address. E.g.
inet6 fe80::xx:xx:xx:de48%re0 prefixlen 64 scopeid 0x1 
inet6 2a02:180:xx:xx:xx:xx:de48:0 prefixlen 64

2) Set up following IPFW2 rules
ipfw flush
ipfw add deny ip from any to any not antispoof in
ipfw add allow ip from any to any

3) Set up some service on IPv6, e.g. HTTP:
netstat -f inet6 -a
Active Internet connections (including servers)
Proto Recv-Q Send-Q  Local Address  Foreign Address   (state)
..
tcp46  0  0 *.http *.*LISTEN
..

4) Try to connect to local http server via public IPv6 address (blocked, times 
out)
wget 'http://[2a02:xx:xx:xx:xx:xx:de48:0]'
--2010-07-16 20:04:39--  http://[2a02:xx:xx:xx:xx:xx:de48:0]/
Verbindungsaufbau zu 2a02:xx:xx:xx:xx:xx:de48:0:80... fehlgeschlagen: Operation 
timed out.
Erneuter Versuch.
..

>Fix:
If not a solution, at least a workaround is possible by restricting antispoof 
rules to IPv4 where they work just fine:

1) Set up modified IPFW2 rules:
ipfw flush
ipfw add deny ip4 from any to any not antispoof in
ipfw add allow ip from any to any

2) Try to connect to local http server via public IPv6 address (works as 
expected)
wget 'http://[2a02:xx:xx:xx:xx:xx:de48:0]'
--2010-07-16 19:52:45--  http://[2a02:xx:xx:xx:xx:xx:de48:0]/
Verbindungsaufbau zu 2a02:xx:xx:xx:xx:xx:de48:0:80... verbunden.
HTTP Anforderung gesendet, warte auf Antwort... 200 OK
Länge: nicht spezifiziert [text/html]
In »»index.html«« speichern.

[ <=>   ] 3.128   --.-K/s   in 0s  

2010-07-16 19:52:45 (22,2 MB/s) - »»index.html«« gespeichert [3128]



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


Re: kern /148687: [geom] gpart prints invalid partition number when destroying

2010-07-16 Thread brucec
Synopsis: [geom] gpart prints invalid partition number when destroying

Responsible-Changed-From-To: freebsd-bugs->freebsd-geom
Responsible-Changed-By: brucec
Responsible-Changed-When: Fri Jul 16 18:20:10 UTC 2010
Responsible-Changed-Why: 
Geom PR.

http://www.freebsd.org/cgi/query-pr.cgi?pr=148687
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: kern/148688: [geom][panic] panic when committing undone partitioning with BSD slice

2010-07-16 Thread linimon
Synopsis: [geom][panic] panic when committing undone partitioning with BSD slice

Responsible-Changed-From-To: freebsd-bugs->freebsd-geom
Responsible-Changed-By: linimon
Responsible-Changed-When: Fri Jul 16 19:29:25 UTC 2010
Responsible-Changed-Why: 
Over to maintainer(s).

http://www.freebsd.org/cgi/query-pr.cgi?pr=148688
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: kern/148689: [ipfw] antispoof wrongly triggers on link local IPv6 addresses

2010-07-16 Thread linimon
Old Synopsis: [ipfw2] antispoof wrongly triggers on link local IPv6 addresses
New Synopsis: [ipfw] antispoof wrongly triggers on link local IPv6 addresses

Responsible-Changed-From-To: freebsd-bugs->freebsd-ipfw
Responsible-Changed-By: linimon
Responsible-Changed-When: Fri Jul 16 19:29:51 UTC 2010
Responsible-Changed-Why: 
Over to maintainer(s).

http://www.freebsd.org/cgi/query-pr.cgi?pr=148689
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


kern/148698: Panic at boot due to integer overflow computing top->cg_mask in smp_topo_none() when mp_ncpus == 32

2010-07-16 Thread Joe Landers

>Number: 148698
>Category:   kern
>Synopsis:   Panic at boot due to integer overflow computing top->cg_mask 
>in smp_topo_none() when mp_ncpus == 32
>Confidential:   no
>Severity:   critical
>Priority:   high
>Responsible:freebsd-bugs
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 16 23:10:07 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Joe Landers
>Release:FreeBSD 8.0 (amd64)
>Organization:
VMware, Inc
>Environment:
Any system with 32 CPUs.
>Description:
Attempting to boot FreeBSD 8.0 (amd64) on machine with 32 CPUs causes the 
kernel to panic. panic() calls boot() and boot() calls thread_lock(curthread), 
however curthread->td_lock is NULL so the system starts taking repeated page 
faults and printing to the screen.

FreeBSD/SMP: Multiprocessor System Detected: 32 CPUs
FreeBSD/SMP: 32 package(s) x 1 core(s)
 cpu0 (BSP): APIC ID: 0
 cpu1 (AP): APIC ID:  1
 cpu2 (AP): APIC ID:  2
 cpu3 (AP): APIC ID:  3
 cpu4 (AP): APIC ID:  4
 cpu5 (AP): APIC ID:  5
 cpu6 (AP): APIC ID:  6
 cpu7 (AP): APIC ID:  7
 cpu8 (AP): APIC ID:  8
 cpu9 (AP): APIC ID:  9
 cpu10 (AP): APIC ID: 10
 cpu11 (AP): APIC ID: 11
 cpu12 (AP): APIC ID: 12
 cpu13 (AP): APIC ID: 13
 cpu14 (AP): APIC ID: 14
 cpu15 (AP): APIC ID: 15
 cpu16 (AP): APIC ID: 16
 cpu17 (AP): APIC ID: 17
 cpu18 (AP): APIC ID: 18
 cpu19 (AP): APIC ID: 19
 cpu20 (AP): APIC ID: 20
 cpu21 (AP): APIC ID: 21
 cpu22 (AP): APIC ID: 22
 cpu23 (AP): APIC ID: 23
 cpu24 (AP): APIC ID: 24
 cpu25 (AP): APIC ID: 25
 cpu26 (AP): APIC ID: 26
 cpu27 (AP): APIC ID: 27
 cpu28 (AP): APIC ID: 28
 cpu29 (AP): APIC ID: 29
 cpu30 (AP): APIC ID: 30
 cpu31 (AP): APIC ID: 31
panic: Built bad topology at 0x8081fc20.  CPU mask 0x0 != 0x
cpuid = 0
kernel trap 12 with interrupts disabled


Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address   = 0x18
fault code  = supervisor read data, page not present
instruction pointer = 0x20:0x80322e28
stack pointer   = 0x28:0x809b0b20
frame pointer   = 0x28:0x809b0b60
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags= resume, IOPL = 0
current process = 0 (swapper)
trap number = 12
panic: page fault
cpuid = 0
kernel trap 12 with interrupts disabled

Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address   = 0x18
fault code  = supervisor read data, page not present
instruction pointer = 0x20:0x80322e28
stack pointer   = 0x28:0x809b0790
frame pointer   = 0x28:0x809b07d0
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags= resume, IOPL = 0
current process = 0 (swapper)
trap number = 12
panic: page fault
cpuid = 0
kernel trap 12 with interrupts disabled


Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address   = 0x18
fault code  = supervisor read data, page not present
instruction pointer = 0x20:0x80322e28
stack pointer   = 0x28:0x809b0400
frame pointer   = 0x28:0x809b0440
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags= resume, IOPL = 0
current process = 0 (swapper)
trap number = 12
panic: page fault
cpuid = 0
kernel trap 12 with interrupts disabled

..  ...

When the hardware has 32 CPUs, the computation of top->cg_mask in 
smp_topo_none() overflows and becomes zero. This causes smp_topo() to call 
panic() with the message about the topology mismatch.

struct cpu_group *
smp_topo_none(void)
{
 struct cpu_group *top;

 top = &group[0];
 top->cg_parent = NULL;
 top->cg_child = NULL;
 top->cg_mask = (1 << mp_ncpus) - 1; 
 top->cg_count = mp_ncpus;
 top->cg_children = 0;
 top->cg_level = CG_SHARE_NONE;
 top->cg_flags = 0;
 
 return (top);
}

0x805b9743 : shl %cl,%eax 
0x805b9745 : mov %cl,6632169(%rip) # 
0x80c0ca34 
0x805b974b : movb $0x0,6632165(%rip) # 
0x80c0ca37 
0x805b9752 : sub $0x1,%eax
0x805b9755 : mov %eax,6632149(%rip) # 
0x80c0ca30 
0x805b975b : leaveq
0x805b975c : mov $0x80c0ca20,%rax
0x805b9763 : retq

static int
start_all_aps(void)
{
..
  all_cpus |= (1 << cpu); /* record AP in CPU map */
 }
..
}

struct cpu_group *
smp_topo(void)
{
 /*
  * Verify the returned topology.
  */
 if (top->cg_count != mp_ncpus)
  panic("Built bad topology at %p. CPU count %d != %d",
  top, top->cg_count, mp_ncpus);
 if (top->cg_mask != all_cpus) <<

Re: kern/148698: [panic] Panic at boot due to integer overflow computing top->cg_mask in smp_topo_none() when mp_ncpus == 32

2010-07-16 Thread linimon
Old Synopsis: Panic at boot due to integer overflow computing top->cg_mask in 
smp_topo_none() when mp_ncpus == 32
New Synopsis: [panic] Panic at boot due to integer overflow computing 
top->cg_mask in smp_topo_none() when mp_ncpus == 32

State-Changed-From-To: open->suspended
State-Changed-By: linimon
State-Changed-When: Fri Jul 16 23:23:00 UTC 2010
State-Changed-Why: 
I think the answer right now is "unfortunately, you're right".

IIRC there are people working on code to handle > 32 CPUs, but
it's not ready to commit yet.

But take this with a grain of salt -- I'm wearing a bugmeister hat
as I type this, not a source developer hat.

http://www.freebsd.org/cgi/query-pr.cgi?pr=148698
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


kern/148702: IO DATA USB-RSAQ5 support on FreeBSD-8.0

2010-07-16 Thread Kouichi Hirabayashi

>Number: 148702
>Category:   kern
>Synopsis:   IO DATA USB-RSAQ5 support on FreeBSD-8.0
>Confidential:   no
>Severity:   non-critical
>Priority:   low
>Responsible:freebsd-bugs
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 17 03:50:06 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Kouichi Hirabayashi
>Release:8.0
>Organization:
Mogami wire & Cable Corp.
>Environment:
>Description:
Possible kernel patch for IO DATA USB-RSAQ5 on FreeBSD-8.0.
>How-To-Repeat:

>Fix:


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


Re: usb/148702: [request] IO DATA USB-RSAQ5 support on FreeBSD-8.0

2010-07-16 Thread linimon
Old Synopsis: IO DATA USB-RSAQ5 support on FreeBSD-8.0
New Synopsis: [request] IO DATA USB-RSAQ5 support on FreeBSD-8.0

State-Changed-From-To: open->suspended
State-Changed-By: linimon
State-Changed-When: Sat Jul 17 05:47:41 UTC 2010
State-Changed-Why: 
Mark suspended awaiting someone to generate some patches.


Responsible-Changed-From-To: freebsd-bugs->freebsd-usb
Responsible-Changed-By: linimon
Responsible-Changed-When: Sat Jul 17 05:47:41 UTC 2010
Responsible-Changed-Why: 
Reclassify.

http://www.freebsd.org/cgi/query-pr.cgi?pr=148702
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"