[Bug 192085] New: [zfs] panic on zvol resize

2014-07-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192085

Bug ID: 192085
   Summary: [zfs] panic on zvol resize
   Product: Base System
   Version: 11.0-CURRENT
  Hardware: Any
OS: Any
Status: Needs Triage
  Severity: Affects Only Me
  Priority: ---
 Component: kern
  Assignee: freebsd-bugs@FreeBSD.org
  Reporter: kris...@freebsd.org

On current r268263 with WITNESS and INVARIANTS enabled, do:

# zfs create tank/zvol
# zfs set mountpoint=none tank/zvol
# zfs create -V100G tank/zvol/disk0
# zfs set volsize=200G tank/zvol/disk0

This panics as follows:
panic: solaris assert: !rrw_held(&dp->dp_config_rwlock, RW_READER), file:
/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c,
line: 1120
cpuid = 1
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfe01217d54b0
kdb_backtrace() at kdb_backtrace+0x39/frame 0xfe01217d5560
vpanic() at vpanic+0x126/frame 0xfe01217d55a0
panic() at panic+0x43/frame 0xfe01217d5600
assfail() at assfail+0x1d/frame 0xfe01217d5610
dsl_pool_hold() at dsl_pool_hold+0x67/frame 0xfe01217d5650
dmu_objset_hold() at dmu_objset_hold+0x21/frame 0xfe01217d5690
dsl_prop_get_integer() at dsl_prop_get_integer+0x28/frame 0xfe01217d56d0
zvol_set_volsize() at zvol_set_volsize+0x126/frame 0xfe01217d5760
zfs_prop_set_special() at zfs_prop_set_special+0x2e2/frame 0xfe01217d57f0
zfs_set_prop_nvlist() at zfs_set_prop_nvlist+0x23f/frame 0xfe01217d5880
zfs_ioc_set_prop() at zfs_ioc_set_prop+0x106/frame 0xfe01217d58e0
zfsdev_ioctl() at zfsdev_ioctl+0x6ee/frame 0xfe01217d5990
devfs_ioctl_f() at devfs_ioctl_f+0xfb/frame 0xfe01217d59f0
kern_ioctl() at kern_ioctl+0x22b/frame 0xfe01217d5a50
sys_ioctl() at sys_ioctl+0x13c/frame 0xfe01217d5aa0
amd64_syscall() at amd64_syscall+0x25a/frame 0xfe01217d5bb0
Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfe01217d5bb0
--- syscall (54, FreeBSD ELF64, sys_ioctl), rip = 0x8019e89ba, rsp =
0x7fffb8c8, rbp = 0x7fffb940 ---

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
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"


[Bug 192085] [zfs] panic on zvol resize

2014-07-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192085

--- Comment #1 from Kristof Provost  ---
I've poked at this a bit more, and I think I understand the problem now.

zvol_set_volsize() takes a hold on the file system with dmu_objset_hold()
and then verifies that it's not marked as read-only.
It does this through dsl_prop_get_integer() which also tries to take a
hold on the file system with dmu_objset_hold(). That triggers the assert
in dsl_pool_hold().

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
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"


[Bug 192085] [zfs] panic on zvol resize

2014-07-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192085

--- Comment #2 from Kristof Provost  ---
The problem appear to be fixed in Illumos commit
3b2aab18808792cbd248a12f1edf139b89833c13

Essentially they've changed from using dmu_objset_hold() to
dmu_objset_own().

See:
 - https://www.illumos.org/issues/3464
 -
https://github.com/illumos/illumos-gate/commit/3b2aab18808792cbd248a12f1edf139b89833c13
 - ZoL: https://github.com/zfsonlinux/zfs/pull/2048

I included the zvol resize bits of the patch in my tree, and can now
resize zvols without panicing the machine.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
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"


[Bug 192085] [zfs] panic on zvol resize

2014-07-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192085

--- Comment #3 from Kristof Provost  ---
Created attachment 144931
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=144931&action=edit
zvol resize patch

This patch fixes the problem for me, but it might be better to import all of
3b2aab18808792cbd248a12f1edf139b89833c13 rather than just cherry-picking the
zvol bits as I've done.

