Bug 948628 - Shotwell 0.14 sefgaults when trying to process raw CRW file.
Summary: Shotwell 0.14 sefgaults when trying to process raw CRW file.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: LibRaw
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-04 21:08 UTC by Dawid Zamirski
Modified: 2013-04-23 00:25 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-13 19:24:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
The backtracke for 0.14.1 (6.45 KB, text/plain)
2013-04-05 01:00 UTC, Dawid Zamirski
no flags Details
A sample photo that causes the crash. (5.40 MB, application/octet-stream)
2013-04-05 01:03 UTC, Dawid Zamirski
no flags Details

Description Dawid Zamirski 2013-04-04 21:08:59 UTC
Description of problem:
Shotwell 0.14 crashes with segmentation fault on my F19 TC3 Alpha system (with all updates installed) when trying to import a folder containing RAW files in CRW format.

Version-Release number of selected component (if applicable):
shotwell-0.14.0-2.fc19.x86_64
LibRaw-0.14.7-2.fc19.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Start Shotwell
2. Try to import folder that has RAW photos.

  
Actual results:
Segmentation fault

Expected results:
Should work as it used to :)

Additional info:
[maners@phenom ~]$ gdb shotwell
GNU gdb (GDB) Fedora (7.5.91.20130323-14.fc19)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/shotwell...Reading symbols from /usr/lib/debug/usr/bin/shotwell.debug...done.
done.
(gdb) run
Starting program: /usr/bin/shotwell 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff7b41700 (LWP 29142)]
[New Thread 0x7ffff4d6d700 (LWP 29143)]
[New Thread 0x7fffdcb45700 (LWP 29144)]
[New Thread 0x7fffd7fff700 (LWP 29145)]
[New Thread 0x7fffd77fe700 (LWP 29146)]
[New Thread 0x7fffd6ffd700 (LWP 29147)]
[New Thread 0x7fffd67fc700 (LWP 29148)]
[New Thread 0x7fffd5df3700 (LWP 29149)]
[New Thread 0x7fffd55f2700 (LWP 29150)]
[Thread 0x7fffd5df3700 (LWP 29149) exited]
[New Thread 0x7fffd5df3700 (LWP 29158)]
[New Thread 0x7fffbbfff700 (LWP 29159)]
[Thread 0x7fffd55f2700 (LWP 29150) exited]
[Thread 0x7fffd5df3700 (LWP 29158) exited]
[New Thread 0x7fffd5df3700 (LWP 29160)]
[New Thread 0x7fffd55f2700 (LWP 29161)]
[New Thread 0x7fffbb7fe700 (LWP 29162)]
[New Thread 0x7fffbaffd700 (LWP 29163)]
[New Thread 0x7fffba7fc700 (LWP 29164)]
[New Thread 0x7fffb9ffb700 (LWP 29165)]
[New Thread 0x7fffb97fa700 (LWP 29166)]
[Thread 0x7fffd5df3700 (LWP 29160) exited]
[Thread 0x7fffb9ffb700 (LWP 29165) exited]
[Thread 0x7fffd55f2700 (LWP 29161) exited]
[Thread 0x7fffbaffd700 (LWP 29163) exited]
[Thread 0x7fffb97fa700 (LWP 29166) exited]
[Thread 0x7fffbb7fe700 (LWP 29162) exited]
[Thread 0x7fffba7fc700 (LWP 29164) exited]
[New Thread 0x7fffba7fc700 (LWP 29167)]
[New Thread 0x7fffbb7fe700 (LWP 29168)]
[New Thread 0x7fffb97fa700 (LWP 29169)]
[New Thread 0x7fffbaffd700 (LWP 29170)]
[Thread 0x7fffba7fc700 (LWP 29167) exited]
[Thread 0x7fffbaffd700 (LWP 29170) exited]
[Thread 0x7fffbb7fe700 (LWP 29168) exited]
[Thread 0x7fffbbfff700 (LWP 29159) exited]
[New Thread 0x7fffbbfff700 (LWP 29171)]
[New Thread 0x7fffbb7fe700 (LWP 29172)]
[New Thread 0x7fffbaffd700 (LWP 29173)]
[New Thread 0x7fffba7fc700 (LWP 29174)]
[New Thread 0x7fffd5cf3700 (LWP 29175)]
[New Thread 0x7fffb9ffb700 (LWP 29176)]
[New Thread 0x7fffb8ff9700 (LWP 29177)]
[Thread 0x7fffbbfff700 (LWP 29171) exited]
[Thread 0x7fffb9ffb700 (LWP 29176) exited]
[Thread 0x7fffd5cf3700 (LWP 29175) exited]
[Thread 0x7fffb97fa700 (LWP 29169) exited]
[Thread 0x7fffbaffd700 (LWP 29173) exited]
[Thread 0x7fffbb7fe700 (LWP 29172) exited]
[New Thread 0x7fffbb7fe700 (LWP 29178)]
[Thread 0x7fffb8ff9700 (LWP 29177) exited]
[New Thread 0x7fffb8ff9700 (LWP 29179)]
[New Thread 0x7fffbaffd700 (LWP 29180)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffb8ff9700 (LWP 29179)]
0x0000003a3a82a9a0 in LibRaw::adobe_coeff (this=this@entry=0x7fffac2bb000, 
    p_make=p_make@entry=0x3a3a85c05b "Canon", 
    p_model=p_model@entry=0x3a3a85c58a "EOS 300D")
    at internal/dcraw_common.cpp:7284
