James, I got another issue trying to migrate from current cyrus installation (cyrus-2.4.17) to new one with imap4flags extension: bytecode is not compatible with old compiled - "sieve runtime error: Invalid sieve bytecode"
This happens when "fileinto" was used in compiled with cyrus-2.4.17 sieve script. Any other sieve target looks to work just fine. Best, Deniss On 2014.10.31. 6:16, James Cassell wrote: > Deniss, > > I believe I have found and fixed the issue. There are two new commits > on that branch. Can you test it? > > Thanks. > > V/r, > James Cassell > > > On Wed, Oct 29, 2014, at 10:36 AM, Deniss wrote: >> James, >> >> please look at backtrace: >> >> Program terminated with signal 11, Segmentation fault. >> #0 append_fromstage (as=as@entry=0x3dfb16f2070, body=0x3dfb16f2a10, >> stage=stage@entry=0x46586c0, internaldate=internaldate@entry=0, >> flags=flags@entry=0x0, nolink=0) at append.c:468 >> 468 for (i = 0; i < flags->count ; i++) { >> >> looks like the problem is in append.c:468 where flags iterated but is >> not initialized ? >> >> any sieve runtime error (Fileinto: Mailbox does not exist, Include can >> not load script, etc) causes segfault of lmtpd >> >> Tested on on 2.4 master + patches from your imap4flags-2.4 branch >> >> Best, >> Deniss >> >> On 2014.10.29. 13:43, James Cassell wrote: >>> Deniss, >>> >>> I don't know. My guess is that it is an error in the other patches I >>> backported from master to 2.4. What version are you using? 2.4.17 >>> stable? Maybe someone on the cyrus-devel list might have an idea. >>> >>> Next week, I might try to backport my patches without requiring the >>> other patches I (perhaps erroneously) backported. >>> >>> V/r, >>> James Cassell >>> >>> >>> On Tue, Oct 28, 2014, at 11:52 AM, Deniss wrote: >>>> James, >>>> >>>> i testing your patch and have segfaults when sieve cant be include (the >>>> file is missed): >>>> >>>> Oct 28 17:43:06 lv-test-2 lmtp[14400]: IOERROR: fstating sieve script >>>> /var/imap/sieve/global/special-folders.bc: No such file or directory >>>> Oct 28 17:43:06 lv-test-2 lmtp[14400]: sieve runtime error for testdev33 >>>> id <544FB87D.60803@adsfasdfasd>: Include can not load script >>>> Oct 28 17:43:06 lv-test-2 lmtp[14443]: executed >>>> Oct 28 17:43:06 lv-test-2 kernel: lmtpd[14400]: segfault at 0 ip >>>> 0000002923bc2a41 sp 000003b91dfeddb0 error 4 in lmtpd[2923ba9000+16f000] >>>> Oct 28 17:43:06 lv-test-2 kernel: grsec: From 10.0.1.74: Segmentation >>>> fault occurred at (nil) in /C3/cyrus/bin/lmtpd[lmtpd:14400] >>>> uid/euid:999/999 gid/egid:12/12, parent >>>> /C3/cyrus/bin/master[master:14372] uid/euid:999/999 gid/egid:12/12 >>>> Oct 28 17:43:06 lv-test-2 kernel: grsec: From 10.0.1.74: denied resource >>>> overstep by requesting 4096 for RLIMIT_CORE against limit 0 for >>>> /C3/cyrus/bin/lmtpd[lmtpd:14400] uid/euid:999/999 gid/egid:12/12, parent >>>> /C3/cyrus/bin/master[master:14372] uid/euid:999/999 gid/egid:12/12 >>>> >>>> >>>> without the patch sieve just ignore the file without segfaulting lmtpd. >>>> >>>> >>>> Best, >>>> Deniss >>>> >>>> On 2014.10.26. 10:41, James Cassell wrote: >>>>> Hello Denniss, >>>>> >>>>> I have backported imap4flags to 2.4.17. I backported 6 other patches to >>>>> make backporting imap4flags easier. There has been no code review of >>>>> these patch backports. >>>>> >>>>> The code is available here: >>>>> https://github.com/cyberpear/cyrus-imapd/commits/imap4flags-2.4 >>>>> >>>>> I tried to make sure the bytecode generated on 2.4 would be readable by >>>>> 2.5, though not the other way around. I haven't tested this yet. >>>>> >>>>> I'd appreciate any reviews of the backported code. >>>>> >>>>> I'll probably send a pull request in a week or so for this code. >>>>> >>>>> V/r, >>>>> James Cassell >>>>> >>>>> >>>>> On Sat, Oct 25, 2014, at 10:40 AM, Deniss wrote: >>>>>> hello James, >>>>>> >>>>>> thanks for implementing imap4flags sieve extension. >>>>>> I'm looking to use the extension in production-ready 2.4 branch - >>>>>> "hasflag" test allows to add some logic while the "variables" extension >>>>>> is missed from cyrus. >>>>>> Are there any caveats to backport imap4flags from master to 2.4 ? >>>>>> >>>>>> Best, >>>>>> Deniss