r275326 (merge from projects/sendfile) broke Bluetooth for me
Hi, after r275326 I can't get Bluetooth up anymore. Previously, running service bluetooth start ubt0 worked well. The first invocation returned an error, but the second always worked. Now, there are just errors (/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0). I've tracked the error down to the invocations of hccontrol in /etc/rc.d/bluetooth. hccontrol just prints an EMSGSIZE error message and fails. The setup of the netgraph nodes with ngctl works fine. For now I've reverted the merges from projects/sendfile and Bluetooth works fine again. Should I open a bug report? This is from a Thinkpad T420. ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Panic after USB deadlock followed by kldunload umass.ko
Fabian Keil freebsd-lis...@fabiankeil.de wrote: Hans Petter Selasky h...@selasky.org wrote: On 10/23/14 16:28, Fabian Keil wrote: kldunload umass.ko lead to a panic, dumping didn't work. Screenshots are available at: http://www.fabiankeil.de/bilder/freebsd/kernel-panic-r273434-usb/ I've seen locked-up usbconfig processes in the past, usually after executing a shell function that does: | usbconfig_output=$(sudo usbconfig -d ${device} add_quirk UQ_MSC_NO_INQUIRY) | [... error handling snipped ] | usbconfig_output=$(sudo usbconfig -d ${device} reset) Sometimes the second command seems to mess up the USB system. USB detach is synchronous. If for example umass fails to detach, due to reference counts not reaching zero, that might be the root cause. Try to get a backtrace from the usb_process() processes using kgdb, and you'll see right away what is going on. Thanks for the quick response. So far I haven't been able to intentionally reproduce the issue, but I'll try the above the next time I unintentionally run into this again. A couple of days ago usbconfig got stuck again: fk@r500 ~ $sudo procstat -kk $(pgrep usbconfig) PIDTID COMM TDNAME KSTACK 2444 100971 usbconfig-mi_switch+0xe1 sleepq_wait+0x3a _sx_xlock_hard+0x522 _sx_xlock+0x5d usbd_enum_lock+0x3a usb_ref_device+0x157 usb_open+0xbf devfs_open+0x122 VOP_OPEN_APV+0xa1 vn_open_vnode+0x234 vn_open_cred+0x310 kern_openat+0x26f amd64_syscall+0x3fd Xfast_syscall+0xfb 2425 100970 usbconfig-mi_switch+0xe1 sleepq_timedwait+0x3a _sleep+0x294 pause_sbt+0xd0 usb_pause_mtx+0x85 usb_ioctl+0x3e7 devfs_ioctl_f+0x13b kern_ioctl+0x3ce sys_ioctl+0x140 amd64_syscall+0x3fd Xfast_syscall+0xfb The USB-related threads: (kgdb) thread 520 [Switching to thread 520 (Thread 100970)]#0 sched_switch (td=0xf8001d2044a0, newtd=value optimized out, flags=value optimized out) at /usr/src/sys/kern/sched_ule.c:1940 1940cpuid = PCPU_GET(cpuid); (kgdb) where #0 sched_switch (td=0xf8001d2044a0, newtd=value optimized out, flags=value optimized out) at /usr/src/sys/kern/sched_ule.c:1940 #1 0x805bbf91 in mi_switch (flags=260, newtd=0x0) at /usr/src/sys/kern/kern_synch.c:492 #2 0x80601a7a in sleepq_timedwait (wchan=0x0, pri=0) at /usr/src/sys/kern/subr_sleepqueue.c:666 #3 0x805bb984 in _sleep (ident=value optimized out, lock=value optimized out, priority=value optimized out, wmesg=value optimized out, sbt=value optimized out, pr=value optimized out, flags=value optimized out) at /usr/src/sys/kern/kern_synch.c:250 #4 0x805bbe10 in pause_sbt (wmesg=value optimized out, sbt=value optimized out, pr=0, flags=value optimized out) at /usr/src/sys/kern/kern_synch.c:379 #5 0x81e2f175 in usb_pause_mtx (mtx=value optimized out, timo=value optimized out) at /usr/src/sys/modules/usb/usb/../../../dev/usb/usb_util.c:143 #6 0x81e16ed7 in usb_ioctl (dev=value optimized out, cmd=value optimized out, addr=value optimized out, fflag=0, td=value optimized out) at /usr/src/sys/modules/usb/usb/../../../dev/usb/usb_dev.c:1128 #7 0x8047cffb in devfs_ioctl_f (fp=0xf8001d3d1b40, com=2147767558, data=0xfe009453aa20, cred=value optimized out, td=0xf8001d2044a0) at /usr/src/sys/fs/devfs/devfs_vnops.c:775 #8 0x8061041e in kern_ioctl (td=0xf8001d2044a0, fd=value optimized out, com=0) at file.h:318 #9 0x8060ffa0 in sys_ioctl (td=0xf8001d2044a0, uap=0xfe009453ab80) at /usr/src/sys/kern/sys_generic.c:718 #10 0x80877d5d in amd64_syscall (td=0xf8001d2044a0, traced=0) at subr_syscall.c:133 #11 0x8085ac9b in Xfast_syscall () at /usr/src/sys/amd64/amd64/exception.S:390 #12 0x000800b7caea in ?? () Previous frame inner to this frame (corrupt stack?) (kgdb) thread 522 [Switching to thread 522 (Thread 100971)]#0 sched_switch (td=0xf8001d3a5940, newtd=value optimized out, flags=value optimized out) at /usr/src/sys/kern/sched_ule.c:1940 1940cpuid = PCPU_GET(cpuid); (kgdb) where #0 sched_switch (td=0xf8001d3a5940, newtd=value optimized out, flags=value optimized out) at /usr/src/sys/kern/sched_ule.c:1940 #1 0x805bbf91 in mi_switch (flags=260, newtd=0x0) at /usr/src/sys/kern/kern_synch.c:492 #2 0x8060126a in sleepq_wait (wchan=0x0, pri=0) at /usr/src/sys/kern/subr_sleepqueue.c:631 #3 0x805bae82 in _sx_xlock_hard (sx=0xf80015e82050, tid=18446735278106892608, opts=value optimized out, file=0x0, line=0) at /usr/src/sys/kern/kern_sx.c:688 #4 0x805ba6ad in _sx_xlock (sx=0x0, opts=0, file=value optimized out, line=0) at sx.h:154 #5 0x81e19baa in usbd_enum_lock (udev=0xf80015e82000) at /usr/src/sys/modules/usb/usb/../../../dev/usb/usb_device.c:2755 #6 0x81e18967 in usb_ref_device
Re: Panic after USB deadlock followed by kldunload umass.ko
On 12/21/14 14:54, Fabian Keil wrote: #0 sched_switch (td=0xf80015ea0940, newtd=value optimized out, flags=value optimized out) at /usr/src/sys/kern/sched_ule.c:1940 #1 0x805bbf91 in mi_switch (flags=260, newtd=0x0) at /usr/src/sys/kern/kern_synch.c:492 #2 0x8060126a in sleepq_wait (wchan=0x0, pri=0) at /usr/src/sys/kern/subr_sleepqueue.c:631 #3 0x805bb99d in _sleep (ident=value optimized out, lock=value optimized out, priority=value optimized out, wmesg=value optimized out, sbt=value optimized out, pr=value optimized out, flags=value optimized out) at /usr/src/sys/kern/kern_synch.c:254 #4 0x802a2548 in cam_sim_free (sim=0xf8004f9fa800, free_devq=1) at /usr/src/sys/cam/cam_sim.c:109 Because cam_sim_free() doesn't return, the USB subsystem belonging to that controller is somewhat blocked. --HPS ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: r275326 (merge from projects/sendfile) broke Bluetooth for me
On 21 December 2014 at 04:57, Jan Kokemüller jan.kokemuel...@gmail.com wrote: Hi, after r275326 I can't get Bluetooth up anymore. Previously, running service bluetooth start ubt0 worked well. The first invocation returned an error, but the second always worked. Now, there are just errors (/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0). I've tracked the error down to the invocations of hccontrol in /etc/rc.d/bluetooth. hccontrol just prints an EMSGSIZE error message and fails. The setup of the netgraph nodes with ngctl works fine. For now I've reverted the merges from projects/sendfile and Bluetooth works fine again. Should I open a bug report? This is from a Thinkpad T420. Yes, please do! Thanks! -adrian ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: r275326 (merge from projects/sendfile) broke Bluetooth for me
On 21.12.2014 17:08, Adrian Chadd wrote: Yes, please do! I've filed a bug report: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196174 Cheers, Jan ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: simple task to speed up booting
On Sun, 2014-12-14 at 10:32 +, Poul-Henning Kamp wrote: The rotating swirlie ('-/|\') in the loader accounts for a surprisingly large part of our boot time on systems with slow-ish serial consoles. I think right now it takes a step for each 512 byte read, reducing that to once every 64kB or even 1MB would be an improvement with the kind of kernel sizes we have today. I investigated this a bit today. I instrumented the loader on arm to count how many times twiddle() is called while loading a 5.5MB kernel. When loading over NFS it was called 5580 times. When loading from an sdcard it was called 284 times. Poking around in the code, it looks like NFS calls twiddle() once per 1K block read, CD9660 once per 2K block, and UFS and ext2fs once per filesystem blocksize block. All of them have some other scattered twiddle calls while navigating metadata that probably don't add up to much compared to the bulk reading. My amd64 kernel is twice as big even with lots of the generic devices removed; that's a lot of IO. But one twiddle per filesystem block shouldn't be so bad... let's call it 600 twiddles, each one writes 2 bytes to serial, so a total of ~1200mS at 9600bps. The same kernel loaded over nfs would cost over 20 seconds in serial output. So all in all it seems like different kinds of IO need different throttling, something like the attached (which also still has some stats output in it). I can't decide if it's worth committing... it'll have a lot of value to someone with slow serial and netbooting, is that common? -- Ian Index: lib/libstand/cd9660.c === --- lib/libstand/cd9660.c (revision 275941) +++ lib/libstand/cd9660.c (working copy) @@ -281,7 +281,7 @@ cd9660_open(const char *path, struct open_file *f) buf = malloc(buf_size = ISO_DEFAULT_BLOCK_SIZE); vd = buf; for (bno = 16;; bno++) { - twiddle(); + twiddle(1); rc = f-f_dev-dv_strategy(f-f_devdata, F_READ, cdb2devb(bno), ISO_DEFAULT_BLOCK_SIZE, buf, read); if (rc) @@ -314,7 +314,7 @@ cd9660_open(const char *path, struct open_file *f) while (off dsize) { if ((off % ISO_DEFAULT_BLOCK_SIZE) == 0) { -twiddle(); +twiddle(1); rc = f-f_dev-dv_strategy (f-f_devdata, F_READ, cdb2devb(bno + boff), @@ -374,7 +374,7 @@ cd9660_open(const char *path, struct open_file *f) /* Check for Rock Ridge since we didn't in the loop above. */ bno = isonum_733(rec.extent) + isonum_711(rec.ext_attr_length); - twiddle(); + twiddle(1); rc = f-f_dev-dv_strategy(f-f_devdata, F_READ, cdb2devb(bno), ISO_DEFAULT_BLOCK_SIZE, buf, read); if (rc) @@ -431,7 +431,7 @@ buf_read_file(struct open_file *f, char **buf_p, s if (fp-f_buf == (char *)0) fp-f_buf = malloc(ISO_DEFAULT_BLOCK_SIZE); - twiddle(); + twiddle(32); rc = f-f_dev-dv_strategy(f-f_devdata, F_READ, cdb2devb(blkno), ISO_DEFAULT_BLOCK_SIZE, fp-f_buf, read); if (rc) Index: lib/libstand/ext2fs.c === --- lib/libstand/ext2fs.c (revision 275941) +++ lib/libstand/ext2fs.c (working copy) @@ -353,7 +353,7 @@ ext2fs_open(const char *upath, struct open_file *f /* allocate space and read super block */ fs = (struct ext2fs *)malloc(sizeof(*fs)); fp-f_fs = fs; - twiddle(); + twiddle(1); error = (f-f_dev-dv_strategy)(f-f_devdata, F_READ, EXT2_SBLOCK, EXT2_SBSIZE, (char *)fs, buf_size); if (error) @@ -395,7 +395,7 @@ ext2fs_open(const char *upath, struct open_file *f len = blkgrps * fs-fs_bsize; fp-f_bg = malloc(len); - twiddle(); + twiddle(1); error = (f-f_dev-dv_strategy)(f-f_devdata, F_READ, EXT2_SBLOCK + EXT2_SBSIZE / DEV_BSIZE, len, (char *)fp-f_bg, buf_size); @@ -507,7 +507,7 @@ ext2fs_open(const char *upath, struct open_file *f if (error) goto out; -twiddle(); +twiddle(1); error = (f-f_dev-dv_strategy)(f-f_devdata, F_READ, fsb_to_db(fs, disk_block), fs-fs_bsize, buf, buf_size); @@ -568,7 +568,7 @@ read_inode(ino_t inumber, struct open_file *f) * Read inode and save it. */ buf = malloc(fs-fs_bsize); - twiddle(); + twiddle(1); error = (f-f_dev-dv_strategy)(f-f_devdata, F_READ, ino_to_db(fs, fp-f_bg, inumber), fs-fs_bsize, buf, rsize); if (error) @@ -665,7 +665,7 @@ block_map(struct open_file *f, daddr_t file_block, if (fp-f_blk[level] == (char *)0) fp-f_blk[level] = malloc(fs-fs_bsize); - twiddle(); + twiddle(1); error = (f-f_dev-dv_strategy)(f-f_devdata, F_READ, fsb_to_db(fp-f_fs, ind_block_num), fs-fs_bsize, fp-f_blk[level], fp-f_blksize[level]); @@ -723,7 +723,7 @@ buf_read_file(struct open_file *f, char **buf_p, s bzero(fp-f_buf, block_size); fp-f_buf_size = block_size; } else { - twiddle(); + twiddle(4); error = (f-f_dev-dv_strategy)(f-f_devdata, F_READ, fsb_to_db(fs, disk_block), block_size, fp-f_buf,
Build failed in Jenkins: Build-UFS-image #739
See https://jenkins.freebsd.org/job/Build-UFS-image/739/ -- [...truncated 19225 lines...] install -s -o root -g wheel -m 555 rmextattr https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/sbin/rmextattr install -o root -g wheel -m 444 rmextattr.8.gz https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/share/man/man8 https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/share/man/man8/setextattr.8.gz - https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/share/man/man8/rmextattr.8.gz https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/share/man/man8/getextattr.8.gz - https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/share/man/man8/rmextattr.8.gz https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/share/man/man8/lsextattr.8.gz - https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/share/man/man8/rmextattr.8.gz https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/sbin/getextattr - https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/sbin/rmextattr https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/sbin/setextattr - https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/sbin/rmextattr https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/sbin/lsextattr - https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/sbin/rmextattr === usr.sbin/extattrctl (install) install -s -o root -g wheel -m 555 extattrctl https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/sbin/extattrctl install -o root -g wheel -m 444 extattrctl.8.gz https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/share/man/man8 === usr.sbin/fdcontrol (install) install -s -o root -g wheel -m 555 fdcontrol https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/sbin/fdcontrol install -o root -g wheel -m 444 fdcontrol.8.gz https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/share/man/man8 === usr.sbin/fdformat (install) install -s -o root -g wheel -m 555 fdformat https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/sbin/fdformat install -o root -g wheel -m 444 fdformat.1.gz https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/share/man/man1 === usr.sbin/fdread (install) install -s -o root -g wheel -m 555 fdread https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/sbin/fdread install -o root -g wheel -m 444 fdread.1.gz https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/share/man/man1 === usr.sbin/fdwrite (install) install -s -o root -g wheel -m 555 fdwrite https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/sbin/fdwrite install -o root -g wheel -m 444 fdwrite.1.gz https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/share/man/man1 === usr.sbin/fifolog (install) === usr.sbin/fifolog/lib (install) === usr.sbin/fifolog/fifolog_create (install) install -s -o root -g wheel -m 555 fifolog_create https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/sbin/fifolog_create install -o root -g wheel -m 444 fifolog.1.gz https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/share/man/man1 https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/share/man/man1/fifolog_create.1.gz - https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/share/man/man1/fifolog.1.gz https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/share/man/man1/fifolog_reader.1.gz - https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/share/man/man1/fifolog.1.gz https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/share/man/man1/fifolog_writer.1.gz - https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/share/man/man1/fifolog.1.gz === usr.sbin/fifolog/fifolog_writer (install) install -s -o root -g wheel -m 555 fifolog_writer https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/sbin/fifolog_writer === usr.sbin/fifolog/fifolog_reader (install) install -s -o root -g wheel -m 555 fifolog_reader https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/sbin/fifolog_reader === usr.sbin/flowctl (install) install -s -o root -g wheel -m 555 flowctl https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/sbin/flowctl install -o root -g wheel -m 444 flowctl.8.gz https://jenkins.freebsd.org/job/Build-UFS-image/ws/package/FreeBSD_HEAD/usr/share/man/man8 === usr.sbin/freebsd-update (install) install -o root -g wheel -m 555