Version-Release number of selected component:
cmdline: /usr/libexec/evolution-addressbook-factory-subprocess --factory ews --bus-name org.gnome.evolution.dataserver.Subprocess.Backend.AddressBookx2627x3 --own-path /org/gnome/evolution/dataserver/Subprocess/Backend/AddressBook/2627/3
pkg_fingerprint: 73BD E983 81B4 6521
pkg_vendor: Fedora Project
runlevel: N 5
Thread no. 8 (10 frames)
#0 xmlFindCharEncodingHandler__internal_alias at encoding.c:1670
#1 xmlDocDumpFormatMemoryEnc__internal_alias at xmlsave.c:2443
#2 xmlDocDumpMemory__internal_alias at xmlsave.c:2496
#3 e_soap_message_persist at e-soap-message.c:1088
#4 e_ews_message_write_footer at e-ews-message.c:249
#5 e_ews_connection_get_folder at e-ews-connection.c:5841
#6 e_ews_connection_get_folder_sync at e-ews-connection.c:5906
#7 e_ews_connection_try_credentials_sync at e-ews-connection.c:2258
#8 e_book_backend_ews_authenticate_sync at e-book-backend-ews.c:4263
#9 e_backend_authenticate_sync at e-backend.c:248
Potential duplicate: bug 1277578
Created attachment 1205832 [details]
Created attachment 1205833 [details]
Created attachment 1205834 [details]
Created attachment 1205835 [details]
Created attachment 1205836 [details]
Created attachment 1205837 [details]
Created attachment 1205838 [details]
Created attachment 1205839 [details]
Created attachment 1205840 [details]
Created attachment 1205841 [details]
Created attachment 1205842 [details]
Created attachment 1205843 [details]
Created attachment 1205844 [details]
Thanks for a bug report. I'm wondering whether this is caused by the same issue as your bug #1380266, only in an address book factory. It's possible, because this particular code is shared between the processes.
*** Bug 1412304 has been marked as a duplicate of this bug. ***
*** Bug 1449551 has been marked as a duplicate of this bug. ***
I think I finally see the cause of the crash. The backtrace has two threads inside xmlFindCharEncodingHandler() at the same line, where one of them crashed. I guess that the function had been called at the same time in both threads for the first time, which means the 'handlers' had been NULL, thus xmlInitCharEncodingHandlers() had been called. Thread interleaving could cause re-initialization of the global 'handlers' variable or anything like that.
I think the best option would be to add thread-safety guards around access to global memory in libxml2, because library users cannot guard each libxml2 call themself, especially when the final application uses other libraries, which also use libxml2 API.
The libxml2 has xmlMutexPtr already, eventually xmlLockLibrary() can be used, thus it might not be a big deal, no?
I'm not sure about xmlInitThreads() though, should it be called from the main thread on an application start? The modules like evolution-ews do not have any main(), it is dynamically loaded in several other background processes and basically any other application can load it, when using evolution/-data-server libraries either directly on indirectly, through language bindings.
I can add some internal locking around libxml2 calls in evolution-ews/evolution-data-server, eventually call some libxml2 initializers, like xmlInitCharEncodingHandlers() and possibly others, if you can point me to them, but at least xmlInitCharEncodingHandlers() has a comment that even public, it is usually not needed to be called outside of the libxml2.
Created attachment 1334075 [details]
This is a reproducer for the issue. The first line contains a command to compile it, the second contains a command to run it and get useful results, aka it counts how many times the call failed either due to crashing or when the xmlFindCharEncodingHandler() returned two different handlers for the same encoding. Either crashing or returning two different handlers are the same wrong, from my point of view.
The program itself just calls xmlFindCharEncodingHandler() in two threads, similarly as the backtrace above.
I even tried to call xmlInitGlobals(); in the main(), but it didn't help (I hoped it'll call the xmlInitCharEncodingHandlers() too). I tried several other calls and realized that xmlInitParser() helps with this particular issue.
It seems to be the right thing to do, at least with some xmlInit... functions, according to their documentation and the notes about multi-threaded applications. I mean, maybe this bug can be closed as "eds/evo did not use libxml2 properly, even when they both are heavily multi-threaded".
I added e_xml_initialize_in_main(), which calls several xmlInit* functions) into evolution-data-server and call it in appropriate main() functions
(for 3.27.1+  and 3.26.2+). I also call it in evolution (for 3.27.1+ 
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora 'version'
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.