EWS provider - Segmentation Fault in `ews_client_autodiscover_response_cb`
The goa-daemon
immediately segfaults upon launch.
Here's the syslog when opening the GOA control center page. From starting the goa-daemon until the core dump.
Mär 06 13:43:38 .goa-daemon-wra[384039]: goa-daemon version 3.48.0 starting
Mär 06 13:43:38 dbus-daemon[2002]: [session uid=1000 pid=2002] Successfully activated service 'org.gnome.OnlineAccounts'
Mär 06 13:43:38 org.gnome.Settings.desktop[384046]: GLib-GIO: _g_io_module_get_default: Found default implementation dconf (DConfSettingsBackend) for ?gsettings-backend?
Mär 06 13:43:38 org.gnome.Settings.desktop[384046]: GoaBackend: Loading all providers:
Mär 06 13:43:38 org.gnome.Settings.desktop[384046]: GoaBackend: - google
Mär 06 13:43:38 org.gnome.Settings.desktop[384046]: GoaBackend: - owncloud
Mär 06 13:43:38 org.gnome.Settings.desktop[384046]: GoaBackend: - windows_live
Mär 06 13:43:38 org.gnome.Settings.desktop[384046]: GoaBackend: - exchange
Mär 06 13:43:38 org.gnome.Settings.desktop[384046]: GoaBackend: - lastfm
Mär 06 13:43:38 org.gnome.Settings.desktop[384046]: GoaBackend: - imap_smtp
Mär 06 13:43:38 org.gnome.Settings.desktop[384046]: GoaBackend: - kerberos
Mär 06 13:43:38 org.gnome.Settings.desktop[384046]: GLib-GIO: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
Mär 06 13:43:38 org.gnome.Settings.desktop[384046]: GoaBackend: activated kerberos provider
Mär 06 13:43:38 org.gnome.Settings.desktop[384046]: GoaBackend: - media-server
Mär 06 13:43:39 .goa-daemon-wra[384039]: goa_ews_client_autodiscover() failed: 0 — (null)
Mär 06 13:43:39 kernel: pool-goa-daemon[384042]: segfault at ... in libxml2.so.2.12.5[7f9499ed4000+d9000]
Here's the relevant section from the gdb backtrace:
#0 0x00007ffff6f07935 in xmlDocGetRootElement () from /nix/store/n8dqvi9lp8j8wkfdi0ispkfh2ahhljd1-libxml2-2.12.5/lib/libxml2.so.2
#1 0x00007ffff7f95c52 in ews_client_autodiscover_response_cb (session=<optimized out>, result=<optimized out>, user_data=0x7fffd800c4d0) at ../src/goabackend/goaewsclient.c:287
This crash is in ews_client_autodiscover_response_cb
, specifically at xmlDocGetRootElement
.
I've also dumped the autodiscover.xml
file passed to xmlDocGetRootElement
right before the crash. Here is a redacted version:
<?xml version="1.0" encoding="utf-8"?>
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
<Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
<User>
<DisplayName>REDACTED</DisplayName>
<LegacyDN>REDACTED</LegacyDN>
<AutoDiscoverSMTPAddress>REDACTED</AutoDiscoverSMTPAddress>
<DeploymentId>REDACTED</DeploymentId>
</User>
<Account>
<AccountType>email</AccountType>
<Action>settings</Action>
<MicrosoftOnline>False</MicrosoftOnline>
<Protocol>
<Type>EXCH</Type>
<Server>REDACTED</Server>
<ServerDN>REDACTED</ServerDN>
<ServerVersion>REDACTED</ServerVersion>
<MdbDN>REDACTED</MdbDN>
<PublicFolderServer>mail.rwth-aachen.de</PublicFolderServer>
<AD>dc1.rwth-ad.de</AD>
<ASUrl>https://mail.rwth-aachen.de/EWS/Exchange.asmx</ASUrl>
<EwsUrl>https://mail.rwth-aachen.de/EWS/Exchange.asmx</EwsUrl>
<EmwsUrl>https://mail.rwth-aachen.de/EWS/Exchange.asmx</EmwsUrl>
<EcpUrl>https://mail.rwth-aachen.de/owa/</EcpUrl>
<EcpUrl-um>?path=/options/callanswering</EcpUrl-um>
<EcpUrl-aggr>?path=/options/connectedaccounts</EcpUrl-aggr>
<EcpUrl-mt>options/ecp/PersonalSettings/DeliveryReport.aspx?rfr=olk&exsvurl=1&IsOWA=<IsOWA>&MsgID=<MsgID>&Mbx=<Mbx>&realm=rwth-aachen.de</EcpUrl-mt>
<EcpUrl-ret>?path=/options/retentionpolicies</EcpUrl-ret>
<EcpUrl-sms>?path=/options/textmessaging</EcpUrl-sms>
<EcpUrl-publish>?path=/options/calendarpublishing/id/<FldID></EcpUrl-publish>
<EcpUrl-photo>?path=/options/myaccount/action/photo</EcpUrl-photo>
<EcpUrl-tm>options/ecp/?rfr=olk&ftr=TeamMailbox&exsvurl=1&realm=rwth-aachen.de</EcpUrl-tm>
<EcpUrl-tmCreating>options/ecp/?rfr=olk&ftr=TeamMailboxCreating&SPUrl=<SPUrl>&Title=<Title>&SPTMAppUrl=<SPTMAppUrl>&exsvurl=1&realm=rwth-aachen.de</EcpUrl-tmCreating>
<EcpUrl-tmEditing>options/ecp/?rfr=olk&ftr=TeamMailboxEditing&Id=<Id>&exsvurl=1&realm=rwth-aachen.de</EcpUrl-tmEditing>
<EcpUrl-extinstall>?path=/options/manageapps</EcpUrl-extinstall>
<OOFUrl>https://mail.rwth-aachen.de/EWS/Exchange.asmx</OOFUrl>
<UMUrl>https://mail.rwth-aachen.de/EWS/UM2007Legacy.asmx</UMUrl>
<OABUrl>REDACTED</OABUrl>
<ServerExclusiveConnect>off</ServerExclusiveConnect>
</Protocol>
<Protocol>
<Type>EXPR</Type>
<Server>mail.rwth-aachen.de</Server>
<SSL>On</SSL>
<AuthPackage>Basic</AuthPackage>
<ASUrl>https://mail.rwth-aachen.de/EWS/Exchange.asmx</ASUrl>
<EwsUrl>https://mail.rwth-aachen.de/EWS/Exchange.asmx</EwsUrl>
<EmwsUrl>https://mail.rwth-aachen.de/EWS/Exchange.asmx</EmwsUrl>
<EcpUrl>https://mail.rwth-aachen.de/owa/</EcpUrl>
<EcpUrl-um>?path=/options/callanswering</EcpUrl-um>
<EcpUrl-aggr>?path=/options/connectedaccounts</EcpUrl-aggr>
<EcpUrl-mt>options/ecp/PersonalSettings/DeliveryReport.aspx?rfr=olk&exsvurl=1&IsOWA=<IsOWA>&MsgID=<MsgID>&Mbx=<Mbx>&realm=rwth-aachen.de</EcpUrl-mt>
<EcpUrl-ret>?path=/options/retentionpolicies</EcpUrl-ret>
<EcpUrl-sms>?path=/options/textmessaging</EcpUrl-sms>
<EcpUrl-publish>?path=/options/calendarpublishing/id/<FldID></EcpUrl-publish>
<EcpUrl-photo>?path=/options/myaccount/action/photo</EcpUrl-photo>
<EcpUrl-tm>options/ecp/?rfr=olk&ftr=TeamMailbox&exsvurl=1&realm=rwth-aachen.de</EcpUrl-tm>
<EcpUrl-tmCreating>options/ecp/?rfr=olk&ftr=TeamMailboxCreating&SPUrl=<SPUrl>&Title=<Title>&SPTMAppUrl=<SPTMAppUrl>&exsvurl=1&realm=rwth-aachen.de</EcpUrl-tmCreating>
<EcpUrl-tmEditing>options/ecp/?rfr=olk&ftr=TeamMailboxEditing&Id=<Id>&exsvurl=1&realm=rwth-aachen.de</EcpUrl-tmEditing>
<EcpUrl-extinstall>?path=/options/manageapps</EcpUrl-extinstall>
<OOFUrl>https://mail.rwth-aachen.de/EWS/Exchange.asmx</OOFUrl>
<UMUrl>https://mail.rwth-aachen.de/EWS/UM2007Legacy.asmx</UMUrl>
<OABUrl>REDACTED</OABUrl>
<ServerExclusiveConnect>on</ServerExclusiveConnect>
<EwsPartnerUrl>https://mail.rwth-aachen.de/EWS/Exchange.asmx</EwsPartnerUrl>
<GroupingInformation>Default-First-Site-Name</GroupingInformation>
</Protocol>
<Protocol>
<Type>WEB</Type>
<Internal>
<OWAUrl AuthenticationMethod="Basic, Fba">https://mail.rwth-aachen.de/owa/</OWAUrl>
<Protocol>
<Type>EXCH</Type>
<ASUrl>https://mail.rwth-aachen.de/EWS/Exchange.asmx</ASUrl>
</Protocol>
</Internal>
<External>
<OWAUrl AuthenticationMethod="Fba">https://mail.rwth-aachen.de/owa/</OWAUrl>
<Protocol>
<Type>EXPR</Type>
<ASUrl>https://mail.rwth-aachen.de/EWS/Exchange.asmx</ASUrl>
</Protocol>
</External>
</Protocol>
</Account>
</Response>
</Autodiscover>
My university's exchange server seems to be somewhat strange to setup. See https://help.itc.rwth-aachen.de/en/service/1jefzdccuvuch/article/4bb3d95daf2748409b442848558a841d/
But with the mail server set to mail.rwth-aachen.de
and the correct username and password I managed to have the gnome-control-center
Exchange dialog complete the setup.
This worked fine for the last 2 years. I could use evolution to manage mail for all accounts.
Since the XML file does not look mangled and the segfault occurs in xmlDocGetRootElement
and the code in src/goabackend/goaewsclient.c
was not changed much recently, I suspect that libxml2
might be at fault here.
EDIT: Adding system and software version information
$ evolution --version
evolution 3.50.4
$ /nix/store/qb1wlqq3hwl65w8f8186w13a12icj058-gnome-online-accounts-3.48.0/libexec/goa-daemon --version
(goa-daemon:615674): goa-daemon-CRITICAL **: 12:08:20.875: Error parsing options: Unknown option --version
goa-daemon-Message: 12:08:20.875: goa-daemon version 3.48.0 exiting
$ gnome-control-center --version
gnome-control-center 45.3
$ ldd /nix/store/qb1wlqq3hwl65w8f8186w13a12icj058-gnome-online-accounts-3.48.0/libexec/.goa-daemon-wrapped
libxml2.so.2 => /nix/store/n8dqvi9lp8j8wkfdi0ispkfh2ahhljd1-libxml2-2.12.5/lib/libxml2.so.2
I hope the /nix/store
related noise does not distract from the actual issue...