Re: Help! Cyrus 2.5.11 segmentation fault

2018-08-03 Thread Wolfgang Breyha
Hi!

Sorry for the late answer... most likely you already fixed your issue...

On 16/07/18 10:43, Marco Chesi wrote:
> Hello,
> we have a Cyrus 2.5.11 on Debian 7 using murder (2 frontends, 3 backends, 1
> mupdate, about  5000 mailboxes) in production environment, hosted by a
> VMware cluster 6.5.
> 
> Suddenly, ALL mailboxes have becomed inaccessible.
> 
> In the log, we found many messages like this:
> 
>    master[5965]: process type:SERVICE name:imaps path:/usr/cyrus/bin/proxyd
> age:82.255s pid:5987 signaled to death by signal 11 (Segmentation fault)
> 
> I tried many times to restart the cyrus service on all servers without
> success.
> 
> Users are authenticated correctly, error occurs when they try to access the
> mailbox (trying with a manual connection using telnet, client dies on a
> "SELECT INBOX" command after a successfull login)

Actually that's the point when your frontend connects to your backend to
access the mailbox. So, you've troubles with backend authentication. Most
likely the proxy user is somehow broken.

At this point you're hit by an quite old bug...

2.5.11 misses the patch for this issue which was committed (backported from
3.0 where it was applied in 2016) in November 2017. Don't know why no
release was done for that yet.

see:
https://github.com/cyrusimap/cyrus-imapd/issues/40
At the bottom you'll find the two patches which fix this issue.

If you're able to rebuild new packages include these patches. If not,
you've to convince the debian people to provide an update with them.

But most likely the issue goes away if you fix your backend authentication
anyway.

Greetings, Wolfgang
-- 
Wolfgang Breyha  | https://www.blafasel.at/
Vienna University Computer Center | Austria

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Re: Help! Cyrus 2.5.11 segmentation fault

2018-07-18 Thread Michael Menge

Hi,


Quoting Marco Chesi :


Hello,
we have a Cyrus 2.5.11 on Debian 7 using murder (2 frontends, 3  
backends, 1 mupdate, about  5000 mailboxes) in production  
environment, hosted by a VMware cluster 6.5.


Suddenly, ALL mailboxes have becomed inaccessible.

In the log, we found many messages like this:

   master[5965]: process type:SERVICE name:imaps  
path:/usr/cyrus/bin/proxyd age:82.255s pid:5987 signaled to death by  
signal 11 (Segmentation fault)


I tried many times to restart the cyrus service on all servers  
without success.


Users are authenticated correctly, error occurs when they try to  
access the mailbox (trying with a manual connection using telnet,  
client dies on a "SELECT INBOX" command after a successfull login)


