Dear cyrus maintainers,
I compiled Cyrus IMAP 3.4.2 and upgraded all mailboxes to Version 17 (worked without any problem).
But:
I have a reproducible crash.
Data:
- The mailbox is empty. But the same occurs on a normal filled mailbox.
- Ubuntu 20.04.03 LTS
- Self compiled from 3.4.2 tarball.
- Mailbox migration was done via reconstruct -V max (finished without error).
- Backtrace shows SQUAT. But I recreated the squat index for that user to check. Other body searches do work.
- No murder.
- No unix hierarchy divider.
- no virtual domains.
Pascal
Commands:
RUBY0001 .... (login)
RUBY0001 OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE ACL ANNOTATE-EXPERIMENT-1 BINARY CATENATE CHILDREN CONDSTORE CREATE-SPECIAL-USE ESEARCH ESORT LIST-EXTENDED LIST-MYRIGHTS LIST-STATUS MAILBOX-REFERRALS METADATA MOVE MULTIAPPEND NAMESPACE OBJECTID QRESYNC QUOTA RIGHTS=kxten SAVEDATE SEARCH=FUZZY SORT SORT=DISPLAY SPECIAL-USE STATUS=SIZE THREAD=ORDEREDSUBJECT THREAD=REFERENCES UIDPLUS UNSELECT URLAUTH URLAUTH=BINARY WITHIN DIGEST=SHA1 LIST-METADATA NO_ATOMIC_RENAME PREVIEW=FUZZY SCAN SORT=MODSEQ SORT=UID THREAD=REFS X-CREATEDMODSEQ X-REPLICATION XLIST XMOVE LOGINDISABLED COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE] User logged in SESSIONID=<imap.southbrain.com-1643676129-102083-1-7060689575713643084>
RUBY0002 EXAMINE INBOX
* 0 EXISTS
* 0 RECENT
* FLAGS (\Answered \Flagged \Draft \Deleted \Seen)
* OK [PERMANENTFLAGS ()] Ok
* OK [UIDVALIDITY 1] Ok
* OK [UIDNEXT 1] Ok
* OK [HIGHESTMODSEQ 1] Ok
* OK [URLMECH INTERNAL] Ok
* OK [ANNOTATIONS 65536] Ok
RUBY0002 OK [READ-ONLY] Completed
RUBY0003 SEARCH RECENT
(crash)
The backtrace in the core:
Reading symbols from /usr/local/pascal/libexec/imapd...
[New LWP 28799]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `imapd'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007fdcb67043e0 in convert_cat (rock=rock@entry=0x55b2f92344f0, s=s@entry=0x2 <error: Cannot access memory at address 0x2>) at lib/charset.c:349
349 while (*s) {
(gdb) bt
#0 0x00007fdcb67043e0 in convert_cat (rock=rock@entry=0x55b2f92344f0, s=s@entry=0x2 <error: Cannot access memory at address 0x2>) at lib/charset.c:349
#1 0x00007fdcb670802a in charset_convert (s=s@entry=0x2 <error: Cannot access memory at address 0x2>, charset=0x55b2f922b6a0, flags=<optimized out>)
at lib/charset.c:2086
#2 0x00007fdcb688d0f9 in match (bx=0x55b2f9223b50, part=<optimized out>, str=0x2 <error: Cannot access memory at address 0x2>) at imap/search_squat.c:320
#3 0x00007fdcb6880483 in subquery_run_indexed (key=<optimized out>, rock=0x55b2f922d780, data="" out>) at imap/search_query.c:717
#4 subquery_run_indexed (key=<optimized out>, data="" out>, rock=0x55b2f922d780) at imap/search_query.c:658
#5 0x00007fdcb661e81b in hash_enumerate (table=table@entry=0x55b2f922d7c8, func=func@entry=0x7fdcb68802d0 <subquery_run_indexed>,
rock=rock@entry=0x55b2f922d780) at lib/hash.c:317
#6 0x00007fdcb6880753 in search_query_run (query=query@entry=0x55b2f922d780) at imap/search_query.c:996
#7 0x00007fdcb683df5d in index_search (state=0x55b2f922e5e0, searchargs=searchargs@entry=0x55b2f922d500, usinguid=usinguid@entry=0) at imap/index.c:1931
#8 0x000055b2f79bf8da in cmd_search (tag=tag@entry=0x55b2f92275e0 "RUBY0003", usinguid=0) at imap/imapd.c:6080
#9 0x000055b2f79d8833 in cmdloop () at imap/imapd.c:1969
#10 0x000055b2f79dd13e in service_main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at imap/imapd.c:999
#11 0x000055b2f79b92a2 in main (argc=<optimized out>, argv=<optimized out>, envp=0x7ffce20b91f8) at master/service.c:647
(gdb)
ldd:
cyrus@harlem:/mail/imap/L/user/testuser$ ldd /usr/local/pascal/libexec/imapd
linux-vdso.so.1 (0x00007ffc99fac000)
libcyrus_imap.so.0 => /usr/local/pascal/lib/libcyrus_imap.so.0 (0x00007f93016d5000)
libcyrus_sieve.so.0 => /usr/local/pascal/lib/libcyrus_sieve.so.0 (0x00007f93016a2000)
libcyrus.so.0 => /usr/local/pascal/lib/libcyrus.so.0 (0x00007f9301575000)
libcyrus_min.so.0 => /usr/local/pascal/lib/libcyrus_min.so.0 (0x00007f93014fd000)
libsasl2.so.2 => /lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007f93014d7000)
libssl.so.1.1 => /lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f9301444000)
libcrypto.so.1.1 => /lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f930116c000)
libcyrus_com_err.so.0 => /usr/local/pascal/lib/libcyrus_com_err.so.0 (0x00007f9301167000)
libwrap.so.0 => /lib/x86_64-linux-gnu/libwrap.so.0 (0x00007f930115b000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f930113f000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9300f4d000)
libjansson.so.4 => /lib/x86_64-linux-gnu/libjansson.so.4 (0x00007f9300f3e000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9300ded000)
libicuuc.so.66 => /lib/x86_64-linux-gnu/libicuuc.so.66 (0x00007f9300c07000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9300c01000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f9300bde000)
libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f9300bc1000)
/lib64/ld-linux-x86-64.so.2 (0x00007f9301825000)
libicudata.so.66 => /lib/x86_64-linux-gnu/libicudata.so.66 (0x00007f92ff0fe000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f92fef1c000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f92fef01000)
Configure command line:
$ ./configure --prefix=/usr/local/pascal --enable-idled --sysconfdir=/usr/local/pascal/etc
## --------- ##
## Platform. ##
## --------- ##
hostname = harlem
uname -m = x86_64
uname -r = 5.4.0-97-generic
uname -s = Linux
uname -v = #110-Ubuntu SMP Thu Jan 13 18:22:13 UTC 2022
/usr/bin/uname -p = x86_64
/bin/uname -X = unknown
/bin/arch = x86_64