[Dovecot] Panic: file sieve-cmu.c: line 262 (part_save): assertion failed: (buf->used - 1 == part->body_size.physical_size)

2009-10-13 Thread Raffael Schmid
Hi everybody

We are running in the same issue as Maciej Polewczynski does in
http://www.dovecot.org/list/dovecot/2008-September/033645.html

Is there already a solution? I dont think so? In the TODO-File for 1.2.2
this issue is still reported:

[...]
 - sieve-cmu.c crash: i_assert(buf->used - 1 ==
part->body_size.physical_size);
[...]


I am not able to reproduce the problem but I think it has something to
do with the charset of a mail? Because the 2 bits which are used with
UTF-8 for special characters?

Dovecot is running in a 64bit vServer on a 64bit host. Both are debian
lenny with all patches. The dovecot-packages is backported.

Just write me if you need more informations.

Raffael

-- 
About our system:
# dovecot --version
1.2.2

# dovecot -n
# 1.2.2: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.22.18-nine-vserver-grsec2.1.11-vs2.2.0.6 x86_64 Debian
5.0.3 ufs
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap imaps pop3 pop3s managesieve
ssl_cert_file: /etc/dovecot/dovecot.pem
ssl_key_file: /etc/dovecot/dovecot.pem
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(pop3): /usr/lib/dovecot/pop3-login
login_executable(managesieve): /usr/lib/dovecot/managesieve-login
login_process_per_connection: no
max_mail_processes: 1500
mail_max_userip_connections(default): 30
mail_max_userip_connections(imap): 30
mail_max_userip_connections(pop3): 10
mail_max_userip_connections(managesieve): 10
verbose_proctitle: yes
first_valid_uid: 70
last_valid_uid: 70
first_valid_gid: 70
last_valid_gid: 70
mail_uid: vmail
mail_gid: vmail
mail_location: maildir:/srv/vmail/%d/%n
maildir_very_dirty_syncs: yes
mbox_write_locks: fcntl dotlock
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(pop3): /usr/lib/dovecot/pop3
mail_executable(managesieve): /usr/lib/dovecot/managesieve
mail_process_size: 756
mail_plugins(default): fts fts_squat quota imap_quota
mail_plugins(imap): fts fts_squat quota imap_quota
mail_plugins(pop3): quota fts fts_squat
mail_plugins(managesieve):
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3
mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve
pop3_reuse_xuidl(default): no
pop3_reuse_xuidl(imap): no
pop3_reuse_xuidl(pop3): yes
pop3_reuse_xuidl(managesieve): no
namespace:
  type: private
  separator: .
  prefix: INBOX.
  inbox: yes
  list: yes
  subscriptions: yes
lda:
  postmaster_address: postmas...@nine.ch
  mail_plugins: sieve quota
  rejection_subject: Automatically rejected message: %s to %t
  rejection_reason: This_would_be_a_long_line
auth default:
  mechanisms: plain login
  user: vmail
  username_chars:
  master_user_separator: /
  passdb:
driver: passwd-file
args: /etc/dovecot/dovecot.masteruser
pass: yes
master: yes
  passdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  passdb:
driver: sql
args: /etc/dovecot/dovecot-sql-fallback.conf
  userdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  userdb:
driver: sql
args: /etc/dovecot/dovecot-sql-fallback.conf
  socket:
type: listen
master:
  path: /var/run/dovecot/auth-master
  mode: 432
  user: vmail
  group: mail
plugin:
  quota: dict:user::proxy::quotadict
  quota_rule: *:storage=500M
  quota_rule2: Trash:storage=10%%
  quota_warning: storage=95%% /usr/local/bin/nine-quota-warning.sh 95 %u
  quota_warning2: storage=80%% /usr/local/bin/nine-quota-warning.sh 80 %u
  quota_exceeded_message: Mailbox ist voll / Mailbox is full
  sieve: ~/.dovecot.sieve
  sieve_dir: /srv/sieve-recipes/%d/%n
  fts: squat
  fts_squat: partial=4 full=10
