r-raymond / nixos-mailserver

A complete and Simple Nixos Mailserver
GNU General Public License v3.0
181 stars 27 forks source link

libdovecot segfaults in extern.nix test #95

Closed dotlambda closed 6 years ago

dotlambda commented 6 years ago

I was trying to add a check for errors and warnigs in the journal to the test so that #94 would be detected but wasn't able to run the tests. Is it normal that the tests fail on unstable?

SNM Version: (e.g. v2.1.3)

v2.1.3

Nixos Version: (e.g. 17.09 or unstable)

unstable

What I expected to happen:

nix-build tests/extern.nix should work just fine

What happened:

client: must succeed: msmtp -a test3 --tls=on --tls-certcheck=off --auth=on lowquota@example.com < /etc/root/email2 >&2
client: exit status 0
server: waiting for failure: [ "$(postqueue -p)" != "Mail queue is empty" ]
server: running command: [ "$(postqueue -p)" != "Mail queue is empty" ]
server# [   17.530110] show_signal_msg: 88 callbacks suppressed
server# [   17.530114] lmtp[1069]: segfault at 20 ip 00007f2968e060ac sp 00007ffe3e731ab0 error 4 in libdovecot.so.0.0.0[7f2968dba000+166000]
server: exit status 0
r-raymond commented 6 years ago

Hi, no it should work out of the box. Unfortunately we can't test both stable and unstable on Travis CI - the tests would take too long. So we are currently only testing nixos-stable.

dotlambda commented 6 years ago

I think the segfaults might actually be the reason for the tests timing out on travis.

r-raymond commented 6 years ago

Could be. I'll look at some of the logs once I get a chance.

dotlambda commented 6 years ago

After bisecting, I'm pretty sure this was introduced by NixOS/Nixpkgs@646a2e9a6f91c038b9cdb8ed93e5fd99f1edd381.

r-raymond commented 6 years ago

@dotlambda Great work. Did you report it @ nixpgs? If so, could you link the issue here? Thanks a lot!

r-raymond commented 6 years ago

Btw, I'm able to reproduce the problem on unstable.

dotlambda commented 6 years ago

I did not report it. I'm not even sure if it's a problem with Nixpkgs or with Dovecot.

dotlambda commented 6 years ago

Can someone maybe have a look at this? It will be a problem with 18.03 as well. I looked at the Dovecot 2.3.0 release notes but didn't find any change SNM could be affected by. The segfault happens during the quota test btw.

dotlambda commented 6 years ago

I found a bug report and a patch on the Dovecot mailing list: https://www.dovecot.org/list/dovecot/2018-January/110700.html. However, applying that patch doesn't seem to solve the problem.

r-raymond commented 6 years ago

Unfortunately, I'm busy the next two weeks and won't find time to investigate the issue. If people come up with any solution I'll integrate it asap.

dotlambda commented 6 years ago

Fixed by https://github.com/NixOS/nixpkgs/pull/38000.