7284		  cam_xyz[0][j] = table[i].trans[j] / 10000.0;
(gdb) bt
#0  0x0000003a3a82a9a0 in LibRaw::adobe_coeff (this=this@entry=0x7fffac2bb000, 
    p_make=p_make@entry=0x3a3a85c05b "Canon", 
    p_model=p_model@entry=0x3a3a85c58a "EOS 300D")
    at internal/dcraw_common.cpp:7284
#1  0x0000003a3a82ed7e in LibRaw::identify (this=this@entry=0x7fffac2bb000)
    at internal/dcraw_common.cpp:7963
#2  0x0000003a3a8536a0 in LibRaw::open_datastream (
    this=this@entry=0x7fffac2bb000, stream=stream@entry=0x7fffac0bea60)
    at src/libraw_cxx.cpp:669
#3  0x0000003a3a853b20 in LibRaw::open_file (this=0x7fffac2bb000, 
    fname=fname@entry=0x7fffac2b6690 "/home/maners/Pictures/2007-06-01--18.50.31/00048.crw", max_buf_size=max_buf_size@entry=262144000)
    at src/libraw_cxx.cpp:605
#4  0x0000003a3a8598c6 in libraw_open_file (lr=<optimized out>, 
    file=file@entry=0x7fffac2b6690 "/home/maners/Pictures/2007-06-01--18.50.31/00048.crw") at src/libraw_c_api.cpp:69
#5  0x00000000004d153d in graw_processor_open_file (self=self@entry=0x3983360, 
    filename=filename@entry=0x7fffac2b6690 "/home/maners/Pictures/2007-06-01--18.50.31/00048.crw", error=error@entry=0x7fffb8ff8938)
    at /usr/src/debug/shotwell-0.14.0/src/photos/GRaw.vala:203
#6  0x00000000004d669b in raw_sniffer_real_sniff (base=<optimized out>, 
    error=0x7fffb8ff89e8)
    at /usr/src/debug/shotwell-0.14.0/src/photos/RawSupport.vala:173
---Type <return> to continue, or q <return> to quit---
#7  0x00000000004c6f31 in photo_file_interrogator_interrogate (
    self=self@entry=0x7fffa4342680, error=error@entry=0x7fffb8ff8a78)
    at /usr/src/debug/shotwell-0.14.0/src/photos/PhotoFileSniffer.vala:81
#8  0x00000000005cbbf6 in photo_prepare_for_import (
    params=params@entry=0x7fffd000f500)
    at /usr/src/debug/shotwell-0.14.0/src/Photo.vala:1108
#9  0x00000000005f7e76 in prepared_file_import_job_real_execute (
    base=<optimized out>)
    at /usr/src/debug/shotwell-0.14.0/src/BatchImport.vala:1927
#10 0x000000000047c9a8 in workers_thread_start (ignored=<optimized out>, 
    self=0x31d9700)
    at /usr/src/debug/shotwell-0.14.0/src/threads/Workers.vala:94
#11 _workers_thread_start_gfunc (data=<optimized out>, self=0x31d9700)
    at /usr/src/debug/shotwell-0.14.0/src/threads/Workers.vala:31
#12 0x0000003a29a6cc56 in g_thread_pool_thread_proxy (data=<optimized out>)
    at gthreadpool.c:309
#13 0x0000003a29a6c295 in g_thread_proxy (data=0x2e29e30) at gthread.c:798
#14 0x0000003a27607c53 in start_thread (arg=0x7fffb8ff9700)
    at pthread_create.c:308
#15 0x0000003a272f4ecd in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Comment 1 Thomas Moschny 2013-04-04 21:40:32 UTC
Can you check whether this still happens with 0.14.1?

https://admin.fedoraproject.org/updates/shotwell-0.14.1-1.fc19

Comment 2 Dawid Zamirski 2013-04-05 00:46:02 UTC
Hi Thomas,

I've just tried the 0.14.1 and it has the same issue. Do you need a new gdb backtrace for this version?

Comment 3 Dawid Zamirski 2013-04-05 01:00:38 UTC
Created attachment 731796 [details]
The backtracke for 0.14.1

This is the backtrace from 0.14.1

Comment 4 Dawid Zamirski 2013-04-05 01:03:42 UTC
Created attachment 731797 [details]
A sample photo that causes the crash.

Comment 5 Siddhesh Poyarekar 2013-04-05 04:46:34 UTC
Looks like a LibRaw bug.

Comment 6 Dawid Zamirski 2013-04-11 06:50:14 UTC
I think I have found the bug in LibRaw and fixed it. See:

https://github.com/LibRaw/LibRaw/pull/17

This is of course against head branch which is LibRaw 0.15 I believe so it should be back ported to Fedora's 0.14 version. I have patched and rebuilt the Fedora's rpm on my local PC and it seems to solve the problem.

Comment 7 Michel Lind 2013-04-11 07:51:39 UTC
Reassigning to LibRaw

Comment 8 Fedora Update System 2013-04-11 13:14:07 UTC
LibRaw-0.14.7-3.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/LibRaw-0.14.7-3.fc19

Comment 9 Fedora Update System 2013-04-11 13:14:23 UTC
LibRaw-0.14.7-3.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/LibRaw-0.14.7-3.fc18

Comment 10 Fedora Update System 2013-04-11 16:36:21 UTC
Package LibRaw-0.14.7-3.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing LibRaw-0.14.7-3.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-5377/LibRaw-0.14.7-3.fc19
then log in and leave karma (feedback).

Comment 11 Dawid Zamirski 2013-04-11 19:26:03 UTC
Please drop this patch as it's not correct. Strangely I rebuilt this package locally without the patch and it does not segfault anymore.. I'm not sure what could be the cause in the earlier build.

Comment 12 Fedora Update System 2013-04-11 19:52:46 UTC
LibRaw-0.14.7-4.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/LibRaw-0.14.7-4.fc19

Comment 13 Fedora Update System 2013-04-11 19:52:57 UTC
LibRaw-0.14.7-4.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/LibRaw-0.14.7-4.fc18

Comment 14 Dawid Zamirski 2013-04-11 21:16:30 UTC
Thank you, this build fixes the issue for me.

Comment 15 Fedora Update System 2013-04-20 19:50:07 UTC
LibRaw-0.14.7-4.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2013-04-23 00:25:03 UTC
LibRaw-0.14.7-4.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.