(PS: Despite what Bugzilla thinks I'm not actually a committer.)

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
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"


[Bug 192092] New: [jail(8)] allow.mount.tmpfs does not kldload tmpfs.ko if not present

2014-07-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192092

Bug ID: 192092
   Summary: [jail(8)] allow.mount.tmpfs does not kldload tmpfs.ko
if not present
   Product: Base System
   Version: 10.0-RELEASE
  Hardware: Any
OS: Any
Status: Needs Triage
  Severity: Affects Many People
  Priority: ---
 Component: kern
  Assignee: freebsd-bugs@FreeBSD.org
  Reporter: jo...@a1poweruser.com

When a jail is started with parameters 
allow.mount.tmpfs
allow.mount.nullfs
allow.mount.procfs
jail(8) does not check if their kernel modules are loaded.
Jail(8) should be changed to load the kernel modules if they are not already
loaded before the jail is started.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
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"


[Bug 191318] freebsd-update(8) from 9.2p8 to 10.0: after first reboot, old ifconfig can't handle 10.x interfaces

2014-07-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191318

Kurt Jaeger  changed:

   What|Removed |Added

 Status|Needs Triage|In Discussion

--- Comment #2 from Kurt Jaeger  ---
Make a second try for a different host, this time the reboot worked and
the ifconfig binaries did not have the problem.

I'll make further tests and give feedback.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
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"


[Bug 192097] New: zpool status -x reports wrong information

2014-07-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192097

Bug ID: 192097
   Summary: zpool status -x reports wrong information
   Product: Base System
   Version: 10.0-STABLE
  Hardware: Any
OS: Any
Status: Needs Triage
  Severity: Affects Many People
  Priority: ---
 Component: kern
  Assignee: freebsd-bugs@FreeBSD.org
  Reporter: dustinw...@ebureau.com

If a user has a pool created in FreeBSD 9.2 or earlier, it's likely that the
ashift value is off. After upgrading to FreeBSD 10, zpool status correctly
reports "block size: 512B configured, 4096B native".

The problem is that when "zpool status -x" is run, it also reports the block
size message. The documentation for -x states: "Only display status for pools
that are exhibiting errors or are otherwise unavailable". While an ashift of 9
may not be ideal, it's a perfectly functional configuration and not an error.
The new behavior is wrong because it presents many lines of messages, even when
there are no degraded pools or data integrity errors.

I personally find this annoying because I routinely check hundreds of pools for
failing disks using the -x option, and it's easy to miss these errors when many
pools have ashift=9. I'm already aware that the pools need to rebuilt to avoid
that message, which is a process that will take years to complete. In the
meantime, I still need to handle disk errors without being bombarded with
redundant block size messages.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
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"


[Bug 192098] New: DEBUG_MEMGUARD and INVARIANTS duplicate "double-free" detection logic

2014-07-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192098

Bug ID: 192098
   Summary: DEBUG_MEMGUARD and INVARIANTS duplicate "double-free"
detection logic
   Product: Base System
   Version: 11.0-CURRENT
  Hardware: Any
OS: Any
Status: Needs Triage
  Severity: Affects Some People
  Priority: ---
 Component: kern
  Assignee: freebsd-bugs@FreeBSD.org
  Reporter: yaneurab...@gmail.com

The code in sys/vm/memguard.c and sys/vm/uma_dbg.c both attempt to detect
double-frees, but when I have both DEBUG_MEMGUARD and INVARIANTS compiled in
and try to run my "bad_memory" kld, a double-free trips the panic in uma_dbg.c,
not memguard.c:

memguard.c:

252 static u_long *
253 v2sizep(vm_offset_t va)
254 {
255 vm_paddr_t pa;
256 struct vm_page *p;
257
258 pa = pmap_kextract(va);
259 if (pa == 0)
260 panic("MemGuard detected double-free of %p", (void *)va);
261 p = PHYS_TO_VM_PAGE(pa);
262 KASSERT(p->wire_count != 0 && p->queue == PQ_NONE,
263 ("MEMGUARD: Expected wired page %p in vtomgfifo!", p));
264 return (&p->plinks.memguard.p);
265 }
266
267 static u_long *
268 v2sizev(vm_offset_t va)
269 {
270 vm_paddr_t pa;
271 struct vm_page *p;
272
273 pa = pmap_kextract(va);
274 if (pa == 0)
275 panic("MemGuard detected double-free of %p", (void *)va);
276 p = PHYS_TO_VM_PAGE(pa);
277 KASSERT(p->wire_count != 0 && p->queue == PQ_NONE,
278 ("MEMGUARD: Expected wired page %p in vtomgfifo!", p));
279 return (&p->plinks.memguard.v);
280 }

uma_dbg.c:

282
283 if (!BIT_ISSET(SLAB_SETSIZE, freei, &slab->us_debugfree))
284 panic("Duplicate free of %p from zone %p(%s) slab
%p(%d)\n",
285 item, zone, zone->uz_name, slab, freei);

Unread portion of the kernel message buffer:
Running callback for double_free
panic: Duplicate free of 0xf80003d1cf40 from zone 0xf800bfee4000(16)
slab 0xf80003d1cf90(244)

cpuid = 0
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfe030c759530
kdb_backtrace() at kdb_backtrace+0x39/frame 0xfe030c7595e0
vpanic() at vpanic+0x126/frame 0xfe030c759620
panic() at panic+0x43/frame 0xfe030c759680
uma_dbg_free() at uma_dbg_free+0x101/frame 0xfe030c7596b0
uma_zfree_arg() at uma_zfree_arg+0xf6/frame 0xfe030c759730
free() at free+0xad/frame 0xfe030c759760
sysctl_test_bad_memory_operation() at
sysctl_test_bad_memory_operation+0x88/frame 0xfe030c7597a0
sysctl_root_handler_locked() at sysctl_root_handler_locked+0x68/frame
0xfe030c7597e0
sysctl_root() at sysctl_root+0x18e/frame 0xfe030c759830
userland_sysctl() at userland_sysctl+0x192/frame 0xfe030c7598d0
sys___sysctl() at sys___sysctl+0x74/frame 0xfe030c759980
amd64_syscall() at amd64_syscall+0x2b3/frame 0xfe030c759ab0
Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfe030c759ab0
--- syscall (202, FreeBSD ELF64, sys___sysctl), rip = 0x80094491a, rsp =
0x7fffda18, rbp = 0x7fffda50 ---
KDB: enter: panic

Reading symbols from /boot/kernel/aio.ko.symbols...done.
Loaded symbols for /boot/kernel/aio.ko.symbols
Reading symbols from /boot/kernel/bad_memory.ko...done.
Loaded symbols for /boot/kernel/bad_memory.ko
#0  doadump (textdump=60780544) at pcpu.h:219
219 pcpu.h: No such file or directory.
in pcpu.h
(kgdb) #0  doadump (textdump=60780544) at pcpu.h:219
#1  0x80348655 in db_fncall (dummy1=,
dummy2=, dummy3=,
dummy4=) at /usr/src/sys/ddb/db_command.c:578
#2  0x8034833d in db_command (cmd_table=0x0)
at /usr/src/sys/ddb/db_command.c:449
#3  0x803480b4 in db_command_loop ()
at /usr/src/sys/ddb/db_command.c:502
#4  0x8034ab30 in db_trap (type=, code=0)
at /usr/src/sys/ddb/db_main.c:231
#5  0x8094cae9 in kdb_trap (type=3, code=0, tf=)
at /usr/src/sys/kern/subr_kdb.c:654
#6  0x80d34b42 in trap (frame=0xfe030c759510)
at /usr/src/sys/amd64/amd64/trap.c:541
#7  0x80d16c89 in skiphook ()
at /usr/src/sys/amd64/amd64/exception.S:245
#8  0x815c5e20 in cnputs_mtx ()
#9  0x0080 in ?? ()
#10 0xfe030c7594c0 in ?? ()
#11 0x0080 in ?? ()
#12 0x in ?? ()
Current language:  auto; currently minimal