dict:
  quotadict: mysql:/etc/dovecot/dovecot-dict-quota.conf


Re: [Dovecot] Panic: file sieve-cmu.c: line 262 (part_save): assertion failed: (buf->used - 1 == part->body_size.physical_size)

2009-10-13 Thread Raffael Schmid
Hi Thomas

Thomas Leuxner wrote:
> you can not run into the same problem as the Dovecot 1.2 series has a
> new Sieve implementation rewritten by Stephan Bosch. If there ought to
> be a similar problem it is most likely fixed in a later release (1.2.6
> is current).

Thank you for your answer but my mail.log shows something different:

Sep 19 18:52:01 vmail2 dovecot: deliver(mailaddr...@example.org): Panic:
file ext-body-common.c: line 149 (ext_body_part_save): assertion failed:
(buf->used - 1 == part->body_size.physical_size)

For me this really looks like the same bug or at least bug-"race", even
if its not in the same file ("line 262 (part_save):"). Maybe some code
was taken over into the new implementation?

Regards
 raf


Re: [Dovecot] Panic: file sieve-cmu.c: line 262 (part_save): assertion failed: (buf->used - 1 == part->body_size.physical_size)

2009-10-13 Thread Thomas Leuxner

Am 13.10.2009 um 10:11 schrieb Raffael Schmid:


Hi everybody

We are running in the same issue as Maciej Polewczynski does in
http://www.dovecot.org/list/dovecot/2008-September/033645.html

Is there already a solution? I dont think so? In the TODO-File for  
1.2.2

this issue is still reported:

[...]
- sieve-cmu.c crash: i_assert(buf->used - 1 ==
part->body_size.physical_size);
[...]



-- snip --

About our system:
# dovecot --version
1.2.2



lda:
 postmaster_address: postmas...@nine.ch
 mail_plugins: sieve quota


Hi,

you can not run into the same problem as the Dovecot 1.2 series has a  
new Sieve implementation rewritten by Stephan Bosch. If there ought to  
be a similar problem it is most likely fixed in a later release (1.2.6  
is current).


Regards
Thomas


Re: [Dovecot] Panic: file sieve-cmu.c: line 262 (part_save): assertion failed: (buf->used - 1 == part->body_size.physical_size)

2009-10-13 Thread Stephan Bosch

Thomas Leuxner schreef:

Am 13.10.2009 um 10:11 schrieb Raffael Schmid:

you can not run into the same problem as the Dovecot 1.2 series has a 
new Sieve implementation rewritten by Stephan Bosch. If there ought to 
be a similar problem it is most likely fixed in a later release (1.2.6 
is current).


Not entirely true. For CMUSieve, Timo used the Sieve compiler from the 
Cyrus project, but that does not implement the actual actions nor the 
acquisition of data for performing tests. This is implemented in the 
'glue' code in sieve-cmu.c.


When I rewrote the Sieve plugin, I discarded all Cyrus code, but I 
incorporated some of Timo's original glue code to implement actions and 
tests with the Dovecot API. The CMUSieve bug stated above is thereby 
propagated into the new Sieve plugin.


I've recently fixed the ':raw' part of the problem:

http://hg.rename-it.nl/dovecot-1.2-sieve/rev/a820e53138b8

The implementation of :content "multipart" and :content "message/rfc822" 
 is not working according to the specification yet. After fixing those 
issues, the body extension should work fully, except (as I noticed 
yesterday) for the UTF-8 requirements stated in the RFC.


Regards,

--
Stephan Bosch
step...@rename-it.nl


[Dovecot] Panic: file sieve-cmu.c: line 262 (part_save): assertion failed: (buf->used - 1 == part->body_size.physical_size)

2008-09-11 Thread Maciej PolewczyƄski

Hello

Dovecot v1.1.3
Sieve plugin v1.1.5
Debian Lenny
Virtual users in mysql db
dovecot -n at the end of email

I have problem with sieve body rules during delivery. When I test rule

