Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1170552

Summary: [abrt] [CamelDB] Use-after-free on DB close with pending sync request
Product: Red Hat Enterprise Linux 7 Reporter: Jiri Koten <jkoten>
Component: evolution-data-serverAssignee: Matthew Barnes <mbarnes>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: high    
Version: 7.1CC: mcrha, vbenes
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:a29c0eae90cea0386f544983ab720977506ec348
Fixed In Version: evolution-data-server-3.8.5-33.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 13:33:57 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:
Attachments:
Description Flags
File: backtrace
none
File: core_backtrace
none
File: dso_list
none
File: maps
none
File: open_fds
none
File: proc_pid_status
none
File: var_log_messages
none
camel debug
none
evolution-data-server-3.8.5-cameldb-track-pending-syncs.patch none

Description Jiri Koten 2014-12-04 10:18:06 UTC
Description of problem:
Restore backup created on rhel6 (evolution-2.32).
Evo crashed after the dialog of Migration from mbox to Maildir.

Version-Release number of selected component:
evolution-3.8.5-29.el7

Additional info:
reporter:       libreport-2.1.11
backtrace_rating: 4
cmdline:        evolution
crash_function: call_old_file_Sync
executable:     /usr/bin/evolution
kernel:         3.10.0-206.el7.x86_64
runlevel:       N 5
type:           CCpp

Truncated backtrace:
Thread no. 1 (3 frames)
 #0 call_old_file_Sync at camel-db.c:67
 #1 sync_request_thread_cb at camel-db.c:94
 #3 g_thread_proxy at gthread.c:764

Comment 1 Jiri Koten 2014-12-04 10:18:08 UTC
Created attachment 964552 [details]
File: backtrace

Comment 2 Jiri Koten 2014-12-04 10:18:09 UTC
Created attachment 964553 [details]
File: core_backtrace

Comment 3 Jiri Koten 2014-12-04 10:18:11 UTC
Created attachment 964554 [details]
File: dso_list

Comment 4 Jiri Koten 2014-12-04 10:18:13 UTC
Created attachment 964555 [details]
File: maps

Comment 5 Jiri Koten 2014-12-04 10:18:14 UTC
Created attachment 964556 [details]
File: open_fds

Comment 6 Jiri Koten 2014-12-04 10:18:15 UTC
Created attachment 964557 [details]
File: proc_pid_status

Comment 7 Jiri Koten 2014-12-04 10:18:16 UTC
Created attachment 964558 [details]
File: var_log_messages

Comment 8 Jiri Koten 2014-12-04 10:20:19 UTC
Created attachment 964568 [details]
camel debug

debug output of CAMEL_DEBUG=all

Comment 9 Milan Crha 2014-12-05 06:08:20 UTC
Thanks for a bug report. Weird it didn't strike earlier. The only related change I see in the upstream version is for [1], but that is already part of 3.8.5 in RHEL, thus this might be something new (as mentioned in bug #1103823).

[1] https://bugzilla.gnome.org/show_bug.cgi?id=688926

Comment 10 Milan Crha 2014-12-05 07:20:15 UTC
Evolution doesn't crash to me, but when I run the migration under valgrind, then I see this, which is just your crash and explains what happened:

 Invalid read of size 8
    at 0x80F07B8: call_old_file_Sync (camel-db.c:67)
    by 0x80F0887: sync_request_thread_cb (camel-db.c:94)
    by 0xFDCD05B: ??? (in /usr/lib64/libglib-2.0.so.0.4000.0)
    by 0xFDCC6D4: ??? (in /usr/lib64/libglib-2.0.so.0.4000.0)
    by 0xA70CDF4: start_thread (in /usr/lib64/libpthread-2.17.so)
    by 0x1018601C: clone (in /usr/lib64/libc-2.17.so)
  Address 0x3a7349d8 is 392 bytes inside a block of size 712 free'd
    at 0x4C2ACD7: free (in /usr/lib64/valgrind/vgpreload_memcheck-...
    by 0x946602D: sqlite3_free (in /usr/lib64/libsqlite3.so.0.8.6)
    by 0x949C45C: ??? (in /usr/lib64/libsqlite3.so.0.8.6)
    by 0x94AA36A: ??? (in /usr/lib64/libsqlite3.so.0.8.6)
    by 0x94AA4E7: ??? (in /usr/lib64/libsqlite3.so.0.8.6)
    by 0x94AA9AC: ??? (in /usr/lib64/libsqlite3.so.0.8.6)
    by 0x80F1EE9: camel_db_close (camel-db.c:610)
    by 0x8177C77: store_finalize (camel-store.c:324)
    by 0xFB21D4A: g_object_unref (in /usr/lib64/libgobject-2.0.so.0.4000.0)
    by 0xFD956E2: ??? (in /usr/lib64/libglib-2.0.so.0.4000.0)
    by 0xFD96420: g_hash_table_remove_all (in /usr/lib64/libglib-...
    by 0x8168722: session_dispose (camel-session.c:343)
    by 0xFB21C67: g_object_unref (in /usr/lib64/libgobject-2.0.so.0.4000.0)
    by 0x4048D3: e_convert_local_mail (e-convert-local-mail.c:324)
    by 0x403D79: main (main.c:678)
 
 Invalid read of size 8
    at 0x80F07BC: call_old_file_Sync (camel-db.c:67)
    by 0x80F0887: sync_request_thread_cb (camel-db.c:94)
    by 0xFDCD05B: ??? (in /usr/lib64/libglib-2.0.so.0.4000.0)
    by 0xFDCC6D4: ??? (in /usr/lib64/libglib-2.0.so.0.4000.0)
    by 0xA70CDF4: start_thread (in /usr/lib64/libpthread-2.17.so)
    by 0x1018601C: clone (in /usr/lib64/libc-2.17.so)
  Address 0x0 is not stack'd, malloc'd or (recently) free'd

Comment 11 Milan Crha 2014-12-05 07:44:07 UTC
I have a fix for this, the change comes to evolution-data-server.

Comment 12 Milan Crha 2014-12-05 07:57:07 UTC
Created attachment 965012 [details]
evolution-data-server-3.8.5-cameldb-track-pending-syncs.patch

Comment 16 errata-xmlrpc 2015-03-05 13:33:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0561.html