SOGo does not start - segfault error 6 in libgnustep-base

,

NethServer Version: 7.4
Module: SOGo 3.2

Hello community,

I can’t start SOGo 3.2 on my VPS with LDAP local provider anymore. Other LDAP apps are working.

Mär 24 20:47:21 nethserver.smart-ict.services kernel: sogod[20025]: segfault at 7ffdbcb5bd98 ip 00007f70ada2a9cf sp 00007ffdbcb5bd80 error 6 in libgnustep-base.so.1.24.9[7f70ad698000+4dc000]

I am able to start it with another user but I get an memory allocation error when starting as user sogo:

[root@nethserver markus]# sudo -u sogo bash
bash-4.2$ /usr/sbin/sogod -WOUseWatchDog NO -WONoDetach YES -WOPort 20000 -WOWorkersCount 1 -WOLogFile - -WOPidFile /tmp/sogo.pid
Speicherzugriffsfehler -> Memory access error

/var/log/sogo/sogo.log keeps empty.

I found some threads but no solution:

I tried:

  • diff /etc/sogo/sogo.conf with a working one - no difference except hostnames and passwords.
  • reinstall sogo - autoremove and install again
  • remove sogo database and user - the database keeps empty now even after fresh install
  • reboot
  • update to version 4
  • switch mail/mail2
  • compared rights of log and pid files/dirs to working version

Do you have ideas?

all dependencies of sogo has been removed, reinstalled or updated in case of sogo4

I meant about

yum update  sogo\*
yum reinstall sope\*

the issue came after what ?

I can’t say it exactly. I uninstalled lot of packages including mail server and sogo. Then I installed sogo a few days later and it threw that error.

My yum.log:

/var/log/yum.log at first occurance of the error:

Mar 19 00:21:43 Installed: sogo-ealarms-notify-3.2.10-1.ns7.x86_64
Mar 19 00:21:44 Installed: nettle-2.7.1-8.el7.x86_64
Mar 19 00:21:44 Installed: sope49-cards-3.2.10-1.ns7.x86_64
Mar 19 00:21:45 Installed: trousers-0.3.14-2.el7.x86_64
Mar 19 00:21:45 Installed: gnutls-3.3.26-9.el7.x86_64
Mar 19 00:21:46 Installed: gnustep-base-libs-1.24.9-1.el7.x86_64
Mar 19 00:21:46 Installed: gnustep-base-1.24.9-1.el7.x86_64
Mar 19 00:21:54 Installed: sogo-3.2.10-1.ns7.x86_64
Mar 19 00:21:54 Installed: sogo-activesync-3.2.10-1.ns7.x86_64
Mar 19 00:21:54 Installed: sogo-tool-3.2.10-1.ns7.x86_64
Mar 19 00:21:54 Installed: nethserver-sogo-1.6.18-1.ns7.sdl.noarch

/var/log/messages (first occurance of error):

Mar 19 00:21:54 nethserver kernel: sogod[4644]: segfault at 7fff4163bf18 ip 00007f50f01cf9cf sp 00007fff4163bf00 error 6 in libgnustep-base.so.1.24.9[7f50efe3d000+4dc000]

This gives back a lot of sogo thread, did you check them ?

I suppose there is nothing in sogo log ?

Yes, I checked them. I tried using gdb and start sogo with another user.

You are right, nothing in sogo.log.

do a list of every rpm needed with a fresh installation, then remove them and reinstall sogo ?

already done ?

sorry for the delay, the bike season has started :slight_smile:

I’ll try that, thank you.

fun I hit this issue too, can you recall what you did ?

I couldn’t solve it, I still have the issue…

I tried complete reinstall with all dependencies/delete db without success.

EDIT: First I thought it was about switching mail servers but I reinstalled complete sogo and mailserver…

got it workable, I used a bazzoka, feel free to use it … maybe only removing rpm and cleaning temp is necessary

yum remove  sogo* sope* gnustep* libwbxml* lasso* libobjc* libwbxml* memcached* nethserver-memcached* xmlsec1* xmlsec1-openssl* zip* -y
SYSTEMD_LOG_TARGET=console SYSTEMD_LOG_LEVEL=debug /usr/bin/systemd-tmpfiles --remove
SYSTEMD_LOG_TARGET=console SYSTEMD_LOG_LEVEL=debug /usr/bin/systemd-tmpfiles --clean
rm -rf /etc/sogo/
rm -rf /usr/lib64/GNUstep/
rm -rf /etc/rsyslog.d/ignore-systemd-session-slice-sogo.conf
rm -rf /var/lib/sogo/GNUstep
rm -rf /usr/lib64/sogo 
rm -rf /etc/sysconfig/sogo.rpmsave
rm -rf /etc/e-smith/events/nethserver-sogo-update
reboot
yum install nethserver-sogo

After that, maybe I messed up some permissions (before or now) I got the service unavailable to start with this error message

2018-08-25 10:24:14.552 sogod[8247:8247] unable to get status of descriptor 2 - Bad file descriptor

this is because the user sogo doesn’t own the /var/log/sogo folder/file, then
chown sogo:sogo -R /var/log/sogo/

normally signal-event nethserver-sogo-update and your service should be up

check also opendkim, the socket was gone so

systemctl restart opendkim

tried to reproduce too, but failed to do so.

On the vm where the old nethserver-mail packages where installed (ldap account provider):

yum remove nethserver-mail-disclaimer nethserver-mail-common nethserver-mail-server
Loaded plugins: changelog, fastestmirror, nethserver_events
Resolving Dependencies
--> Running transaction check
---> Package nethserver-mail-common.noarch 0:1.6.7-1.ns7 will be erased
---> Package nethserver-mail-disclaimer.noarch 0:1.6.7-1.ns7 will be erased
---> Package nethserver-mail-server.noarch 0:1.12.3-1.ns7 will be erased
--> Processing Dependency: nethserver-mail-server >= 1.1.0-2 for package: nethserver-sogo-1.7.5-1.ns7.noarch
--> Running transaction check
---> Package nethserver-sogo.noarch 0:1.7.5-1.ns7 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================================================================
 Package                                                      Arch                                     Version                                         Repository                                             Size
===================================================================================================================================================================================================================
Removing:
 nethserver-mail-common                                       noarch                                   1.6.7-1.ns7                                     @nethserver-base                                      103 k
 nethserver-mail-disclaimer                                   noarch                                   1.6.7-1.ns7                                     @nethserver-base                                       37 k
 nethserver-mail-server                                       noarch                                   1.12.3-1.ns7                                    @nethserver-updates                                   188 k
Removing for dependencies:
 nethserver-sogo                                              noarch                                   1.7.5-1.ns7                                     @nethforge                                             65 k

Transaction Summary
===================================================================================================================================================================================================================
Remove  3 Packages (+1 Dependent package)

note nethserver-sogo is removed not sogo itself nor nethserver-memcached

then yum install nethserver-mail2-filter nethserver-mail2-server
then yum install nethserver-sogo

sogo is up and running just fine, old mails are visible and can send a reply on them.
Noteworthy is: did not make any appointments, nor contacts, nor ACL’s.

# rpm -qa | grep nethserver-mail
nethserver-mail2-filter-2.2.7-1.ns7.noarch
nethserver-mail2-common-2.2.7-1.ns7.noarch
nethserver-mail-smarthost-1.0.1-1.ns7.noarch
nethserver-mail2-server-2.2.7-1.ns7.noarch
# rpm -qa | grep sogo
sogo-4.0.2-1.ns7.x86_64
sogo-ealarms-notify-4.0.2-1.ns7.x86_64
sogo-activesync-4.0.2-1.ns7.x86_64
nethserver-sogo-1.7.5-1.ns7.noarch
sogo-tool-4.0.2-1.ns7.x86_64

Thanks, the bazooka worked :+1:

Maybe only cleaning systemd temp files would be enough, all other things I tried before without success. It worked without reboot. I had to restart opendkim too.

Didn’t worked for me :slightly_frowning_face: Sogo used to work on my server. I gave roundcube a try, hated it, zapped it and tried to reinstall SOGo.

To be continued…

PS / Also tried Mail app for nextcloud but it looks ressource hungry. Doesn’t work well on my poor 2Gb server.

What happens?

are there sogo left-overs for a former installation?

rpm -qa | grep sogo

Nope, no leftovers.

I made progress anyway : that post put me on the track : I have epel repo enabled. So I excluded the gnustep* libraries as suggested, and another version coming from nethforge installed.

No more segfaults

I guess that’s the solution : wrong library version installed.

That said, it’s still not working :joy: : timeout starting the daemon. But I believe that’s another story.

that should not be a problem, we do not exclude epel packages on any installation.
Some how you seem to have old packeges / leftovers somewhere

Maybe it is time for the “bazzoka” @stephdl suggested above

Nope. I tried the bazooka method before. It didn’t work.

And as a matter of a fact I ended with different versions gnustep versions:

Without epel :

yum[8984]: Installed: gnustep-base-libs-1.24.6-6.el7.centos.x86_64                                                                                                                                           
yum[8984]: Installed: gnustep-base-1.24.6-6.el7.centos.x86_64

With epel, after bazooka :

yum[11593]: Installed: gnustep-base-libs-1.24.9-1.el7.x86_64                                                                                                                                                   
yum[11593]: Installed: gnustep-base-1.24.9-1.el7.x86_64

I do not understand from which repo this packages come from,
Looking at the change log gnustep-base-1.24.9-1.el7.x86_64 in the epel is unchanged since 2016-08-21.

It does not live in nethserver-repo’s.

EDIT: no other centos repo seem to have this version
Do you have other repositories enabled?

I checked my sogo installation that’s working with 1.24.9-1 from epel and did a downgrade of gnustep-base and it expects it to come from nethforge.

Error: Package: gnustep-base-1.24.6-6.el7.centos.x86_64 (nethforge)
           Requires: gnustep-base-libs = 1.24.6-6.el7.centos
           Installed: gnustep-base-libs-1.24.9-1.el7.x86_64 (@epel)
               gnustep-base-libs = 1.24.9-1.el7
           Available: gnustep-base-libs-1.24.6-6.el7.centos.x86_64 (nethforge)
               gnustep-base-libs = 1.24.6-6.el7.centos

Maybe it came from initial install long time ago and/or was cached somehow?

It is really strange :crazy_face: not not see it in the nethserver-repository…

this or one off the sogo packages ‘provides’ the older version.