This is the output of one core dump:

    Core was generated by `proxyd -s'.
Program terminated with signal 11, Segmentation fault.
#0  __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:32
32    ../sysdeps/x86_64/multiarch/../strlen.S: File o directory  
non esistente.

(gdb) bt
#0  __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:32
#1  0x7f58caffa656 in xstrdup (str=0x0) at lib/xmalloc.c:95
#2  0x7f58cb574b93 in parse_capability (s=s@entry=0x2223580,  
str=) at imap/backend.c:282
#3  0x7f58cb576362 in parse_capability (str=,  
s=0x2223580) at imap/backend.c:279
#4  backend_login (noauth=6486368, auth_status=0x0, cb=0x2233b20,  
userid=0x2235360 "", ret=0x2223580) at imap/backend.c:833
#5  backend_connect (ret_backend=ret_backend@entry=0x0, server=0xc  
, server@entry=0x2233d90 "imap2",  
prot=0x7ffccb275a40, prot@entry=0x62f840,
    userid=userid@entry=0x2235360 "", cb=0x2233b20,  
cb@entry=0x0, auth_status=auth_status@entry=0x0,  
logfd=logfd@entry=-1) at imap/backend.c:1027
#6  0x00425915 in proxy_findserver (server=0x2233d90  
"imap2", prot=prot@entry=0x62f840, userid=0x2235360 "",  
cache=0x62fb70, current=0x62fb78, inbox=0x62fb80, clientin=0x21ed470)

    at imap/proxy.c:173
#7  0x00417a0d in proxy_findinboxserver (userid=out>) at imap/imap_proxy.c:129
#8  0x00412f63 in cmd_list (tag=0x221ad00 "6",  
listargs=listargs@entry=0x7ffccb276a60) at imap/imapd.c:6728

#9  0x00420afc in cmdloop () at imap/imapd.c:1638
#10 0x00424f4e in service_main (argc=,  
argv=, envp=envp@entry=0x7ffccb27a9e0) at  
imap/imapd.c:984
#11 0x00416962 in main (argc=,  
argv=, envp=0x7ffccb27a9e0) at master/service.c:606

(gdb)

Any suggestions or support?




As far as i can tell is that the frontend imapd-proxy process is  
receiving the SIGSEGV
after it connected and authenticate to the backend. The imapd-proxy is  
parsing the

the capability output of the backend.

What is strange is that the parse_cpability is called with a NULL  
pointer (str=0x0)

which is then used in xstrdup.

So a check to ensure that str != NULL  would help to prevent the  
SIGSEGV, but a am

not sure what should be done in the str == NULL case.


The other question is why is str == NULL in the first place?
Can you try to manual connect to the backend using telnet, and check  
the CAPABILITY output.



And as always the frustrating question: Did something change on your backends?

Regards,

   Michael Menge


M.MengeTel.: (49) 7071/29-70316
Universität Tübingen   Fax.: (49) 7071/29-5912
Zentrum für Datenverarbeitung  mail:  
michael.me...@zdv.uni-tuebingen.de

Wächterstraße 76
72074 Tübingen


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Help! Cyrus 2.5.11 segmentation fault

2018-07-16 Thread Marco Chesi

Hello,
we have a Cyrus 2.5.11 on Debian 7 using murder (2 frontends, 3 
backends, 1 mupdate, about  5000 mailboxes) in production environment, 
hosted by a VMware cluster 6.5.


Suddenly, ALL mailboxes have becomed inaccessible.

In the log, we found many messages like this:

   master[5965]: process type:SERVICE name:imaps 
path:/usr/cyrus/bin/proxyd age:82.255s pid:5987 signaled to death by 
signal 11 (Segmentation fault)


I tried many times to restart the cyrus service on all servers without 
success.


Users are authenticated correctly, error occurs when they try to access 
the mailbox (trying with a manual connection using telnet, client dies 
on a "SELECT INBOX" command after a successfull login)


This is the output of one core dump:

    Core was generated by `proxyd -s'.
Program terminated with signal 11, Segmentation fault.
#0  __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:32
32    ../sysdeps/x86_64/multiarch/../strlen.S: File o directory non 
esistente.

(gdb) bt
#0  __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:32
#1  0x7f58caffa656 in xstrdup (str=0x0) at lib/xmalloc.c:95
#2  0x7f58cb574b93 in parse_capability (s=s@entry=0x2223580, 
str=) at imap/backend.c:282
#3  0x7f58cb576362 in parse_capability (str=, 
s=0x2223580) at imap/backend.c:279
#4  backend_login (noauth=6486368, auth_status=0x0, cb=0x2233b20, 
userid=0x2235360 "", ret=0x2223580) at imap/backend.c:833
#5  backend_connect (ret_backend=ret_backend@entry=0x0, server=0xc 
, server@entry=0x2233d90 "imap2", 
prot=0x7ffccb275a40, prot@entry=0x62f840,
    userid=userid@entry=0x2235360 "", cb=0x2233b20, cb@entry=0x0, 
auth_status=auth_status@entry=0x0, logfd=logfd@entry=-1) at 
imap/backend.c:1027
#6  0x00425915 in proxy_findserver (server=0x2233d90 "imap2", 
prot=prot@entry=0x62f840, userid=0x2235360 "", cache=0x62fb70, 
current=0x62fb78, inbox=0x62fb80, clientin=0x21ed470)

    at imap/proxy.c:173
#7  0x00417a0d in proxy_findinboxserver (userid=) 
at imap/imap_proxy.c:129
#8  0x00412f63 in cmd_list (tag=0x221ad00 "6", 
listargs=listargs@entry=0x7ffccb276a60) at imap/imapd.c:6728

#9  0x00420afc in cmdloop () at imap/imapd.c:1638
#10 0x00424f4e in service_main (argc=, 
argv=, envp=envp@entry=0x7ffccb27a9e0) at imap/imapd.c:984
#11 0x00416962 in main (argc=, argv=out>, envp=0x7ffccb27a9e0) at master/service.c:606

(gdb)

Any suggestions or support?


Greetings,
Marco

--
Marco Chesi
Ufficio Esercizio e Tecnologie
Area Organizzazione e Sistemi Informativi
Università degli Studi di Siena


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus