Bug 572966

Summary: SIGSEGV within ucil_alsa_* when attempted to record a video
Product: [Fedora] Fedora Reporter: Kamil Dudka <kdudka>
Component: libucilAssignee: Kamil Dudka <kdudka>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 12CC: kdudka, redhat-bugzilla, sun-go-down
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libucil-0.9.8-2.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 635644 (view as bug list) Environment:
Last Closed: 2010-06-21 21:37:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 635644    
Attachments:
Description Flags
proposed fix
none
proposed fix V2
none
proposed fix V3
none
check the result of ucil_alsa_init() none

Description Kamil Dudka 2010-03-12 13:42:46 UTC
Created attachment 399648 [details]
proposed fix

Version-Release number of selected component (if applicable):
0.9.8-1

How reproducible:
100% on my configuration

Steps to Reproduce:
1. gdb -q --args ucview
2. run
3. start to record the video
  
Actual results:
Program received signal SIGSEGV, Segmentation fault.
(gdb) l
189     long ucil_alsa_fill_audio_buffer( void *_data )
190     {
191        alsa_data_t *data = _data;
192        long nread;
193
194        if( data->buff_fill >= ( sizeof( data->audio_buffer ) / sizeof( short ) - 1 ) )
195        {
196           return 0;
197        }
198        
(gdb) bt
#0  ucil_alsa_fill_audio_buffer (_data=0x0) at ucil_alsa.c:194
#1  fetch_and_process_audio (vobj=0x96ae10, ...) at ucil_theora.c:480
#2  ucil_theora_encode_thread (vobj=<value optimized out>) at ucil_theora.c:659
#3  start_thread (arg=<value optimized out>) at pthread_create.c:297
#4  clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

Expected results:
no crash

Additional info:
patch attached

Comment 1 Kamil Dudka 2010-03-12 14:30:23 UTC
Created attachment 399657 [details]
proposed fix V2

now got the same crash on yet another ucil_alsa_*() function ... an amended patch attached

Comment 2 Kamil Dudka 2010-03-12 14:37:41 UTC
Created attachment 399664 [details]
proposed fix V3

Oops, the same patch as V2, but this one can be compiled :-)

Comment 3 Kamil Dudka 2010-03-12 15:28:30 UTC
Comment on attachment 399664 [details]
proposed fix V3

Still not perfect.  With the patch applied, it crashes within
theora_encode_YUVin() when the recording is stopped.

Comment 4 Kamil Dudka 2010-03-12 16:32:40 UTC
Created attachment 399694 [details]
check the result of ucil_alsa_init()

Comment 5 Kamil Dudka 2010-06-02 10:01:19 UTC
Patch proposed upstream:

https://bugs.launchpad.net/unicap/+bug/588658

Comment 6 Fedora Update System 2010-06-02 16:06:06 UTC
libucil-0.9.8-2.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/libucil-0.9.8-2.fc12

Comment 7 Fedora Update System 2010-06-02 16:06:39 UTC
libucil-0.9.8-2.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/libucil-0.9.8-2.fc13

Comment 8 Robert Scheck 2010-06-03 11:29:53 UTC
*** Bug 599489 has been marked as a duplicate of this bug. ***

Comment 9 Fedora Update System 2010-06-03 18:07:44 UTC
libucil-0.9.8-2.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update libucil'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/libucil-0.9.8-2.fc13

Comment 10 Fedora Update System 2010-06-03 18:14:22 UTC
libucil-0.9.8-2.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update libucil'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/libucil-0.9.8-2.fc12

Comment 11 Fedora Update System 2010-06-21 21:37:07 UTC
libucil-0.9.8-2.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2010-06-21 21:43:47 UTC
libucil-0.9.8-2.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.