Project

General

Profile

Bug #8624

segfault while importing photos

Added by sjjh - almost 8 years ago. Updated almost 7 years ago.

Status:
Closed: invalid
Priority:
Medium
Assignee:
-
Category:
General
Start date:
Due date:
% Done:

0%

Estimated time:
Affected Version:
git development version
System:
all
bitness:
64-bit
hardware architecture:
amd64/x86

Description

I wanted to import my photos from my hdd (about 40000 jpg's+raw's). As this process run for a very long time, I left the PC runing and went afk. When I came back darktable was closed and I found following entry in dmesg:


I'm running a Lubuntu 11.10 on a thinkpad with an i5 and 4GB ram and installed darktable 1.0 from the ppa.

History

#1 Updated by sebix - Sebastian almost 8 years ago

I had the same issue when importing a local folder and I could reduce the error to JPGs and exclude explicitely DNGs. Could you (sjjh) try this also?

Now for the bugtrace (reported by gdb)

...
Error: Upper boundary of data for directory Photo, entry 0x920a is out of bounds: Offset = 0x000003dc, size = 8, exceeds buffer size by 6 Bytes; adjusting the size

Program received signal SIGSEGV, Segmentation fault.
0x01067dcf in ?? () from /usr/lib/libexiv2.so.11

Backtrace without gdb:
Error: Upper boundary of data for directory Photo, entry 0x920a is out of bounds: Offset = 0x000003dc, size = 8, exceeds buffer size by 6 Bytes; adjusting the size
Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.
/home/sebastian/3385: No such file or directory.
No stack.
an error occured while trying to execute gdb. please check if gdb is installed on your system.
Segmentation fault

My Config is Mint 12, 32bit, intel centrino, 4GB, 1.0 from PPA

#2 Updated by sjjh - almost 8 years ago

When excluding JPGs importing works here too. But as darktable then has to import much less files and directories, I can't tell apart if the crash is caused by a JPG-file, by a directory or by something else. I only have PEFs (Pentax raw files), no DNGs. Here again the last lines before it crashed:

Warning: Directory [[NikonPreview]], entry 0x0201: Data area exceeds data buffer, ignoring it.
Warning: Directory [[NikonPreview]], entry 0x0201: Data area exceeds data buffer, ignoring it.
Warning: Directory [[NikonPreview]], entry 0x0201: Data area exceeds data buffer, ignoring it.
Warning: Directory [[NikonPreview]], entry 0x0201: Data area exceeds data buffer, ignoring it.
Error: Offset of directory Olympus, entry 0x0200 is out of bounds: Offset = 0x00000bf0; truncating the entry
Error: Offset of directory Olympus, entry 0x0204 is out of bounds: Offset = 0x00000c04; truncating the entry
Error: Offset of directory Olympus, entry 0x0205 is out of bounds: Offset = 0x00000c0c; truncating the entry
Error: Offset of directory Olympus, entry 0x0206 is out of bounds: Offset = 0x00000c14; truncating the entry
Error: Offset of directory Olympus, entry 0x0207 is out of bounds: Offset = 0x00000c20; truncating the entry
Error: Offset of directory Olympus, entry 0x0209 is out of bounds: Offset = 0x00000c26; truncating the entry
Error: Offset of directory Olympus, entry 0x1000 is out of bounds: Offset = 0x00000c48; truncating the entry
Error: Offset of directory Olympus, entry 0x1001 is out of bounds: Offset = 0x00000c50; truncating the entry
Error: Offset of directory Olympus, entry 0x1002 is out of bounds: Offset = 0x00000c58; truncating the entry
Error: Offset of directory Olympus, entry 0x1003 is out of bounds: Offset = 0x00000c60; truncating the entry
Error: Offset of directory Olympus, entry 0x1006 is out of bounds: Offset = 0x00000c70; truncating the entry
Error: Offset of directory Olympus, entry 0x100c is out of bounds: Offset = 0x00000c84; truncating the entry
Error: Offset of directory Olympus, entry 0x1011 is out of bounds: Offset = 0x00000d02; truncating the entry
Error: Offset of directory Olympus, entry 0x1012 is out of bounds: Offset = 0x00000d14; truncating the entry
Error: Offset of directory Olympus, entry 0x101a is out of bounds: Offset = 0x00000ca8; truncating the entry
Error: Offset of directory Olympus, entry 0x1023 is out of bounds: Offset = 0x00000ce8; truncating the entry
Error: Offset of directory Olympus, entry 0x1025 is out of bounds: Offset = 0x00000cf4; truncating the entry
Error: Offset of directory Olympus, entry 0x102b is out of bounds: Offset = 0x00000d20; truncating the entry
Error: Offset of directory Olympus, entry 0x1031 is out of bounds: Offset = 0x00000d40; truncating the entry
Error: Offset of directory Olympus, entry 0x1033 is out of bounds: Offset = 0x00000d6c; truncating the entry
Error: Offset of directory Olympus, entry 0x103d is out of bounds: Offset = 0x00001980; truncating the entry
Error: Offset of directory Olympus, entry 0x103e is out of bounds: Offset = 0x00001988; truncating the entry
Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Die Operation ist nicht erlaubt.
/home/simon/20622: Datei oder Verzeichnis nicht gefunden.
No stack.
an error occured while trying to execute gdb. please check if gdb is installed on your system.
Speicherzugriffsfehler

