Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault in "Mailbox/queryChange" #2510

Closed
zvasilev opened this issue Sep 7, 2018 · 5 comments
Closed

Segmentation fault in "Mailbox/queryChange" #2510

zvasilev opened this issue Sep 7, 2018 · 5 comments
Assignees
Labels
jmap affects the jmap implementation

Comments

@zvasilev
Copy link

zvasilev commented Sep 7, 2018

Segmentation fault is caused when calling "Mailbox/queryChanges".

{"methodCalls":[["Mailbox/changes",{"accountId":"u1","sinceState":"13968"},"#23"],["Mailbox/queryChanges",{"sinceQueryState":"13968"},"#24"]],"using":["ietf:jmap","ietf:jmapmail"]}

Seems the problem is that mbrec->mboxname is null.

p *mbrec
$6 = {id = 0x55ad399c1e20 "0051fe63-2ce4-4317-8027-c77ca157f695", mbname = 0x55ad399c5350, mboxname = 0x0,
utf8mboxname = 0x0, jmapname = 0x0, sort_order = 0, foldermodseq = 2, createdmodseq = 0, mbtype = 0,
shared_mbtype = _MBOX_SHARED}

(gdb) bt
#0 0x00007ff27a94df93 in strhash (string=0x0) at lib/strhash.c:50
#1 0x00007ff27a9460d9 in hash_lookup (key=0x0, table=0x7ffe979a0a60) at lib/hash.c:156
#2 0x000055ad38370b3c in jmap_myrights_byname (req=0x7ffe979a0b10, mboxname=0x0) at imap/http_jmap.c:2440
#3 0x000055ad38370cb3 in jmap_hasrights_byname (req=0x7ffe979a0b10, mboxname=0x0, rights=1) at imap/http_jmap.c:2464
#4 0x000055ad384006dd in jmap_mailbox_querychanges (req=0x7ffe979a0b10) at imap/jmap_mailbox.c:1353
#5 0x000055ad3836939d in jmap_api (txn=0x55ad3991cb30, res=0x7ffe979a0c50) at imap/http_jmap.c:950
#6 0x000055ad3836992c in jmap_post (txn=0x55ad3991cb30, params=0x0) at imap/http_jmap.c:1012
#7 0x000055ad3831d242 in frame_recv_cb (session=0x55ad3991b2f0, frame=0x55ad3991b488, user_data=0x7ffe979a8090)
at imap/http_h2.c:371
#8 0x00007ff27b35735d in ?? () from /usr/lib/x86_64-linux-gnu/libnghttp2.so.14
#9 0x00007ff27b35baae in nghttp2_session_mem_recv () from /usr/lib/x86_64-linux-gnu/libnghttp2.so.14
#10 0x00007ff27b35d954 in nghttp2_session_recv () from /usr/lib/x86_64-linux-gnu/libnghttp2.so.14
#11 0x000055ad3831e465 in http2_input (txn=0x7ffe979a4e80) at imap/http_h2.c:644
#12 0x000055ad38344326 in cmdloop (conn=0x7ffe979a8090) at imap/httpd.c:1774
#13 0x000055ad3833fc21 in service_main (argc=2, argv=0x55ad398dceb0, envp=0x7ffe979a9880) at imap/httpd.c:841
#14 0x000055ad38365275 in main (argc=2, argv=0x7ffe979a9868, envp=0x7ffe979a9880) at master/service.c:634

@brong
Copy link
Member

brong commented Sep 7, 2018 via email

@zvasilev
Copy link
Author

zvasilev commented Sep 8, 2018

Actually no. Trying to implement JMAP protocol, so I just build a Cyrus and add one account.
Is it possible to give you somehow Cyrus data?

Also, I was trying to use Mailbox/set (rename, delete, creating subfolder) but it turns out that cannot create subfolders correctly. Is it possible for these test to produce damaged mailboxes structure?

@brong
Copy link
Member

brong commented Sep 9, 2018 via email

@brong brong added the jmap affects the jmap implementation label Sep 10, 2018
@rsto rsto self-assigned this Sep 10, 2018
@rsto
Copy link
Member

rsto commented Sep 10, 2018

Being able to reproduce issue reports, especially crashers, is always a good thing. But for this particular issue I'm pretty sure where I messed up, so there's no need for a detailed error description until I've tested my assumption.

@rsto rsto closed this as completed in 9fcce0a Sep 10, 2018
@zvasilev
Copy link
Author

Ok great, because I get that data, but it turns out the SQLite files are encrypted.
I was using this https://cyrusimap.org/imap/installing.html guide.

What password is used for SQLite files, If found issues in the future?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jmap affects the jmap implementation
Projects
None yet
Development

No branches or pull requests

3 participants