Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > muc.lists.netbsd.current-users > #31912 > unrolled thread
| Started by | Patrick Welche <prlw1@talktalk.net> |
|---|---|
| First post | 2022-04-22 09:52 +0100 |
| Last post | 2022-05-03 05:52 +0000 |
| Articles | 5 — 4 participants |
Back to article view | Back to muc.lists.netbsd.current-users
uvideo uvm_fault panic Patrick Welche <prlw1@talktalk.net> - 2022-04-22 09:52 +0100
Re: uvideo uvm_fault panic Robert Swindells <rjs@fdy2.co.uk> - 2022-04-22 13:24 +0100
Re: uvideo uvm_fault panic Patrick Welche <prlw1@talktalk.net> - 2022-04-22 14:26 +0100
Re: uvideo uvm_fault panic sc.dying@gmail.com - 2022-05-02 23:52 +0000
Re: uvideo uvm_fault panic mlelstv@serpens.de (Michael van Elst) - 2022-05-03 05:52 +0000
| From | Patrick Welche <prlw1@talktalk.net> |
|---|---|
| Date | 2022-04-22 09:52 +0100 |
| Subject | uvideo uvm_fault panic |
| Message-ID | <YmJs2M7dLZkCLD0b@quark> |
Logged in to zoom.us using firefox on 9.99.96/amd64 from Tuesday and got the following panic: crash> bt end() at 0 kern_reboot() at sys_reboot vpanic() at vpanic+0x181 panic() at printf_tolog trap() at startlwp --- trap (number 6) --- uvideo_open() at uvideo_open+0x17 videoopen() at videoopen+0x71 cdev_open() at cdev_open+0x19c spec_open() at spec_open+0x224 VOP_OPEN() at VOP_OPEN+0x36 vn_open() at vn_open+0x32e do_open() at do_open+0xc3 do_sys_openat() at do_sys_openat+0x74 sys_open() at sys_open+0x24 syscall() at syscall+0x18c --- syscall (number 5) --- syscall+0x18c: [ 4205.3040059] uvm_fault(0xffffa978ca4ba1b0, 0x0, 1) -> e [ 4205.3040059] fatal page fault in supervisor mode [ 4205.3040059] trap type 6 code 0 rip 0xffffffff803a8018 cs 0x8 rflags 0x10286 cr2 0 ilevel 0 rsp 0xffff8501501d2a30 [ 4205.3040059] curlwp 0xffffa978f1bce940 pid 2365.6641 lowest kstack 0xffff8501 501ce2c0 (also surprised at the web site as I had no intention of using the camera) (gdb doesn't cope with the corefile) crash> print uvideo_open ffffffff803a8001 uvideo_open: movq 8 (%rdi),%rdx uvideo_open+0x4: movl 28 (%rdx),%ecx uvideo_open+0x7: testl %ecx,%ecx uvideo_open+0x9: jnz ffffffff803a8064 uvideo_open+0xb: pushq %rbp uvideo_open+0xc: movq %rsp,%rbp uvideo_open+0xf: subq $0x30,%rsp uvideo_open+0x13: movq 40 (%rdi),%rax uvideo_open+0x17: movq 0 (%rax),%rcx uvideo_open+0x1a: movq %rcx,ffffffffffffffd4 (%rbp) uvideo_open+0x1e: movq 8 (%rax),%rcx uvideo_open+0x22: movq %rcx,ffffffffffffffdc (%rbp) uvideo_open+0x26: movq 10 (%rax),%rcx uvideo_open+0x2a: movq %rcx,ffffffffffffffe4 (%rbp) uvideo_open+0x2e: movq 18 (%rax),%rcx uvideo_open+0x32: movq %rcx,ffffffffffffffec (%rbp) uvideo_open+0x36: movq 20 (%rax),%rcx uvideo_open+0x3a: movq %rcx,fffffffffffffff4 (%rbp) uvideo_open+0x3e: movl 28 (%rax),%eax uvideo_open+0x41: movl %eax,fffffffffffffffc (%rbp) uvideo_open+0x44: movl 28 (%rdx),%eax PID LID S CPU FLAGS STRUCT LWP * NAME WAIT 2365 >6641 7 0 100 ffffa978f1bce940 VideoCapture 0 > 213 7 3 240 ffffa978c35ea8c0 usb1 Thoughts? Cheers, Patrick -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
[toc] | [next] | [standalone]
| From | Robert Swindells <rjs@fdy2.co.uk> |
|---|---|
| Date | 2022-04-22 13:24 +0100 |
| Message-ID | <x7levx2tmk.fsf@ren.fdy2.co.uk> |
| In reply to | #31912 |
Patrick Welche <prlw1@talktalk.net> wrote: >Logged in to zoom.us using firefox on 9.99.96/amd64 from Tuesday and >got the following panic: I get a similar panic using mplayer on my Pinebook. This is with some local pkgsrc patches to mplayer. -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
[toc] | [prev] | [next] | [standalone]
| From | Patrick Welche <prlw1@talktalk.net> |
|---|---|
| Date | 2022-04-22 14:26 +0100 |
| Message-ID | <YmKs/g9W2KfKnzk3@quark> |
| In reply to | #31912 |
On Fri, Apr 22, 2022 at 09:52:55AM +0100, Patrick Welche wrote: > Logged in to zoom.us using firefox on 9.99.96/amd64 from Tuesday and > got the following panic: ... > --- trap (number 6) --- > uvideo_open() at uvideo_open+0x17 > videoopen() at videoopen+0x71 ... Even easier reproducer: "videoctl -a" P -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
[toc] | [prev] | [next] | [standalone]
| From | sc.dying@gmail.com |
|---|---|
| Date | 2022-05-02 23:52 +0000 |
| Message-ID | <a45a5a3f-c724-04d2-aec3-40e2932505f6@gmail.com> |
| In reply to | #31912 |
I've updated the current kernel on rpi4 to 29 Apr from 14 Apr,
and got same panic for my webcam [*1].
After bisecting, it appears that dev/usb/uvideo.c rev 1.77 works,
but 1.79 does not.
When executing 'videoctl -a', vs->vs_default_format in uvideo_open
of 1.79 remains NULL.
Copying structure from address 0x0 causes uvm fault,
that's why kernel panics.
I don't know well about UVC spec., but I think diffs between
dmesg of uvideo.c 1.77 [*2] and 1.79 [*3] with UVIDEO_DEBUG
may give us some suggestions.
--- 1.77 2022-05-01 05:58:59.913948706 +0000
+++ 1.79 2022-05-01 05:59:03.908444423 +0000
@@ -28,22 +28,21 @@
uvideo_attach: VS Endpoint: Len=7 Type=0x05 bEndpointAddress=0x81 bmAttributes=00000101 wMaxPacketSize=3068 bInterval=1
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x01 bAlternateSetting=0x03 bNumEndpoints=0x01 bInterfaceClass=0x0e bInterfaceSubClass=0x02 bInterfaceProtocol=0x00 iInterface=0x00
uvideo_attach: VS Endpoint: Len=7 Type=0x05 bEndpointAddress=0x81 bmAttributes=00000101 wMaxPacketSize=5116 bInterval=1
-uvideo_stream_init: uvideo0 ifaceno=1 vs=0xffff0000fb056400
+uvideo_stream_init: uvideo0 ifaceno=1 vs=0xffff0000fb058200
uvideo_stream_init: probelen=26
uvideo_stream_init_desc: bInterfaceNumber=1 bAlternateSetting=0
uvideo_stream_init_frame_based_format: ifaceno=1 subtype=1 probelen=26
uvideo_stream_init_frame_based_format: mjpeg
uvideo: Adding pixel format 9
-uvideo: found format (index 1) type 9 size 1280x720 size 1843200 stride 2560 interval 333333
- ^ picking this one
-uvideo: found format (index 2) type 9 size 640x480 size 614400 stride 1280 interval 333333
+uvideo: truncated CS subtype-0x7 descriptor, length 30 < 38uvideo: unimplemented VS CS descriptor len=30 type=0x24 subtype=0x07
+uvideo: unimplemented VS CS descriptor len=30 type=0x24 subtype=0x07
uvideo: unimplemented VS CS descriptor len=18 type=0x24 subtype=0x03
uvideo: unimplemented VS CS descriptor len=6 type=0x24 subtype=0x0d
uvideo_stream_init_frame_based_format: ifaceno=1 subtype=1 probelen=26
uvideo_stream_init_frame_based_format: uncompressed
uvideo: Adding pixel format 1
-uvideo: found format (index 1) type 1 size 1280x720 size 1843200 stride 2560 interval 1000000
-uvideo: found format (index 2) type 1 size 640x480 size 614400 stride 1280 interval 333333
+uvideo: truncated CS subtype-0x5 descriptor, length 30 < 38uvideo: unimplemented VS CS descriptor len=30 type=0x24 subtype=0x05
+uvideo: unimplemented VS CS descriptor len=30 type=0x24 subtype=0x05
uvideo: unimplemented VS CS descriptor len=15 type=0x24 subtype=0x03
uvideo: unimplemented VS CS descriptor len=6 type=0x24 subtype=0x0d
uvideo_stream_init_desc: bInterfaceNumber=1 bAlternateSetting=0 done
[*1]
lsusb -v for my webcam
Bus 000 Device 002: ID 0c45:64ab Microdia
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.01
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2 ?
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x0c45 Microdia
idProduct 0x64ab
bcdDevice 10.26
iManufacturer 1 ZB-H62-201026
iProduct 2 Integrated Camera
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 422
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 14 Video
bFunctionSubClass 3 Video Interface Collection
bFunctionProtocol 0
iFunction 4 Integrated Camera
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 1 Video Control
bInterfaceProtocol 0
iInterface 4 Integrated Camera
VideoControl Interface Descriptor:
bLength 13
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdUVC 1.00
wTotalLength 109
dwClockFrequency 48.000000MHz
bInCollection 1
baInterfaceNr( 0) 1
VideoControl Interface Descriptor:
bLength 18
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0201 Camera Sensor
bAssocTerminal 0
iTerminal 0
wObjectiveFocalLengthMin 0
wObjectiveFocalLengthMax 0
wOcularFocalLength 0
bControlSize 3
bmControls 0x0000000a
Auto-Exposure Mode
Exposure Time (Absolute)
VideoControl Interface Descriptor:
bLength 11
bDescriptorType 36
bDescriptorSubtype 5 (PROCESSING_UNIT)
Warning: Descriptor too short
bUnitID 2
bSourceID 1
wMaxMultiplier 16384
bControlSize 2
bmControls 0x0000177f
Brightness
Contrast
Hue
Saturation
Sharpness
Gamma
White Balance Temperature
Backlight Compensation
Gain
Power Line Frequency
White Balance Temperature, Auto
iProcessing 0
bmVideoStandards 0x1d
None
PAL - 625/50
SECAM - 625/50
NTSC - 625/50
VideoControl Interface Descriptor:
bLength 29
bDescriptorType 36
bDescriptorSubtype 6 (EXTENSION_UNIT)
bUnitID 3
guidExtensionCode {7033f028-1163-2e4a-ba2c-6890eb334016}
bNumControl 4
bNrPins 1
baSourceID( 0) 2
bControlSize 4
bmControls( 0) 0x0f
bmControls( 1) 0x00
bmControls( 2) 0x00
bmControls( 3) 0x00
iExtension 0
VideoControl Interface Descriptor:
bLength 29
bDescriptorType 36
bDescriptorSubtype 6 (EXTENSION_UNIT)
bUnitID 4
guidExtensionCode {82066163-7050-ab49-b8cc-b3855e8d221d}
bNumControl 20
bNrPins 1
baSourceID( 0) 3
bControlSize 4
bmControls( 0) 0xff
bmControls( 1) 0xff
bmControls( 2) 0x71
bmControls( 3) 0x00
iExtension 0
VideoControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 5
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 4
iTerminal 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x87 EP 7 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 8
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
VideoStreaming Interface Descriptor:
bLength 15
bDescriptorType 36
bDescriptorSubtype 1 (INPUT_HEADER)
bNumFormats 2
wTotalLength 218
bEndPointAddress 129
bmInfo 0
bTerminalLink 5
bStillCaptureMethod 2
bTriggerSupport 1
bTriggerUsage 0
bControlSize 1
bmaControls( 0) 11
bmaControls( 1) 11
VideoStreaming Interface Descriptor:
bLength 11
bDescriptorType 36
bDescriptorSubtype 6 (FORMAT_MJPEG)
bFormatIndex 1
bNumFrameDescriptors 2
bFlags 1
Fixed-size samples: Yes
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags 0x00
Interlaced stream or variable: No
Fields per frame: 1 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 1
bmCapabilities 0x01
Still image supported
wWidth 1280
wHeight 720
dwMinBitRate 442368000
dwMaxBitRate 442368000
dwMaxVideoFrameBufferSize 1843200
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 2
bmCapabilities 0x01
Still image supported
wWidth 640
wHeight 480
dwMinBitRate 147456000
dwMaxBitRate 147456000
dwMaxVideoFrameBufferSize 614400
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 18
bDescriptorType 36
bDescriptorSubtype 3 (STILL_IMAGE_FRAME)
bEndpointAddress 0
bNumImageSizePatterns 2
wWidth( 0) 1280
wHeight( 0) 720
wWidth( 1) 640
wHeight( 1) 480
bNumCompressionPatterns 2
bCompression( 0) 1
bCompression( 1) 5
bCompression( 2) 10
bCompression( 3) 20
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
VideoStreaming Interface Descriptor:
bLength 27
bDescriptorType 36
bDescriptorSubtype 4 (FORMAT_UNCOMPRESSED)
bFormatIndex 2
bNumFrameDescriptors 2
guidFormat {59555932-0000-1000-8000-00aa00389b71}
bBitsPerPixel 16
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags 0x00
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 1
bmCapabilities 0x00
Still image unsupported
wWidth 1280
wHeight 720
dwMinBitRate 147456000
dwMaxBitRate 147456000
dwMaxVideoFrameBufferSize 1843200
dwDefaultFrameInterval 1000000
bFrameIntervalType 1
dwFrameInterval( 0) 1000000
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 2
bmCapabilities 0x00
Still image unsupported
wWidth 640
wHeight 480
dwMinBitRate 147456000
dwMaxBitRate 147456000
dwMaxVideoFrameBufferSize 614400
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 15
bDescriptorType 36
bDescriptorSubtype 3 (STILL_IMAGE_FRAME)
bEndpointAddress 0
bNumImageSizePatterns 2
wWidth( 0) 1280
wHeight( 0) 720
wWidth( 1) 640
wHeight( 1) 480
bNumCompressionPatterns 2
bCompression( 0) 1
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x03fc 1x 1020 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 2
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0bfc 2x 1020 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 3
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x13fc 3x 1020 bytes
bInterval 1
Binary Object Store Descriptor:
bLength 5
bDescriptorType 15
wTotalLength 25
bNumDeviceCaps 1
Container ID Device Capability:
bLength 20
bDescriptorType 16
bDevCapabilityType 4
bReserved 0
ContainerID {2c9fb620-b334-9046-a228-67bd251277e9}
Device Status: 0x0000
(Bus Powered)
[*2]
dmesg from uvideo.c 1.77 with UVIDEO_DEBUG
uvideo0 at uhub2 port 4 configuration 1 interface 0: ZB-H62-201026 (0x0c45) Integrated Camera (0x64ab), rev 2.01/10.26, addr 2
uvideo_attach: non uvc descriptor len=9 type=0x02
uvideo_attach: non uvc descriptor len=8 type=0x0b
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x00 bAlternateSetting=0x00 bNumEndpoints=0x01 bInterfaceClass=0x0e bInterfaceSubClass=0x01 bInterfaceProtocol=0x00 iInterface=0x04
uvideo_attach: VC Interface Header: Len=13 Type=0x24 Subtype=0x01 bcdUVC=256 wTotalLength=109 dwClockFrequency=48000000 bInCollection=1
uvideo_attach: VC Camera Terminal: Len=18 Type=0x24 Subtype=0x02 bTerminalID=1 wTerminalType=201 bAssocTerminal=0 iTerminal=0 wObjectiveFocalLengthMin/Max=0/0 wOcularFocalLength=0 bControlSize=3 bmControls=00000000-00000000-00001010
uvideo_attach: VC Processing Unit: Len=11 Type=0x24 Subtype=0x05 bUnitID=2 bSourceID=1 wMaxMultiplier=16384 bControlSize=2 bmControls=00010111-01111111 iProcessing=0 bmVideoStandards=00011101
uvideo_attach: VC Extension Unit: Len=29 Type=0x24 Subtype=0x06 bUnitID=3 guidExtensionCode=28F03370-6311-4A2E-BA2C-6890EB334016 bNumControls=4 bNrInPins=1 baSourceIDs=2 bControlSize=4 bmControls=00000000-00000000-00000000-00001111 iExtension=0
uvideo_attach: VC Extension Unit: Len=29 Type=0x24 Subtype=0x06 bUnitID=4 guidExtensionCode=63610682-5070-49AB-B8CC-B3855E8D221D bNumControls=20 bNrInPins=1 baSourceIDs=3 bControlSize=4 bmControls=00000000-01110001-11111111-11111111 iExtension=0
uvideo_attach: VC Output Terminal: Len=9 Type=0x24 Subtype=0x03 bTerminalID=5 wTerminalType=101 bAssocTerminal=0 bSourceID=4 iTerminal=0
uvideo_attach: VC Endpoint: Len=7 Type=0x05 bEndpointAddress=0x87 bmAttributes=00000011 wMaxPacketSize=16 bInterval=8
uvideo_attach: VC Interrupt Endpoint: Len=5 Type=0x25 Subtype=0x03 wMaxTransferSize=1029
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x01 bAlternateSetting=0x00 bNumEndpoints=0x00 bInterfaceClass=0x0e bInterfaceSubClass=0x02 bInterfaceProtocol=0x00 iInterface=0x00
uvideo_attach: VS Interface Input Header: Len=15 Type=0x24 Subtype=0x01 bNumFormats=2 wTotalLength=218 bEndpointAddress=129 bmInfo=0 bTerminalLink=5 bStillCaptureMethod=2 bTriggerSupport=1 bTriggerUsage=0 bControlSize=1 00000100
uvideo_attach: VS MJPEG format: Len=11 Type=0x24 Subtype=0x06 bFormatIndex=1 bNumFrameDescriptors=2 bmFlags=0x01 bDefaultFrameIndex=1 bAspectRatioX=0 bAspectRatioY=0 bmInterlaceFlags=0x00 bCopyProtect=0
uvideo_attach: VS [truncated videostream frame mjpeg]
uvideo_attach: VS [truncated videostream frame mjpeg]
uvideo_attach: VS unknown cs interface: len=18 type=0x24 subtype=0x03
uvideo_attach: VS unknown cs interface: len=6 type=0x24 subtype=0x0d
uvideo_attach: VS Format Uncompressed: Len=27 Type=0x24 Subtype=0x04 bFormatIndex=2 bNumFrameDescriptors=2 32595559-00-10-8000-00AA00389B71 bBitsPerPixel=16 bDefaultFrameIndex=1 bAspectRatioX=0 bAspectRatioY=0 bmInterlaceFlags=0x00 bCopyProtect=0
uvideo_attach: VS [truncated videostream frame uncompressed]
uvideo_attach: VS [truncated videostream frame uncompressed]
uvideo_attach: VS unknown cs interface: len=15 type=0x24 subtype=0x03
uvideo_attach: VS unknown cs interface: len=6 type=0x24 subtype=0x0d
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x01 bAlternateSetting=0x01 bNumEndpoints=0x01 bInterfaceClass=0x0e bInterfaceSubClass=0x02 bInterfaceProtocol=0x00 iInterface=0x00
uvideo_attach: VS Endpoint: Len=7 Type=0x05 bEndpointAddress=0x81 bmAttributes=00000101 wMaxPacketSize=1020 bInterval=1
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x01 bAlternateSetting=0x02 bNumEndpoints=0x01 bInterfaceClass=0x0e bInterfaceSubClass=0x02 bInterfaceProtocol=0x00 iInterface=0x00
uvideo_attach: VS Endpoint: Len=7 Type=0x05 bEndpointAddress=0x81 bmAttributes=00000101 wMaxPacketSize=3068 bInterval=1
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x01 bAlternateSetting=0x03 bNumEndpoints=0x01 bInterfaceClass=0x0e bInterfaceSubClass=0x02 bInterfaceProtocol=0x00 iInterface=0x00
uvideo_attach: VS Endpoint: Len=7 Type=0x05 bEndpointAddress=0x81 bmAttributes=00000101 wMaxPacketSize=5116 bInterval=1
uvideo_stream_init: uvideo0 ifaceno=1 vs=0xffff0000fb056400
uvideo_stream_init: probelen=26
uvideo_stream_init_desc: bInterfaceNumber=1 bAlternateSetting=0
uvideo_stream_init_frame_based_format: ifaceno=1 subtype=1 probelen=26
uvideo_stream_init_frame_based_format: mjpeg
uvideo: Adding pixel format 9
uvideo: found format (index 1) type 9 size 1280x720 size 1843200 stride 2560 interval 333333
^ picking this one
uvideo: found format (index 2) type 9 size 640x480 size 614400 stride 1280 interval 333333
uvideo: unimplemented VS CS descriptor len=18 type=0x24 subtype=0x03
uvideo: unimplemented VS CS descriptor len=6 type=0x24 subtype=0x0d
uvideo_stream_init_frame_based_format: ifaceno=1 subtype=1 probelen=26
uvideo_stream_init_frame_based_format: uncompressed
uvideo: Adding pixel format 1
uvideo: found format (index 1) type 1 size 1280x720 size 1843200 stride 2560 interval 1000000
uvideo: found format (index 2) type 1 size 640x480 size 614400 stride 1280 interval 333333
uvideo: unimplemented VS CS descriptor len=15 type=0x24 subtype=0x03
uvideo: unimplemented VS CS descriptor len=6 type=0x24 subtype=0x0d
uvideo_stream_init_desc: bInterfaceNumber=1 bAlternateSetting=0 done
uvideo_stream_init_desc: bInterfaceNumber=1 bAlternateSetting=1
uvideo_attach: ISOC stream *
uvideo_stream_init_desc: bInterfaceNumber=1 bAlternateSetting=1 done
uvideo_stream_init_desc: bInterfaceNumber=1 bAlternateSetting=2
uvideo_stream_init_desc: bInterfaceNumber=1 bAlternateSetting=2 done
uvideo_stream_init_desc: bInterfaceNumber=1 bAlternateSetting=3
uvideo_stream_init_desc: bInterfaceNumber=1 bAlternateSetting=3 done
video0 at uvideo0: ZB-H62-201026 (0x0c45) Integrated Camera (0x64ab), rev 2.01/10.26, addr 2
[*3]
dmesg from uvideo.c 1.79 with UVIDEO_DEBUG
uvideo0 at uhub2 port 4 configuration 1 interface 0: ZB-H62-201026 (0x0c45) Integrated Camera (0x64ab), rev 2.01/10.26, addr 2
uvideo_attach: non uvc descriptor len=9 type=0x02
uvideo_attach: non uvc descriptor len=8 type=0x0b
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x00 bAlternateSetting=0x00 bNumEndpoints=0x01 bInterfaceClass=0x0e bInterfaceSubClass=0x01 bInterfaceProtocol=0x00 iInterface=0x04
uvideo_attach: VC Interface Header: Len=13 Type=0x24 Subtype=0x01 bcdUVC=256 wTotalLength=109 dwClockFrequency=48000000 bInCollection=1
uvideo_attach: VC Camera Terminal: Len=18 Type=0x24 Subtype=0x02 bTerminalID=1 wTerminalType=201 bAssocTerminal=0 iTerminal=0 wObjectiveFocalLengthMin/Max=0/0 wOcularFocalLength=0 bControlSize=3 bmControls=00000000-00000000-00001010
uvideo_attach: VC Processing Unit: Len=11 Type=0x24 Subtype=0x05 bUnitID=2 bSourceID=1 wMaxMultiplier=16384 bControlSize=2 bmControls=00010111-01111111 iProcessing=0 bmVideoStandards=00011101
uvideo_attach: VC Extension Unit: Len=29 Type=0x24 Subtype=0x06 bUnitID=3 guidExtensionCode=28F03370-6311-4A2E-BA2C-6890EB334016 bNumControls=4 bNrInPins=1 baSourceIDs=2 bControlSize=4 bmControls=00000000-00000000-00000000-00001111 iExtension=0
uvideo_attach: VC Extension Unit: Len=29 Type=0x24 Subtype=0x06 bUnitID=4 guidExtensionCode=63610682-5070-49AB-B8CC-B3855E8D221D bNumControls=20 bNrInPins=1 baSourceIDs=3 bControlSize=4 bmControls=00000000-01110001-11111111-11111111 iExtension=0
uvideo_attach: VC Output Terminal: Len=9 Type=0x24 Subtype=0x03 bTerminalID=5 wTerminalType=101 bAssocTerminal=0 bSourceID=4 iTerminal=0
uvideo_attach: VC Endpoint: Len=7 Type=0x05 bEndpointAddress=0x87 bmAttributes=00000011 wMaxPacketSize=16 bInterval=8
uvideo_attach: VC Interrupt Endpoint: Len=5 Type=0x25 Subtype=0x03 wMaxTransferSize=1029
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x01 bAlternateSetting=0x00 bNumEndpoints=0x00 bInterfaceClass=0x0e bInterfaceSubClass=0x02 bInterfaceProtocol=0x00 iInterface=0x00
uvideo_attach: VS Interface Input Header: Len=15 Type=0x24 Subtype=0x01 bNumFormats=2 wTotalLength=218 bEndpointAddress=129 bmInfo=0 bTerminalLink=5 bStillCaptureMethod=2 bTriggerSupport=1 bTriggerUsage=0 bControlSize=1 00000100
uvideo_attach: VS MJPEG format: Len=11 Type=0x24 Subtype=0x06 bFormatIndex=1 bNumFrameDescriptors=2 bmFlags=0x01 bDefaultFrameIndex=1 bAspectRatioX=0 bAspectRatioY=0 bmInterlaceFlags=0x00 bCopyProtect=0
uvideo_attach: VS [truncated videostream frame mjpeg]
uvideo_attach: VS [truncated videostream frame mjpeg]
uvideo_attach: VS unknown cs interface: len=18 type=0x24 subtype=0x03
uvideo_attach: VS unknown cs interface: len=6 type=0x24 subtype=0x0d
uvideo_attach: VS Format Uncompressed: Len=27 Type=0x24 Subtype=0x04 bFormatIndex=2 bNumFrameDescriptors=2 32595559-00-10-8000-00AA00389B71 bBitsPerPixel=16 bDefaultFrameIndex=1 bAspectRatioX=0 bAspectRatioY=0 bmInterlaceFlags=0x00 bCopyProtect=0
uvideo_attach: VS [truncated videostream frame uncompressed]
uvideo_attach: VS [truncated videostream frame uncompressed]
uvideo_attach: VS unknown cs interface: len=15 type=0x24 subtype=0x03
uvideo_attach: VS unknown cs interface: len=6 type=0x24 subtype=0x0d
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x01 bAlternateSetting=0x01 bNumEndpoints=0x01 bInterfaceClass=0x0e bInterfaceSubClass=0x02 bInterfaceProtocol=0x00 iInterface=0x00
uvideo_attach: VS Endpoint: Len=7 Type=0x05 bEndpointAddress=0x81 bmAttributes=00000101 wMaxPacketSize=1020 bInterval=1
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x01 bAlternateSetting=0x02 bNumEndpoints=0x01 bInterfaceClass=0x0e bInterfaceSubClass=0x02 bInterfaceProtocol=0x00 iInterface=0x00
uvideo_attach: VS Endpoint: Len=7 Type=0x05 bEndpointAddress=0x81 bmAttributes=00000101 wMaxPacketSize=3068 bInterval=1
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x01 bAlternateSetting=0x03 bNumEndpoints=0x01 bInterfaceClass=0x0e bInterfaceSubClass=0x02 bInterfaceProtocol=0x00 iInterface=0x00
uvideo_attach: VS Endpoint: Len=7 Type=0x05 bEndpointAddress=0x81 bmAttributes=00000101 wMaxPacketSize=5116 bInterval=1
uvideo_stream_init: uvideo0 ifaceno=1 vs=0xffff0000fb058200
uvideo_stream_init: probelen=26
uvideo_stream_init_desc: bInterfaceNumber=1 bAlternateSetting=0
uvideo_stream_init_frame_based_format: ifaceno=1 subtype=1 probelen=26
uvideo_stream_init_frame_based_format: mjpeg
uvideo: Adding pixel format 9
uvideo: truncated CS subtype-0x7 descriptor, length 30 < 38uvideo: unimplemented VS CS descriptor len=30 type=0x24 subtype=0x07
uvideo: unimplemented VS CS descriptor len=30 type=0x24 subtype=0x07
uvideo: unimplemented VS CS descriptor len=18 type=0x24 subtype=0x03
uvideo: unimplemented VS CS descriptor len=6 type=0x24 subtype=0x0d
uvideo_stream_init_frame_based_format: ifaceno=1 subtype=1 probelen=26
uvideo_stream_init_frame_based_format: uncompressed
uvideo: Adding pixel format 1
uvideo: truncated CS subtype-0x5 descriptor, length 30 < 38uvideo: unimplemented VS CS descriptor len=30 type=0x24 subtype=0x05
uvideo: unimplemented VS CS descriptor len=30 type=0x24 subtype=0x05
uvideo: unimplemented VS CS descriptor len=15 type=0x24 subtype=0x03
uvideo: unimplemented VS CS descriptor len=6 type=0x24 subtype=0x0d
uvideo_stream_init_desc: bInterfaceNumber=1 bAlternateSetting=0 done
uvideo_stream_init_desc: bInterfaceNumber=1 bAlternateSetting=1
uvideo_attach: ISOC stream *
uvideo_stream_init_desc: bInterfaceNumber=1 bAlternateSetting=1 done
uvideo_stream_init_desc: bInterfaceNumber=1 bAlternateSetting=2
uvideo_stream_init_desc: bInterfaceNumber=1 bAlternateSetting=2 done
uvideo_stream_init_desc: bInterfaceNumber=1 bAlternateSetting=3
uvideo_stream_init_desc: bInterfaceNumber=1 bAlternateSetting=3 done
video0 at uvideo0: ZB-H62-201026 (0x0c45) Integrated Camera (0x64ab), rev 2.01/10.26, addr 2
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
[toc] | [prev] | [next] | [standalone]
| From | mlelstv@serpens.de (Michael van Elst) |
|---|---|
| Date | 2022-05-03 05:52 +0000 |
| Message-ID | <t4qfuu$9cu$1@serpens.de> |
| In reply to | #31957 |
sc.dying@gmail.com writes:
>+uvideo: truncated CS subtype-0x7 descriptor, length 30 < 38uvideo: unimplemented VS CS descriptor len=30 type=0x24 subtype=0x07
> bLength 30
> bDescriptorType 36
> bDescriptorSubtype 7 (FRAME_MJPEG)
> bFrameIndex 1
> bmCapabilities 0x01
> Still image supported
> wWidth 1280
> wHeight 720
> dwMinBitRate 442368000
> dwMaxBitRate 442368000
> dwMaxVideoFrameBufferSize 1843200
> dwDefaultFrameInterval 333333
> bFrameIntervalType 1
> dwFrameInterval( 0) 333333
The descriptors are pretty ugly to parse and the sanity checks
added are neither correct nor sufficient.
In this case, there is a
typedef union {
uvideo_frame_interval_continuous_t continuous;
uvideo_frame_interval_discrete_t discrete;
} uvideo_frame_interval_t;
as a last element where uvideo_frame_interval_discrete_t is even
a variable length array, and all depends on the bFrameIntervalType.
The descriptor isn't padded for all possible types like a C union,
so validating against a sizeof doesn't work.
The result of course is that the formats are considered invalid
and there is no default format which the open routine assumes
to be valid without further checks...
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
[toc] | [prev] | [standalone]
Back to top | Article view | muc.lists.netbsd.current-users
csiph-web