* [v3.8-rc1] Multimedia regression, ioctl(17,..)-API changed ? @ 2012-12-23 16:46 Jörg Otte 2012-12-23 17:43 ` Linus Torvalds 2012-12-23 20:37 ` Mauro Carvalho Chehab 0 siblings, 2 replies; 5+ messages in thread From: Jörg Otte @ 2012-12-23 16:46 UTC (permalink / raw) To: linux-kernel; +Cc: linux-media, Laurent Pinchart, Linus Torvalds With kernel v3.8 all multimedia programs under KDE4 don't work (Kubuntu 12.04). They alltogether ( at least Dragonplayer (Mediaplayer), Knotify4 (system-sound), System-Settings-Multimedia,..) are looping forever producing 100% CPU-usage and must be killed. With kernel 3.7 there are no problems. I compared an strace of Dragonplayer under 3.7 and 3.8 kernels. The main difference of both traces are the following corresponding outputs just before looping in v3.8 begins: v3.7: ioctl(17, VIDIOC_ENUMSTD, 0x7fff6cce66a0) = -1 EINVAL (Invalid argument) ioctl(17, VIDIOC_QUERYCTRL, 0x7fff6cce66f0) = -1 EINVAL (Invalid argument) v3.8: ioctl(17, VIDIOC_ENUMSTD, 0x7fffc3be6990) = -1 ENOTTY (Inappropriate ioctl for device) ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file or directory) So error number EINVAL was changed to ENOTTY/ENOENT When Dragonplayer under v3.8 comes to ioctl(17, VIDIOC_QUERYCTRL,...) and sees error number ENOENT instead of EINVAL it loops forever producing 100% CPU usage like so: . . ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file or directory) ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file or directory) ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file or directory) ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file or directory) ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file or directory) ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file or directory) ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file or directory) ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file or directory) ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file or directory) ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file or directory) ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file or directory) . and so on . For me it looks like that KDE4 multimedia is not aware of the new error numbers. Looking through the commits I found driver uvcvideo producing the changed error numbers. commit f0ed2ce840b3a59b587e8aa398538141a86e9588 Author: Laurent Pinchart <laurent.pinchart@ideasonboard.com> [media] uvcvideo: Set error_idx properly for extended controls API failures To verify this I built a v3.8-kernel without uvcvideo (USB_VIDEO_CLASS=n) and the problem disappeared! Simply reverting the commit is not an option for me because then I am left with merge conflicts and I don't know how to resolve. Unfortunately without uvcvideo I lost my usb-camera support. -- Jörg Please CC me I'm not subscribed ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [v3.8-rc1] Multimedia regression, ioctl(17,..)-API changed ? 2012-12-23 16:46 [v3.8-rc1] Multimedia regression, ioctl(17,..)-API changed ? Jörg Otte @ 2012-12-23 17:43 ` Linus Torvalds 2012-12-24 8:52 ` Jörg Otte 2012-12-23 20:37 ` Mauro Carvalho Chehab 1 sibling, 1 reply; 5+ messages in thread From: Linus Torvalds @ 2012-12-23 17:43 UTC (permalink / raw) To: Jörg Otte Cc: Linux Kernel Mailing List, Linux Media Mailing List, Laurent Pinchart Jörg - does current git work for you? It has a patch from Rafael that just reverts the insane error code, and fixed something very similar for him. (I just pushed out, so it might take a few minutes to mirror out to the public sites). Linus On Sun, Dec 23, 2012 at 8:46 AM, Jörg Otte <jrg.otte@gmail.com> wrote: > With kernel v3.8 all multimedia programs under KDE4 don't work (Kubuntu 12.04). > They alltogether ( at least Dragonplayer (Mediaplayer), Knotify4 > (system-sound), > System-Settings-Multimedia,..) are looping forever producing 100% CPU-usage > and must be killed. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [v3.8-rc1] Multimedia regression, ioctl(17,..)-API changed ? 2012-12-23 17:43 ` Linus Torvalds @ 2012-12-24 8:52 ` Jörg Otte 0 siblings, 0 replies; 5+ messages in thread From: Jörg Otte @ 2012-12-24 8:52 UTC (permalink / raw) To: Linus Torvalds Cc: Linux Kernel Mailing List, Linux Media Mailing List, Laurent Pinchart Yes it works, incl. usb-camera. I am now at: 637704cbc95c02d18741b4a6e7a5d2397f8b28ce Merge branch 'i2c-embedded/for-next' of git://git.pengutronix.de/git/wsa/linux Thanks, Jörg 2012/12/23 Linus Torvalds <torvalds@linux-foundation.org>: > Jörg - does current git work for you? It has a patch from Rafael that > just reverts the insane error code, and fixed something very similar > for him. > > (I just pushed out, so it might take a few minutes to mirror out to > the public sites). > > Linus > > On Sun, Dec 23, 2012 at 8:46 AM, Jörg Otte <jrg.otte@gmail.com> wrote: >> With kernel v3.8 all multimedia programs under KDE4 don't work (Kubuntu 12.04). >> They alltogether ( at least Dragonplayer (Mediaplayer), Knotify4 >> (system-sound), >> System-Settings-Multimedia,..) are looping forever producing 100% CPU-usage >> and must be killed. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [v3.8-rc1] Multimedia regression, ioctl(17,..)-API changed ? 2012-12-23 16:46 [v3.8-rc1] Multimedia regression, ioctl(17,..)-API changed ? Jörg Otte 2012-12-23 17:43 ` Linus Torvalds @ 2012-12-23 20:37 ` Mauro Carvalho Chehab 2012-12-24 8:56 ` Jörg Otte 1 sibling, 1 reply; 5+ messages in thread From: Mauro Carvalho Chehab @ 2012-12-23 20:37 UTC (permalink / raw) To: Jörg Otte Cc: linux-kernel, linux-media, Laurent Pinchart, Linus Torvalds Hi Jörg, Em Sun, 23 Dec 2012 17:46:07 +0100 Jörg Otte <jrg.otte@gmail.com> escreveu: > With kernel v3.8 all multimedia programs under KDE4 don't work (Kubuntu 12.04). > They alltogether ( at least Dragonplayer (Mediaplayer), Knotify4 > (system-sound), > System-Settings-Multimedia,..) are looping forever producing 100% CPU-usage > and must be killed. > > With kernel 3.7 there are no problems. Do you have any other non-uvc device to test? > I compared an strace of Dragonplayer under 3.7 and 3.8 kernels. The > main difference > of both traces are the following corresponding outputs just before > looping in v3.8 > begins: > > v3.7: > ioctl(17, VIDIOC_ENUMSTD, 0x7fff6cce66a0) = -1 EINVAL (Invalid argument) This ioctl returns -ENOTTY already with other media drivers on v3.7. > ioctl(17, VIDIOC_QUERYCTRL, 0x7fff6cce66f0) = -1 EINVAL (Invalid argument) This change is new, and, AFAIKT, only UVC returns -ENOENT on 3.8-rc1. This is likely the source of the troubles. > > v3.8: > ioctl(17, VIDIOC_ENUMSTD, 0x7fffc3be6990) = -1 ENOTTY (Inappropriate > ioctl for device) > ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file > or directory) > > So error number EINVAL was changed to ENOTTY/ENOENT > > When Dragonplayer under v3.8 comes to ioctl(17, VIDIOC_QUERYCTRL,...) > and sees error > number ENOENT instead of EINVAL it loops forever producing 100% CPU > usage like so: > > . > . > ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file > or directory) > ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file > or directory) > ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file > or directory) > ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file > or directory) > ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file > or directory) > ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file > or directory) > ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file > or directory) > ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file > or directory) > ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file > or directory) > ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file > or directory) > ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file > or directory) Yeah, it started an endless loop here, likely because kde4 seems to be expecting either 0 or -EINVAL error code for VIDIOC_QUERYCTRL. It should be noticed that there are other valid error codes here. For example, if this ioctl is not implemented, -ENOTTY may also be returned. Fortunately, almost all drivers do implement this ioctl. The expected return error codes for this ioctl are described at: http://linuxtv.org/downloads/v4l-dvb-apis/vidioc-queryctrl.html In practice, except for the uvc driver, the current return codes are EINVAL/EACCES/ENOTTY. > . > and so on > . > > For me it looks like that KDE4 multimedia is not aware of the new error numbers. > > Looking through the commits I found driver uvcvideo producing the changed > error numbers. > > commit f0ed2ce840b3a59b587e8aa398538141a86e9588 > Author: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > [media] uvcvideo: Set error_idx properly for extended controls API failures > > To verify this I built a v3.8-kernel without uvcvideo (USB_VIDEO_CLASS=n) > and the problem disappeared! > > Simply reverting the commit is not an option for me because then I am left > with merge conflicts and I don't know how to resolve. > > Unfortunately without uvcvideo I lost my usb-camera support. Rafael made a patch fixing it, and Linus should be applying it. Regards, Mauro ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [v3.8-rc1] Multimedia regression, ioctl(17,..)-API changed ? 2012-12-23 20:37 ` Mauro Carvalho Chehab @ 2012-12-24 8:56 ` Jörg Otte 0 siblings, 0 replies; 5+ messages in thread From: Jörg Otte @ 2012-12-24 8:56 UTC (permalink / raw) To: Mauro Carvalho Chehab Cc: linux-kernel, linux-media, Laurent Pinchart, Linus Torvalds 2012/12/23 Mauro Carvalho Chehab <mchehab@redhat.com>: > Hi Jörg, > > Em Sun, 23 Dec 2012 17:46:07 +0100 > Jörg Otte <jrg.otte@gmail.com> escreveu: > >> With kernel v3.8 all multimedia programs under KDE4 don't work (Kubuntu 12.04). >> They alltogether ( at least Dragonplayer (Mediaplayer), Knotify4 >> (system-sound), >> System-Settings-Multimedia,..) are looping forever producing 100% CPU-usage >> and must be killed. >> >> With kernel 3.7 there are no problems. > > Do you have any other non-uvc device to test? No I haven't. Thanks, Jörg ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-12-24 8:57 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-12-23 16:46 [v3.8-rc1] Multimedia regression, ioctl(17,..)-API changed ? Jörg Otte 2012-12-23 17:43 ` Linus Torvalds 2012-12-24 8:52 ` Jörg Otte 2012-12-23 20:37 ` Mauro Carvalho Chehab 2012-12-24 8:56 ` Jörg Otte
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox