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


(Markus Neuberger) #1

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 kernel: sogod[20025]: segfault at 7ffdbcb5bd98 ip 00007f70ada2a9cf sp 00007ffdbcb5bd80 error 6 in[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/
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?

(Stéphane de Labrusse) #2

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 ?

(Markus Neuberger) #3

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[7f50efe3d000+4dc000]

(Stéphane de Labrusse) #4

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

I suppose there is nothing in sogo log ?

(Markus Neuberger) #5

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

You are right, nothing in sogo.log.

(Stéphane de Labrusse) #6

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:

(Markus Neuberger) #7

I’ll try that, thank you.

(Stéphane de Labrusse) #8

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

(Markus Neuberger) #9

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…

(Stéphane de Labrusse) #10

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 /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
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

(Mark Verlinde) #11

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
 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
# rpm -qa | grep sogo

(Markus Neuberger) #12

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.