Bug 679256

Summary: [abrt] geeqie-1.0-4.fc14: file_cache_get: assertion failed: (fc && fd) (SIGABRT)
Product: [Fedora] Fedora Reporter: Dariusz Garbowski <thuforuk>
Component: geeqieAssignee: Michael Schwendt <bugs.michael>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 14CC: bugs.michael
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Unspecified   
URL: https://sourceforge.net/tracker/?func=detail&aid=3189129&group_id=222125&atid=1054680
Whiteboard: abrt_hash:df204d8863ed5bc2a95f439e059fb044e5b6f9fa
Fixed In Version: geeqie-1.0-9.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-13 21:19:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
File: backtrace none

Description Dariusz Garbowski 2011-02-22 03:54:29 UTC
abrt version: 1.1.17
architecture: x86_64
Attached file: backtrace, 11833 bytes
cmdline: geeqie
comment: After restarting Geeqie I found out that the new directory has been created.
component: geeqie
Attached file: coredump, 9998336 bytes
crash_function: file_cache_get
executable: /usr/bin/geeqie
kernel: 2.6.35.11-83.fc14.x86_64
package: geeqie-1.0-4.fc14
rating: 4
reason: Process /usr/bin/geeqie was killed by signal 6 (SIGABRT)
release: Fedora release 14 (Laughlin)
time: 1298346358
uid: 1001

How to reproduce
-----
1.Using List View of directories attempted to create new directory (right mouse button -> New Folder...).
2.Entered the name of the new directory and pressed Return key.
3.Geeqie crashed.

Comment 1 Dariusz Garbowski 2011-02-22 03:54:30 UTC
Created attachment 480046 [details]
File: backtrace

Comment 2 Michael Schwendt 2011-02-22 10:47:50 UTC
> #5  0x000000000044f056 in file_cache_put (fc=0x0, fd=0x29d0690, size=1)
> at filecache.c:110

The fc=0x0 looks suspicious as it won't work, because the called functions require a valid FileCacheData pointer:

| void file_cache_put(FileCacheData *fc, FileData *fd, gulong size)
| {
| 	FileCacheEntry *fe;
| 
| 	if (file_cache_get(fc, fd)) return;

| gboolean file_cache_get(FileCacheData *fc, FileData *fd)
| {
| 	GList *work;
|	
| 	g_assert(fc && fd);

The "New folder" test-case isn't 100%, though. Here it doesn't crash. It's likely the same or similar race-condition in directory loading/refreshing.

Comment 3 Michael Schwendt 2011-02-22 11:01:01 UTC
There's something missing in the backtrace (for reasons I will need to track down, too).

The code path between image-load.c and file_cache_put() enters exif-common.c, where it chooses not to create a new FileCache if a file path is not readable. Later, however, it expects the FileCache to be usable and crashes on the 0 ptr:

| ExifData *exif_read_fd(FileData *fd)
| {
|	gchar *sidecar_path;
|
| 	if (!fd || !is_readable_file(fd->path)) return NULL;
|	
| 	if (!exif_cache) exif_cache = file_cache_new(exif_release_cb, 4);

| void exif_free_fd(FileData *fd, ExifData *exif)
| {
| 	if (!fd) return;
| 	g_assert(fd->exif == exif);
|	
| 	file_cache_put(exif_cache, fd, 1);

Comment 4 Fedora Update System 2011-03-05 10:44:52 UTC
geeqie-1.0-9.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/geeqie-1.0-9.fc14

Comment 5 Fedora Update System 2011-03-05 23:02:31 UTC
geeqie-1.0-9.fc14 has been pushed to the Fedora 14 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 geeqie'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/geeqie-1.0-9.fc14

Comment 6 Fedora Update System 2011-03-13 21:19:35 UTC
geeqie-1.0-9.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.