From owner-freebsd-multimedia@freebsd.org Sat Dec 16 13:11:37 2017 Return-Path: Delivered-To: freebsd-multimedia@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3607E8203E for ; Sat, 16 Dec 2017 13:11:37 +0000 (UTC) (envelope-from youngluc@gmail.com) Received: from mail-it0-x229.google.com (mail-it0-x229.google.com [IPv6:2607:f8b0:4001:c0b::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8944A63710 for ; Sat, 16 Dec 2017 13:11:37 +0000 (UTC) (envelope-from youngluc@gmail.com) Received: by mail-it0-x229.google.com with SMTP id d137so23001046itc.2 for ; Sat, 16 Dec 2017 05:11:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=reply-to:to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=Sdu1Ik2Lb4/Cq/xdYs/6GdvP02+W8zCf0ytnfcgQPPA=; b=Xz4hQubIyzm5lFxjDxaaGGKMAVSNK0FMIeHFUzcd3gLo5MIlEnAonxoybEMepwYbnf PqSN1mjWKQE6/auufLm3194eUb7ZWqv61IHSGz1JrQ/hBtwLHpe6ek0Rp5Wxy58V63fw LhbXczYZwY/mwqxsyosUPm4sRwnZARphtWUfunSq29UFl9G4clSJvNFuCJQVqdhZeCmk 40NBJMAF6yEfJlHZ5jFWgQyjlgMcYHhHifm+AYu1NcO20moyPLY28Qh4Sb41vcqCMzl7 5aHggfBNthM7iazVOLjOBmDpBNWJjiVW22SmuG9bzDhFae6QJkDHEhZf9ZcQbrqbXE9q R2UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:to:from:subject:message-id:date :user-agent:mime-version:content-transfer-encoding; bh=Sdu1Ik2Lb4/Cq/xdYs/6GdvP02+W8zCf0ytnfcgQPPA=; b=qWNgTjB7FjyAPagq8am2EpepBVlDxB2ZJ5/+Y2oltOV3cS7psJsW9GLLII5c/VsUiV YnUloi/EXIynpqy0TN9+X6pMsJEBgItUpvrZlgikM3nkBONXfUX+p/RpOa/H//9KdLCh iG7BAsbZuCxloG3x/bsK5RtF0kOa8MQffSy+cqT6cphHaDM5oqMYMYnLxZhSnFcnL+u9 q7j7tiCAgM7BnBT2sPkrErj2YebNC+HvCgPfNdm6jzIk9kg8l824GoznF1fer0gIqyKg wPteJ0xMdseWNC1SIYmQSVtyYUySIlkOJaF4I1MciPT9W4BYHPJKZVcnlYK+8Kiuitsh ayGA== X-Gm-Message-State: AKGB3mLPZPFUdneD5dYNQqB3Tflrk1tFVvweb/jNrttWO69h5dRji8ez Rt9yLQ/QecG/frnNTszD6xE8xg== X-Google-Smtp-Source: ACJfBouL6nEIl0m9x5SpP5leMMUNIrDXDShgUHKmPWyfBtCjSnkPJTyNjxcgaMCdBCUlEsUhdwKGNQ== X-Received: by 10.36.160.201 with SMTP id o192mr11530650ite.58.1513429896610; Sat, 16 Dec 2017 05:11:36 -0800 (PST) Received: from [10.40.8.62] (67-220-9-24.usiwireless.com. [67.220.9.24]) by smtp.gmail.com with ESMTPSA id 3sm5026177itk.19.2017.12.16.05.11.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 Dec 2017 05:11:35 -0800 (PST) Reply-To: youngluc@gmail.com To: freebsd-multimedia@freebsd.org From: Lucas Young Subject: webcamd-4.12.0.1 segfault when using WinTV-HV-950Q Message-ID: <63966a1d-1244-4ea0-0bf8-15b485f63cd4@gmail.com> Date: Sat, 16 Dec 2017 07:10:56 -0600 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 13:11:37 -0000 I am trying to get my WinTV-HV-950Q working on FreeBSD. I am running into, apparently, the same problem as described in the following link which is from this list about two years ago. [Hauppauge WinTV HVR 950Q](https://lists.freebsd.org/pipermail/freebsd-multimedia/2015-June/016273.html) This one sounds similar as well. [FreeBSD-10.3 and WinTV HVR-950Q](https://lists.freebsd.org/pipermail/freebsd-multimedia/2016-December/017525.html) Unfortunately, it does not appear that the solution to either of those previous issues was posted to the list so hoping that there is someone who is willing to rehash this for me. In short, webcamd is crashing with a segfault the first time that it is run. If it is run again, it usually starts but then consumes 100% of one CPU core. I have included the particulars from my system below. Note that I have already compiled webcamd from ports with the DEBUG turned on. I am not proficient in C or in using gdb so I need some help to know what to check next. # uname -mrs FreeBSD 11.1-RELEASE-p4 amd64 # pkg info -x webcamd webcamd-4.12.0.1 # md5 /boot/modules/dvb-fe-xc5000-1.6.114.fw MD5 (/boot/modules/dvb-fe-xc5000-1.6.114.fw) = b1ac8f759020523ebaaeff3fdf4789ed # usbconfig ugen4.1: at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) ugen0.1: <0x1022 XHCI root HUB> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA) ugen5.1: at usbus5, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen2.1: at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) ugen3.1: at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen1.1: <0x1022 XHCI root HUB> at usbus1, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA) ugen0.2: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) ugen3.2: at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) # usbconfig -d 0.2 dump_device_desc ugen0.2: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) p wr=ON (500mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0040 idVendor = 0x2040 idProduct = 0x7200 bcdDevice = 0x0005 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x000a bNumConfigurations = 0x0001 # cat /boot/loader.conf kern.geom.label.disk_ident.enable="0" kern.geom.label.gptid.enable="0" vfs.zfs.min_auto_ashift=12 zfs_load="YES" cuse_load="YES" # sysrc -a autofs_enable: YES dbus_enable: NO dumpdev: AUTO hald_enable: NO jackd_enable: NO mountd_enable: YES mountd_flags: -r moused_enable: NO mythbackend_enable: YES nfs_server_enable: YES ntpd_enable: YES powerd_enable: YES rpc_lockd_enable: YES rpc_statd_enable: YES rpcbind_enable: YES sshd_enable: YES webcamd_0_flags: -N Hauppauge-WinTV-HVR-950 -S unknown webcamd_1_flags: -N Chicony-Electronics-Co--Ltd--HP-Truevision-HD -S 0x0001 webcamd_enable: YES zfs_enable: YES When the host boots I find that the cuse module is loaded, there is a coredump in /, and dmesg indicates that it "exited on signal 11" during the boot. # kldstat Id Refs Address Size Name 1 17 0xffffffff80200000 1f67a88 kernel 2 1 0xffffffff82169000 316708 zfs.ko 3 2 0xffffffff82480000 cb78 opensolaris.ko 4 1 0xffffffff8248d000 e690 cuse.ko 5 1 0xffffffff82a31000 10913 snd_uaudio.ko # dmesg ... uaudio0 on uhub3 uaudio0: on usbus0 uaudio0: No playback. uaudio0: Record: 48000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer. uaudio0: No MIDI sequencer. pcm2: on uaudio0 uaudio0: No HID volume keys found. pid 99972 (webcamd), uid 0: exited on signal 11 (core dumped) ... # gdb $(which webcamd) /webcamd.core 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"... Core was generated by '/usr/local/sbin/webcamd -i 0 -d ugen0.2 -B -U webcamd -G webcamd'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/local/lib/libhal.so...done. Loaded symbols for /usr/local/lib/libhal.so Reading symbols from /usr/local/lib/libdbus-1.so...done. Loaded symbols for /usr/local/lib/libdbus-1.so Reading symbols from /usr/lib/libusb.so.3...done. Loaded symbols for /usr/lib/libusb.so.3 Reading symbols from /lib/libthr.so.3...done. Loaded symbols for /lib/libthr.so.3 Reading symbols from /lib/libutil.so.9...done. Loaded symbols for /lib/libutil.so.9 Reading symbols from /usr/lib/libcuse.so.1...done. Loaded symbols for /usr/lib/libcuse.so.1 Reading symbols from /lib/libc.so.7...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /usr/lib/libexecinfo.so.1...done. Loaded symbols for /usr/lib/libexecinfo.so.1 Reading symbols from /lib/libelf.so.2...done. Loaded symbols for /lib/libelf.so.2 Reading symbols from /lib/libgcc_s.so.1...done. Loaded symbols for /lib/libgcc_s.so.1 Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x0000000000414e32 in timer_exec (arg=0x0) at kernel/linux_timer.c:142 142 TAILQ_REMOVE(&timer_head, t, entry); (gdb) bt #0 0x0000000000414e32 in timer_exec (arg=0x0) at kernel/linux_timer.c:142 #1 0x00000008014c7bc5 in pthread_create () from /lib/libthr.so.3 #2 0x0000000000000000 in ?? () Current language: auto; currently minimal (gdb) p &timer_head $1 = (struct timer_head *) 0xccee78 (gdb) p t $2 = (struct timer_list *) 0x802843130 Can someone point me in the direction of what to check next? -- Luke