webcamd quirkyness

J.R. Oldroyd fbsd at opal.com
Thu Mar 31 14:05:17 UTC 2011


On Thu, 31 Mar 2011 15:34:12 +0200, Hans Petter Selasky <hselasky at c2i.net> wrote:
>
> > ^C
> > 
> > # ./webcamd -d 3.3 -i 0 -m uvc_driver.trace=0xffffffff -B
> > .. same trace as above, until:
> > lirc_dev: IR Remote Control driver registered, major 13
> > Attached ugen3.3[0] to cuse unit -1
> > #
> 
> Try to compile webcamd without debugging. Then run it from gdb. Press CTRL+C 
> to break back into gdb when it hangs.
> 
> Dump backtrace from all threads.
> 
> --HPS

With/without -i 0 makes no difference.

Using gdb, I should point out that with -B it prints the "cuse -1"
message then it does go into the background and sit there.  I can
still gdb it, though:

# /usr/local/sbin/webcamd -d 3.3 -B
Attached ugen3.3[0] to cuse unit -1
# ps ax | grep webcamd
 4581  ??  Ss     0:00.17 /usr/local/sbin/webcamd -d 3.3 -B
 4833   0  R+     0:00.00 grep webcamd
# gdb /usr/local/sbin/webcamd 4581
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"...(no debugging symbols found)...
Attaching to program: /usr/local/sbin/webcamd, process 4581
Reading symbols from /usr/local/lib/libhal.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libhal.so.1
Reading symbols from /usr/local/lib/libdbus-1.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libdbus-1.so.3
Reading symbols from /usr/lib/libusb.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libusb.so.2
Reading symbols from /usr/local/lib/libcuse4bsd.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libcuse4bsd.so.1
Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done.
[New Thread 80120a740 (LWP 100074)]
[New Thread 8012041c0 (LWP 100140)]
Loaded symbols for /lib/libthr.so.3
Reading symbols from /lib/libutil.so.8...(no debugging symbols found)...done.
Loaded symbols for /lib/libutil.so.8
Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done.
Loaded symbols for /libexec/ld-elf.so.1
[Switching to Thread 80120a740 (LWP 100074)]
0x0000000800f1f06c in poll () from /lib/libc.so.7
(gdb) thr ap all bt

Thread 2 (Thread 8012041c0 (LWP 100140)):
#0  0x0000000800f631ac in nanosleep () from /lib/libc.so.7
#1  0x0000000800f63125 in usleep () from /lib/libc.so.7
#2  0x0000000800c6a2e8 in usleep () from /lib/libthr.so.3
#3  0x00000000004075db in usb_unlink_bsd ()
#4  0x00000000004076e4 in usb_unlink_urb_sub ()
#5  0x0000000000407716 in usb_kill_urb ()
#6  0x00000000004ec12d in uvc_v4l2_release ()
#7  0x000000000040bcfd in v4l2_release ()
#8  0x000000000040641c in linux_close ()
#9  0x00000000004f1571 in main ()

Thread 1 (Thread 80120a740 (LWP 100074)):
#0  0x0000000800f1f06c in poll () from /lib/libc.so.7
#1  0x0000000800c6a83e in poll () from /lib/libthr.so.3
#2  0x0000000800a5763d in libusb20_dev_wait_process () from /usr/lib/libusb.so.2
#3  0x0000000000408476 in usb_exec ()
#4  0x0000000800c684f1 in pthread_getprio () from /lib/libthr.so.3
#5  0x0000000000000000 in ?? ()
Error accessing memory address 0x7fffff3fb000: Bad address.
(gdb)


Repeating in the version with debugging:

(gdb) thr ap all bt

Thread 2 (Thread 8012041c0 (LWP 100171)):
#0  0x00000008010491ac in nanosleep () from /lib/libc.so.7
#1  0x0000000801049125 in usleep () from /lib/libc.so.7
#2  0x0000000800d502e8 in usleep () from /lib/libthr.so.3
#3  0x00000000004096d1 in usb_unlink_bsd (xfer=0x8012634d0, urb=0x801289e80, drain=1 '\001') at /usr/ports/multimedia/webcamd/work/webcamd-0.1.23/kernel/linux_usb.c:635
#4  0x0000000000409835 in usb_unlink_urb_sub (urb=0x801289e80, drain=1 '\001') at /usr/ports/multimedia/webcamd/work/webcamd-0.1.23/kernel/linux_usb.c:680
#5  0x000000000040a9ff in usb_kill_urb (urb=0x801289e80) at /usr/ports/multimedia/webcamd/work/webcamd-0.1.23/kernel/linux_usb.c:1418
#6  0x000000000057004c in uvc_status_stop (dev=0x801244d00) at /usr/ports/multimedia/webcamd/work/webcamd-0.1.23/v4l-dvb/linux/drivers/media/video/uvc/uvc_status.c:231
#7  0x000000000056ba12 in uvc_v4l2_release (file=0x80125a010) at /usr/ports/multimedia/webcamd/work/webcamd-0.1.23/v4l-dvb/linux/drivers/media/video/uvc/uvc_v4l2.c:482
#8  0x000000000040f315 in v4l2_release (inode=0x80125a008, filp=0x80125a010) at v4l2-dev.c:340
#9  0x000000000040782d in linux_close (handle=0x80125a000) at /usr/ports/multimedia/webcamd/work/webcamd-0.1.23/kernel/linux_file.c:88
#10 0x0000000000572dfe in v4b_create (unit=0) at webcamd.c:316
#11 0x000000000057343e in main (argc=4, argv=0x7fffffffea78) at webcamd.c:521

Thread 1 (Thread 80120a740 (LWP 100078)):
#0  0x000000080100506c in poll () from /lib/libc.so.7
#1  0x0000000800d5083e in poll () from /lib/libthr.so.3
#2  0x0000000800b3d63d in libusb20_dev_wait_process () from /usr/lib/libusb.so.2
#3  0x0000000000408cda in usb_exec (arg=0x843140) at /usr/ports/multimedia/webcamd/work/webcamd-0.1.23/kernel/linux_usb.c:184
#4  0x0000000800d4e4f1 in pthread_getprio () from /lib/libthr.so.3
#5  0x0000000000000000 in ?? ()
Error accessing memory address 0x7fffff3fb000: Bad address.
(gdb) 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-usb/attachments/20110331/66abe38b/signature.pgp


More information about the freebsd-usb mailing list