The checks in memguard.c should be guarded by `#if !defined(INVARIANTS) ...
#endif' to eliminate unnecessary overhead double-checking this condition.

Reproduction steps:

Run the following commands as root:

- git clone https://github.com/yaneurabeya/scratch
- cd scratch/testing/tools/bad_memory
- for s in obj depend all install; do make $s || break; done
- kldload bad_memory
- sysctl test.bad_memory_operation=double_free

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 121656] [libc] [patch] telldir(3) issues

2014-07-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=121656

--- Comment #4 from Pedro F. Giffuni  ---
I can reproduce the bug in FreeBSD 10.
Unfortunately the patch doesn't apply anymore :(

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
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"


[Bug 33834] strptime(3) is misleading

2014-07-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=33834

Pedro F. Giffuni  changed:

   What|Removed |Added

 CC||p...@freebsd.org
   See Also||https://bugs.freebsd.org/bu
   ||gzilla/show_bug.cgi?id=1373
   ||07

--- Comment #8 from Pedro F. Giffuni  ---
%t and %n have been added based on the illumos implementation:

https://svnweb.freebsd.org/base?view=revision&revision=267627

BTW, our implementation is failing all the GNU strptime tests:

http://www.scs.stanford.edu/histar/src/pkg/uclibc/test/time/tst-strptime.c

(which doesn't imply that the tests are correct)

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
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"


[Bug 121656] [libc] [patch] telldir(3) issues

2014-07-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=121656

John Baldwin  changed:

   What|Removed |Added

 CC||j...@freebsd.org

--- Comment #5 from John Baldwin  ---
Much of this patch is not needed.  The existing dd_td list is already
per-directory instead of being a global cache table.  Also, the problem
description is not at all clear.  I think one of the root bugs is that if you
call 'seekdir() followed by telldir()', POSIX requires the return value of
telldir() to match the value passed to seekdir().  Fixing this means removing
the (I think dubious) SINGLEUSE code and fixing telldir() to look for an
existing loc structure for the current position instead of always allocating a
new one.  That should be a much smaller patch.  The only additional
complication is if the dd_loc list should instead be changed so it is easier to
locate an existing loc for the current position (i.e. either sorting the list
or using a hash table)

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
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"


[News] July 24, 2014 Communique - The Hour Of Temptation

2014-07-24 Thread Christian Prophecy



___
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"


[Bug 192069] pkgng has removed package install dates for everything that was installed before today

2014-07-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192069

Gyrd Thane Lange  changed:

   What|Removed |Added

 CC||gyrd...@thanelange.no

--- Comment #3 from Gyrd Thane Lange  ---
I have just experienced the same. Using portupgrade to upgrade pkg from 1.2 to
1.3 nulled all the timestamps in the package database.

Jul 25 00:54:33 onyx pkg: pkg-1.2.7_2 deinstalled
Jul 25 00:54:35 onyx pkg-static: pkg-1.3.0 installed

root@onyx:/usr/ports # pkg query "%t %o" | grep -v ^0
1406242475 ports-mgmt/pkg
root@onyx:/usr/ports # pkg query "%t %o" | wc -l
 791
root@onyx:/usr/ports # pkg info | grep portupgrade
portupgrade-devel-20131212,3

11.0-CURRENT #2 r269075M: Thu Jul 24 22:35:47 CEST 2014 amd64

It appears the date resets happens the moment ports-mgmt/pkg itself is
upgraded. Subsequent installs of any port seemingly records the correct time. A
brute force fix is therefore to reinstall *all* the packages on the system, but
since I happen to have a backup copy of the local.sqlite package db I can use
SQL to restore the timestamps. Nothing else seems to be missing.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
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"


[Bug 191022] [tests] sed:multi_test testcase # 75 fails

2014-07-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191022

--- Comment #1 from Julio Merino,+1 347 694 0576,New York City 
 ---
Addressed upstream in commit 2d47e82a2450ea5e46b8207d91f7eb32b0c31c59.  We can
either backport it to the package or wait for kyua-testers-0.3.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
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"


[Bug 191054] [build] [bsd.progs.mk] make clean/cleanobj does not clean as expected with bsd.progs.mk

2014-07-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191054

Julio Merino,+1 347 694 0576,New York City  changed:

   What|Removed |Added

 Status|Needs Triage|Issue Resolved
 Resolution|--- |DUPLICATE

--- Comment #3 from Julio Merino,+1 347 694 0576,New York City 
 ---
As you mention with your fix, this is actually a duplicate of 191055. 
bsd.progs.mk is not handling the case of a mixture of PROGS and FILES correctly
for all targets other than build.

*** This bug has been marked as a duplicate of bug 191055 ***

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
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"


[Bug 191055] [build] [bsd.progs.mk] make install with bsd.progs.mk installs FILES/SCRIPTS multiple times if PROGS is specified

2014-07-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191055

--- Comment #4 from Julio Merino,+1 347 694 0576,New York City 
 ---
*** Bug 191054 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
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"


[Bug 191055] [build] [bsd.progs.mk] make install with bsd.progs.mk installs FILES/SCRIPTS multiple times if PROGS is specified

2014-07-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191055

Julio Merino,+1 347 694 0576,New York City  changed:

   What|Removed |Added

 Status|Needs Triage|In Discussion
   Assignee|freebsd-bugs@FreeBSD.org|j...@freebsd.org

--- Comment #5 from Julio Merino,+1 347 694 0576,New York City 
 ---
I think the patch looks reasonable but I need to play with it a bit. 
Build-testing now.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
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"