-
Notifications
You must be signed in to change notification settings - Fork 154
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
imapd segmentation fault when querying mailboxes #4885
Comments
Can you provide the configure line that was used for the build? You can usually get it from Here's mine, for example:
If you're able to, can you also capture the "Cyrus Server configured components" information that's printed to stdout by configure? It's not logged anywhere, so to get it you'll need to run configure again, and capture it from there. It'll be the last ~80 or so lines. I'm particularly interested in seeing what regex library you're configured to use, because it smells like that's where the issue is coming from. We mostly only test with PCRE/PCRE2, so if you're using something else, Cyrus might be doing something that's incompatible with it that we haven't noticed. |
Hi @elliefm, thanks for getting back, and sure!
Given your hint, I now also tested building against pcre2 - same configure line and output as above, except for
However, that unfortunately does not let me use cyradm, hence I cannot test the issue at hand:
I should probably rather investigate that separately. |
Now I built the Cyrus server with pcre2, and perl-Cyrus-IMAP/cyradm with pcre! With this constellation, I can use cyradm without any segfaults on the server side. So I think the issue in this report is only concerning legacy pcre. Edit: upon applying a patch from Fedora to link the Perl libraries correctly, I can confirm that the full stack (server and client components) works correctly with pcre2. |
What's the Fedora patch? We might be able to upstream it I think your original crash might have just been #2629 saying hello again. The old PCRE library claimed ABI compatibility with libc, but had a different size regex_t. When an application was linked against both glibc and libpcre, it would end up calling the wrong regcomp/etc with the wrong regex_t, and crash like this. The only way to make it work is to use a PCRE built with Debian's patches (which rename the incompatible functions so they don't get in each others' way anymore). If the PCRE you were using did not have Debian's patches, then that's what the problem was.
Yeahhhh don't do that, you'll just bump into the same crash again, somewhere else 😅 The current PCRE2 doesn't have the same problem as PCRE did, so none of this matters if you can build with PCRE2. |
I wanted to make a separate issue for it, the patch is this: https://src.fedoraproject.org/rpms/cyrus-imapd/blob/rawhide/f/patch-cyrus-perl-linking But it does not look quite right to me, because the server components do get correctly linked automatically, so I suppose the client ones should as well? And it requires the use of
Interesting, I did actually find that issue, but didn't pay more attention to it .. the tests all pass in my environment. Thanks for elaborating on this! We have some patches, but none renaming functions: https://build.opensuse.org/package/show/openSUSE:Leap:15.5:Update/pcre Then yes, in my case it seems "resolved" with with the use of prce2. But maybe something could be done for it to fail at build or test time? |
Hi,
this issue occurs on 3.8.2, which I am packaging for openSUSE, however I was able to reproduce it with 3.4.x and 3.2.12 as well.
I am generally building with:
However I also tried the CFLAGS recommended in the upstream guide (
-W -Wno-unused-parameter -g -O0 -Wall -Werror -Wextra -fPIC
) and collected the backtrace:Would appreciate any ideas!
Georg
The text was updated successfully, but these errors were encountered: