Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 401865 - media-libs/libv4l-0.8.5 doesn't disable fancy upsampling for media-libs/jpeg-7 and up (was: crashes on gspca_sunplus camera over v4l2)
Summary: media-libs/libv4l-0.8.5 doesn't disable fancy upsampling for media-libs/jpeg-...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alexis Ballier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-01 23:44 UTC by Denilson Sá Maia
Modified: 2012-02-02 17:02 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge_info.txt,5.84 KB, text/plain)
2012-02-01 23:45 UTC, Denilson Sá Maia
Details
v4l-info (v4l-info.txt,1.97 KB, text/plain)
2012-02-01 23:46 UTC, Denilson Sá Maia
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Denilson Sá Maia 2012-02-01 23:44:48 UTC
I noticed that www-plugins/google-talkplugin-2.6.1.0 and media-video/cheese-2.32.0 crashes upon reading data from a gspca_sunplus webcam.

$ lsusb
Bus 004 Device 011: ID 04fc:504b Sunplus Technology Co., Ltd Aiptek Mega PockerCam 1.3/Maxell MaxPocket LE 1.3


$ gdb cheese
GNU gdb (Gentoo 7.3.1 p2) 7.3.1
[...]
Reading symbols from /usr/bin/cheese...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/cheese 
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffe7c5f700 (LWP 3181)]
[New Thread 0x7fffe050e700 (LWP 3184)]
[New Thread 0x7fffdfd0d700 (LWP 3185)]
[New Thread 0x7fffdbdce700 (LWP 3186)]
[New Thread 0x7fffdb5cd700 (LWP 3187)]
[New Thread 0x7fffdadcc700 (LWP 3188)]
[New Thread 0x7fffd85cb700 (LWP 3189)]
[Thread 0x7fffe050e700 (LWP 3184) exited]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd85cb700 (LWP 3189)]
0x00007fffded91732 in jpeg_idct_16x16 () from /usr/lib64/libjpeg.so.8
(gdb) bt
#0  0x00007fffded91732 in jpeg_idct_16x16 () from /usr/lib64/libjpeg.so.8
#1  0x00007fffded7c4d7 in decompress_onepass () from /usr/lib64/libjpeg.so.8
#2  0x00007fffded79ead in jpeg_read_raw_data () from /usr/lib64/libjpeg.so.8
#3  0x00007fffdefb9612 in decode_libjpeg_h_samp2 () from /usr/lib64/libv4lconvert.so.0
#4  0x00007fffdefb9bb6 in v4lconvert_decode_jpeg_libjpeg () from /usr/lib64/libv4lconvert.so.0
#5  0x00007fffdefa99dc in v4lconvert_convert_pixfmt () from /usr/lib64/libv4lconvert.so.0
#6  0x00007fffdefaacd0 in v4lconvert_convert () from /usr/lib64/libv4lconvert.so.0
#7  0x00007fffdf21f7f4 in v4l2_dequeue_and_convert () from /usr/lib64/libv4l2.so.0
#8  0x00007fffdf220c5f in v4l2_ioctl () from /usr/lib64/libv4l2.so.0
#9  0x00007fffdfab54df in gst_v4l2_buffer_pool_dqbuf (pool=0xc26cf0) at gstv4l2bufferpool.c:545
#10 0x00007fffdfabd758 in gst_v4l2src_grab_frame (v4l2src=0x9ba5c0, buf=0x7fffd85ca938) at v4l2src_calls.c:129
#11 0x00007fffdfab77db in gst_v4l2src_get_mmap (v4l2src=0x9ba5c0, buf=0x7fffd85cab58) at gstv4l2src.c:903
#12 0x00007fffdfab6364 in gst_v4l2src_create (src=0x9ba5c0, buf=0x7fffd85cab58) at gstv4l2src.c:952
#13 0x00007fffdf885f0a in ?? () from /usr/lib64/libgstbase-0.10.so.0
#14 0x00007fffdf8874d3 in ?? () from /usr/lib64/libgstbase-0.10.so.0
#15 0x00007ffff54b7c8d in ?? () from /usr/lib64/libgstreamer-0.10.so.0
#16 0x00007ffff4d2a5c6 in ?? () from /usr/lib64/libglib-2.0.so.0
#17 0x00007ffff4d28126 in ?? () from /usr/lib64/libglib-2.0.so.0
#18 0x00007ffff4aa5c2c in start_thread () from /lib64/libpthread.so.0
#19 0x00007ffff47ed7bd in clone () from /lib64/libc.so.6


Upon trying to use google talk inside Chrome, older version www-plugins/google-talkplugin-2.5.6.0-r1 works correctly, while version 2.6.1.0 is buggy. Going to "Gmail → Settings → Chat → Verify settings", the video is shown as black (i.e. no actual video from the camera is shown). Trying to start or receive a video call fails shortly after the call is initiated, probably because of the same crash as cheese.


These three programs do work without crashes (probably because they use a different codepath or a different configuration):

$ mplayer tv://
$ vlc v4l2://
$ qv4l2


So, I'm not sure if media-libs/jpeg is buggy, or if media-plugins/gst-plugins-v4l2-0.10.30 must be updated, or whatever other reason.

It started happening after the media-libs/jpeg update from 8b to 8c-r1, but now I've downgraded it to 8b and it also crashes. So probably this is unrelated to the update. 

There is a very similar bug report at Debian (at least when looking at the backtrace):
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=647273

I'll attach emerge --info shortly
Comment 1 Denilson Sá Maia 2012-02-01 23:45:58 UTC
Created attachment 300733 [details]
emerge --info
Comment 2 Denilson Sá Maia 2012-02-01 23:46:16 UTC
Created attachment 300735 [details]
v4l-info
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2012-02-02 15:51:52 UTC
The fancy upsampling is a jpeg-7 porting bug and the problem is in libv4l, not jpeg

We need to do what Debian did in libv4l, add patch to it disabling fancy upsampling. We have previously done this in cinelerra, transcode, etc. in Portage
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2012-02-02 17:02:19 UTC
+*libv4l-0.8.5-r1 (02 Feb 2012)
+
+  02 Feb 2012; Samuli Suominen <ssuominen@gentoo.org> +libv4l-0.8.5-r1.ebuild,
+  +files/libv4l-0.8.5-disable_fancy_upsampling.patch:
+  Since JPEG 7.x the fancy upsampling has been enabled by default and should
+  explicitely be disabled in apps not supporting it wrt #401865 by Denilson Sá