if body :raw :contains [ ".exe" ]
{
  discard;
}

deliver die with panic:

Sep 10 15:14:37 mail deliver(user): Panic: file sieve-cmu.c: line 262 
(part_save): assertion failed: (buf->used - 1 == 
part->body_size.physical_size)
Sep 10 15:14:37 mail deliver(user): Raw backtrace: 
/usr/local/libexec/dovecot/deliver [0x80ca1a1] -> 
/usr/local/libexec/dovecot/deliver(i_syslog_fatal_handler+0x34) 
[0x80ca274] -> /usr/local/libexec/dovecot/deliver [0x80c9bb9] -> 
/usr/local/lib/dovecot/lda/lib90_cmusieve_plugin.so [0xb7e44bce] -> 
/usr/local/lib/dovecot/lda/lib90_cmusieve_plugin.so [0xb7e44fc4] -> 
/usr/local/lib/dovecot/lda/lib90_cmusieve_plugin.so [0xb7e4ef4a] -> 
/usr/local/lib/dovecot/lda/lib90_cmusieve_plugin.so(sieve_eval_bc+0x3a8) 
[0xb7e50558] -> 
/usr/local/lib/dovecot/lda/lib90_cmusieve_plugin.so(sieve_execute_bytecode+0xe2) 
[0xb7e56282] -> 
/usr/local/lib/dovecot/lda/lib90_cmusieve_plugin.so(cmu_sieve_run+0x326) 
[0xb7e46166] -> /usr/local/lib/dovecot/lda/lib90_cmusieve_plugin.so 
[0xb7e43bf6] -> /usr/local/libexec/dovecot/deliver(main+0x111a) 
[0x805dfda] -> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5) 
[0xb7e81455] -> /usr/local/libexec/dovecot/deliver [0x805bc11]


Is there a bug or I have done something wrong.

/usr/local/sbin/dovecot -n
# 1.1.3: /usr/local/etc/dovecot.conf
base_dir: /var/run/dovecot/
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap imaps pop3 pop3s
disable_plaintext_auth: no
login_dir: /var/run/dovecot//login
login_executable(default): /usr/local/libexec/dovecot/imap-login
login_executable(imap): /usr/local/libexec/dovecot/imap-login
login_executable(pop3): /usr/local/libexec/dovecot/pop3-login
first_valid_uid: 150
mail_privileged_group: mail
mail_location: maildir:%h/Maildir
mail_debug: yes
mail_executable(default): /usr/local/libexec/dovecot/imap
mail_executable(imap): /usr/local/libexec/dovecot/imap
mail_executable(pop3): /usr/local/libexec/dovecot/pop3
mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(pop3): quota
mail_plugin_dir(default): /usr/local/lib/dovecot/imap
mail_plugin_dir(imap): /usr/local/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3
imap_client_workarounds(default): delay-newmail
imap_client_workarounds(imap): delay-newmail
imap_client_workarounds(pop3):
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
auth default:
mechanisms: plain login
username_chars: 
[EMAIL PROTECTED]

debug: yes
passdb:
  driver: sql
  args: /usr/local/etc/dovecot-sql.user.conf
passdb:
  driver: sql
  args: /usr/local/etc/dovecot-sql.alias.conf
userdb:
  driver: sql
  args: /usr/local/etc/dovecot-sql.user.conf
userdb:
  driver: sql
  args: /usr/local/etc/dovecot-sql.alias.conf
socket:
  type: listen
  client:
path: /var/spool/postfix/private/auth
mode: 432
user: postfix
group: postfix
  master:
path: /var/run/dovecot/auth-master
mode: 384
user: vmail
plugin:
quota: maildir

--
Pozdrowienia
 Maciej Polewczynski
 Registered Linux user #117725 





[Dovecot] Panic: file sieve-cmu.c: line 262 (part_save): assertion failed: (buf->used - 1 == part->body_size.physical_size)

2008-09-10 Thread Maciej PolewczyƄski

Hello