As in your case, notsebix, darktable tries to read an nonexisting directory. I'm not sure why it tries that, where it gets the path from...
BTW it would be helpfull to not only see the directories, but the full pathes when darktable outputs an error for directories, like "Error: Offset of directory Olympus, entry 0x103e...".

#3 Updated by sjjh - almost 8 years ago

Another backtrace with gdb. After creating/exiting some threads these are the last lines before crashing:

Error: Offset of directory Olympus, entry 0x0200 is out of bounds: Offset = 0x00000bf0; truncating the entry
Error: Offset of directory Olympus, entry 0x0204 is out of bounds: Offset = 0x00000c04; truncating the entry
Error: Offset of directory Olympus, entry 0x0205 is out of bounds: Offset = 0x00000c0c; truncating the entry
Error: Offset of directory Olympus, entry 0x0206 is out of bounds: Offset = 0x00000c14; truncating the entry
Error: Offset of directory Olympus, entry 0x0207 is out of bounds: Offset = 0x00000c20; truncating the entry
Error: Offset of directory Olympus, entry 0x0209 is out of bounds: Offset = 0x00000c26; truncating the entry
Error: Offset of directory Olympus, entry 0x1000 is out of bounds: Offset = 0x00000c48; truncating the entry
Error: Offset of directory Olympus, entry 0x1001 is out of bounds: Offset = 0x00000c50; truncating the entry
Error: Offset of directory Olympus, entry 0x1002 is out of bounds: Offset = 0x00000c58; truncating the entry
Error: Offset of directory Olympus, entry 0x1003 is out of bounds: Offset = 0x00000c60; truncating the entry
Error: Offset of directory Olympus, entry 0x1006 is out of bounds: Offset = 0x00000c70; truncating the entry
Error: Offset of directory Olympus, entry 0x100c is out of bounds: Offset = 0x00000c84; truncating the entry
Error: Offset of directory Olympus, entry 0x1011 is out of bounds: Offset = 0x00000d02; truncating the entry
Error: Offset of directory Olympus, entry 0x1012 is out of bounds: Offset = 0x00000d14; truncating the entry
Error: Offset of directory Olympus, entry 0x101a is out of bounds: Offset = 0x00000ca8; truncating the entry
Error: Offset of directory Olympus, entry 0x1023 is out of bounds: Offset = 0x00000ce8; truncating the entry
Error: Offset of directory Olympus, entry 0x1025 is out of bounds: Offset = 0x00000cf4; truncating the entry
Error: Offset of directory Olympus, entry 0x102b is out of bounds: Offset = 0x00000d20; truncating the entry
Error: Offset of directory Olympus, entry 0x1031 is out of bounds: Offset = 0x00000d40; truncating the entry
Error: Offset of directory Olympus, entry 0x1033 is out of bounds: Offset = 0x00000d6c; truncating the entry
Error: Offset of directory Olympus, entry 0x103d is out of bounds: Offset = 0x00001980; truncating the entry
Error: Offset of directory Olympus, entry 0x103e is out of bounds: Offset = 0x00001988; truncating the entry

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffec461700 (LWP 19397)]
0x00007ffff47a5a3b in ?? () from /usr/lib/libexiv2.so.11

The fact that it seems that I don't have a folder called "Olympus" is irritating me a little:

simon@laptop:~/fotos$ find . -name Olympus
simon@laptop:~/fotos$

#4 Updated by sebix - Sebastian almost 8 years ago

Is there an EXIF-Entry/Directory called Olympus? You can check this with exiftool, which is aware of this kind of Segfaults

#5 Updated by sjjh - almost 8 years ago

There are some/many (700?) JPG-files with an entry e.g. for camera with the value "Olympus". Used this command to detect them:

simon@laptop:~/fotos$ find . -name *.jpg -exec exiv2 "{}" \; 2>/dev/null | grep -i Olympus | wc -l
700
simon@laptop:~/fotos$ find . -name *.jpg -exec exiv2 "{}" \; 2>/dev/null | grep -i -A10 -B10 Olympus
# example output for one file:
Dateiname       : ./foo/p1010083.jpg
Dateigröße    : 420454 Bytes
MIME-Typ        : image/jpeg
Bildgrõße     : 1600 x 1200
Kamerahersteller: OLYMPUS OPTICAL CO.,LTD
Kameramodell    : C2Z,D520Z,C220Z 
Zeitstempel des Bildes: 0000:00:00 00:00:00
Bildnummer      : 
Belichtungszeit : 1/400 s
Blende          : F4.8
Belichtungskontrolle: 0 EV
Blitz           : Kein Blitz
Blitzkontrolle  : 0/0
Brennweite      : 12.8 mm
Entfernung des Motivs: 

I tried to import a folder with some of the found files and it worked without any problems. Would it help to identify a file that leads to a crash in exiv2/darktable? And how can I find it (they are spread over many folders)?

#6 Updated by sebix - Sebastian almost 8 years ago

I've uploaded already such a file in #362. There are also more informations on this issue, because this issue was already Topic on the mailinglist.

#7 Updated by Simon Spannagel over 7 years ago

  • Target version changed from 1.0.3 to Candidate for next patch release

#8 Updated by Tobias Ellinghaus over 7 years ago

  • Affected Version set to git development version
  • % Done changed from 0 to 20
  • Priority changed from High to Medium
  • Status changed from New to Incomplete

Does this still happen?

#9 Updated by Simon Spannagel almost 7 years ago

  • System set to all
  • % Done changed from 20 to 0
  • Status changed from Incomplete to Closed: invalid

no answer, closing.

Also available in: Atom PDF

Go to top