Dovecot v1.1.3
Sieve plugin v1.1.5
Debian Lenny
Virtual users in mysql db
dovecot -n at the end of email

I have problem with sieve body rules during delivery. When I test rule

if body :raw :contains [ ".exe" ]
{
   discard;
}

deliver die with panic:

Sep 10 15:14:37 mail deliver(user): Panic: file sieve-cmu.c: line 262 
(part_save): assertion failed: (buf->used - 1 == 
part->body_size.physical_size)
Sep 10 15:14:37 mail deliver(user): Raw backtrace: 
/usr/local/libexec/dovecot/deliver [0x80ca1a1] -> 
/usr/local/libexec/dovecot/deliver(i_syslog_fatal_handler+0x34) 
[0x80ca274] -> /usr/local/libexec/dovecot/deliver [0x80c9bb9] -> 
/usr/local/lib/dovecot/lda/lib90_cmusieve_plugin.so [0xb7e44bce] -> 
/usr/local/lib/dovecot/lda/lib90_cmusieve_plugin.so [0xb7e44fc4] -> 
/usr/local/lib/dovecot/lda/lib90_cmusieve_plugin.so [0xb7e4ef4a] -> 
/usr/local/lib/dovecot/lda/lib90_cmusieve_plugin.so(sieve_eval_bc+0x3a8) 
[0xb7e50558] -> 
/usr/local/lib/dovecot/lda/lib90_cmusieve_plugin.so(sieve_execute_bytecode+0xe2) 
[0xb7e56282] -> 
/usr/local/lib/dovecot/lda/lib90_cmusieve_plugin.so(cmu_sieve_run+0x326) 
[0xb7e46166] -> /usr/local/lib/dovecot/lda/lib90_cmusieve_plugin.so 
[0xb7e43bf6] -> /usr/local/libexec/dovecot/deliver(main+0x111a) 
[0x805dfda] -> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5) 
[0xb7e81455] -> /usr/local/libexec/dovecot/deliver [0x805bc11]


Is there a bug or I have done something wrong.

/usr/local/sbin/dovecot -n
# 1.1.3: /usr/local/etc/dovecot.conf
base_dir: /var/run/dovecot/
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap imaps pop3 pop3s
disable_plaintext_auth: no
login_dir: /var/run/dovecot//login
login_executable(default): /usr/local/libexec/dovecot/imap-login
login_executable(imap): /usr/local/libexec/dovecot/imap-login
login_executable(pop3): /usr/local/libexec/dovecot/pop3-login
first_valid_uid: 150
mail_privileged_group: mail
mail_location: maildir:%h/Maildir
mail_debug: yes
mail_executable(default): /usr/local/libexec/dovecot/imap
mail_executable(imap): /usr/local/libexec/dovecot/imap
mail_executable(pop3): /usr/local/libexec/dovecot/pop3
mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(pop3): quota
mail_plugin_dir(default): /usr/local/lib/dovecot/imap
mail_plugin_dir(imap): /usr/local/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3
imap_client_workarounds(default): delay-newmail
imap_client_workarounds(imap): delay-newmail
imap_client_workarounds(pop3):
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
auth default:
 mechanisms: plain login
 username_chars: 
[EMAIL PROTECTED]

 debug: yes
 passdb:
   driver: sql
   args: /usr/local/etc/dovecot-sql.user.conf
 passdb:
   driver: sql
   args: /usr/local/etc/dovecot-sql.alias.conf
 userdb:
   driver: sql
   args: /usr/local/etc/dovecot-sql.user.conf
 userdb:
   driver: sql
   args: /usr/local/etc/dovecot-sql.alias.conf
 socket:
   type: listen
   client:
 path: /var/spool/postfix/private/auth
 mode: 432
 user: postfix
 group: postfix
   master:
 path: /var/run/dovecot/auth-master
 mode: 384
 user: vmail
plugin:
 quota: maildir

--
Pozdrowienia
 Maciej Polewczynski
 Registered Linux user #117725