Re: [Dovecot] Error using antispam plugin

2008-06-05 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, Jun 06, 2008 at 12:21:27AM +0200, Juan Asensio Sánchez wrote:
> What flags should i then use? I have tried with "-g3 -O0" and only
> with "-O0" but i do not get any additional info.

Hmm. It should. I'm tight on time, but you can have a look into the
debian subdir (especially in debian/rules). Maybe the packager set some
compiler options explicitly there.

Regards
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFISNG5Bcgs9XrR2kYRApe7AJ0UwC3EU4zlWJYq1Ucd22O/T/ezSwCfWkKz
vTwwBCMl/md3F6Jn1rQOXA8=
=oh0H
-END PGP SIGNATURE-


Re: [Dovecot] Error using antispam plugin

2008-06-05 Thread Timo Sirainen


On Jun 6, 2008, at 1:21 AM, Juan Asensio Sánchez wrote:


What flags should i then use? I have tried with "-g3 -O0" and only
with "-O0" but i do not get any additional info.


The problem with your backtrace is that:


#0  mail_get_physical_size (mail=0x8135db8, size_r=0x0) at mail.c:100


 - size_r should never be NULL here.
 -  mail is set here, but

#1  0xb7e575c5 in quota_check (t=0x8135db8, mail=0x0) at quota- 
storage.c:148

  qt = (struct quota_transaction_context *) 0x0
  ret = 
  too_large = 8



 - mail is NULL here. So is it really set or isn't it set? This  
inconsistency probably gets fixed by not using -O2.

 - ret =  is also caused by -O2


# export CFLAGS="-g3 -O0"


I don't know if this is supposed to work when compiling debian  
packages. If it doesn't get rid of the , then I  
guess it's not being used.




PGP.sig
Description: This is a digitally signed message part


Re: [Dovecot] Error using antispam plugin

2008-06-05 Thread Juan Asensio Sánchez
What flags should i then use? I have tried with "-g3 -O0" and only
with "-O0" but i do not get any additional info.

2008/6/5 Timo Sirainen <[EMAIL PROTECTED]>:
> On Jun 5, 2008, at 11:17 PM, Juan Asensio Sánchez wrote:
>
>> Compiling this way:
>>
>> # export CFLAGS="-g3 -O2"
>
> Almost, but not quite :) *without* -O2, not with. It's enabled by default.
>
>


Re: [Dovecot] Error using antispam plugin

2008-06-05 Thread Timo Sirainen

On Jun 5, 2008, at 11:17 PM, Juan Asensio Sánchez wrote:


Compiling this way:

# export CFLAGS="-g3 -O2"


Almost, but not quite :) *without* -O2, not with. It's enabled by  
default.




PGP.sig
Description: This is a digitally signed message part


Re: [Dovecot] Error using antispam plugin

2008-06-05 Thread Juan Asensio Sánchez
Compiling this way:

# export CFLAGS="-g3 -O2"
# DEB_BUILD_OPTIONS=nostrip dpkg-buildpackage -rfakeroot -b

I get this:



pdc-server:~# ps aux | grep dove
root 16954  0.0  0.2   1940   616 ?Ss   21:15   0:00
/usr/sbin/dovecot
root 16955  0.0  1.1   9680  2948 ?S21:15   0:00 dovecot-auth
dovecot  16961  0.0  0.5   3308  1508 ?S21:15   0:00 imap-login
dovecot  16962  0.0  0.5   3308  1508 ?S21:15   0:00 imap-login
dovecot  16967  0.0  0.5   3312  1512 ?S21:16   0:00 imap-login
mailuser 16968  0.5  0.5   2600  1348 ?S21:16   0:00
/usr/lib/dovecot/imap
root 16971  0.0  0.2   2880   752 pts/0R+   21:16   0:00 grep dove
pdc-server:~# gdb -p 16968
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
Attaching to process 16968
Reading symbols from /usr/lib/dovecot/imap...done.
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /lib/tls/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
Reading symbols from
/usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so
Reading symbols from
/usr/lib/dovecot/modules/imap/lib90_antispam_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/lib90_antispam_plugin.so
Reading symbols from /usr/lib/dovecot/modules/imap/autocreate_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/autocreate_plugin.so
Failed to read a valid object file image from memory.
0xb7f98410 in ?? ()
(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
mail_get_physical_size (mail=0x8135db8, size_r=0x0) at mail.c:100
100 return p->v.get_physical_size(mail, size_r);
(gdb) bt full
#0  mail_get_physical_size (mail=0x8135db8, size_r=0x0) at mail.c:100
No locals.
#1  0xb7e575c5 in quota_check (t=0x8135db8, mail=0x0) at quota-storage.c:148
   qt = (struct quota_transaction_context *) 0x0
   ret = 
   too_large = 8
#2  0xb7e4b058 in antispam_save_finish (ctx=0x813cb98) at
antispam-storage-1.1.c:178
   asbox = (struct antispam_mailbox *) 0x81252f8
   ast = (struct antispam_internal_context *) 0x8135df0
   dest_mail = (struct mail *) 0xbffead08
   ret = 135093999
#3  0x0805a1c8 in cmd_append_continue_message (cmd=0x810d4e0) at
cmd-append.c:405
   client = (struct client *) 0x810bd48
   ctx = (struct cmd_append_context *) 0x810d528
   size = 135314760
   ret = 
#4  0x0805a59a in cmd_append_continue_parsing (cmd=0x810d4e0) at
cmd-append.c:353
   uid2 = 
   msg = 
   sync_flags = 
   imap_flags = 
   uid_validity = 
   uid1 = 
   client = (struct client *) 0x810bd48
   ctx = (struct cmd_append_context *) 0x810d528
   args = (const struct imap_arg *) 0x8135ec0
   flags_list = (const struct imap_arg *) 0x8135f50
   flags = MAIL_SEEN
   keywords_list = (const char * const *) 0x0
   keywords = (struct mail_keywords *) 0x0
   internal_date_str = 0x0
   internal_date = -1
   ret = 0
   timezone_offset = 0
   nonsync = false
   __PRETTY_FUNCTION__ = "cmd_append_continue_parsing"
#5  0x0805a7b5 in cmd_append (cmd=0x810d4e0) at cmd-append.c:499
   storage = (struct mail_storage *) 0x810b660
   box = 
   client = (struct client *) 0x810bd48
---Type  to continue, or q  to quit---
   ctx = (struct cmd_append_context *) 0x810d528
   mailbox = 0x8110588 "Sent"
#6  0x0805fa6c in client_command_input (cmd=0x810d4e0) at client.c:580
   client = (struct client *) 0x810bd48
   command = 
   __PRETTY_FUNCTION__ = "client_command_input"
#7  0x0805fb15 in client_command_input (cmd=0x810d4e0) at client.c:629
   client = (struct client *) 0x810bd48
   command = (struct command *) 0x8
   __PRETTY_FUNCTION__ = "client_command_input"
#8  0x08060305 in client_handle_input (client=0x810bd48) at client.c:670
   _data_stack_cur_id = 3
   ret = 
   remove_io = 
   handled_commands = false
#9  0x0806050e in client_input (client=0x810bd48) at client.c:725
   cmd = 
   output = (struct ostream *) 0x810becc
   bytes = 34
   __PRETTY

Re: [Dovecot] Error using antispam plugin

2008-06-04 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, Jun 04, 2008 at 08:53:10PM +0200, Juan Asensio Sánchez wrote:
> Applying the change Timo has said i get this:

[...]

> Very similar to previous post (if not identical). Timo, how can i
> compile with the -O2 option when building from debian source packages?

You are using dpkg-buildpackage? It (should) honour(s) the usual environment
variables, so then it would be

  export CFLAGS=-g -O0
  dpkg-buildpackage...

or whatever necessary.

Regards
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIR4NcBcgs9XrR2kYRAq7/AJ4sSwDyCi+F2rOnPIaZBWHEm7imigCeI0xH
+4BOV/fBgnBR9FfF/zSt+Fk=
=FERi
-END PGP SIGNATURE-


Re: [Dovecot] Error using antispam plugin

2008-06-04 Thread Juan Asensio Sánchez
Applying the change Timo has said i get this:

==

(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
mail_get_physical_size (mail=0x81203a0, size_r=0x0) at mail.c:100
100 return p->v.get_physical_size(mail, size_r);
(gdb) bt full
#0  mail_get_physical_size (mail=0x81203a0, size_r=0x0) at mail.c:100
No locals.
#1  0xb7e405c5 in quota_check (t=0x81203a0, mail=0x0) at quota-storage.c:148
qt = (struct quota_transaction_context *) 0x0
ret = 
too_large = 8
#2  0xb7e34048 in antispam_save_finish (ctx=0x8123178) at
antispam-storage-1.1.c:181
asbox = (struct antispam_mailbox *) 0x811b298
ast = (struct antispam_internal_context *) 0x81203d8
dest_mail = (struct mail *) 0x8122d70
ret = 135093999
#3  0x0805a1c8 in cmd_append_continue_message (cmd=0x810d4e0) at
cmd-append.c:405
client = (struct client *) 0x810bd48
ctx = (struct cmd_append_context *) 0x810d528
size = 135314760
ret = 
#4  0x0805a59a in cmd_append_continue_parsing (cmd=0x810d4e0) at
cmd-append.c:353
uid2 = 
msg = 
sync_flags = 
imap_flags = 
uid_validity = 
uid1 = 
client = (struct client *) 0x810bd48
ctx = (struct cmd_append_context *) 0x810d528
args = (const struct imap_arg *) 0x81204a8
flags_list = (const struct imap_arg *) 0x8120538
flags = MAIL_SEEN
keywords_list = (const char * const *) 0x0
keywords = (struct mail_keywords *) 0x0
internal_date_str = 0x0
internal_date = -1
ret = 0
timezone_offset = 0
nonsync = false
__PRETTY_FUNCTION__ = "cmd_append_continue_parsing"
#5  0x0805a7b5 in cmd_append (cmd=0x810d4e0) at cmd-append.c:499
storage = (struct mail_storage *) 0x810b660
box = 
client = (struct client *) 0x810bd48
ctx = (struct cmd_append_context *) 0x810d528
mailbox = 0x8110588 "Sent"
#6  0x0805fa6c in client_command_input (cmd=0x810d4e0) at client.c:580
client = (struct client *) 0x810bd48
command = 
---Type  to continue, or q  to quit---
__PRETTY_FUNCTION__ = "client_command_input"
#7  0x0805fb15 in client_command_input (cmd=0x810d4e0) at client.c:629
client = (struct client *) 0x810bd48
command = (struct command *) 0x8
__PRETTY_FUNCTION__ = "client_command_input"
#8  0x08060305 in client_handle_input (client=0x810bd48) at client.c:670
_data_stack_cur_id = 3
ret = 
remove_io = 
handled_commands = false
#9  0x0806050e in client_input (client=0x810bd48) at client.c:725
cmd = 
output = (struct ostream *) 0x810becc
bytes = 34
__PRETTY_FUNCTION__ = "client_input"
#10 0x080d9100 in io_loop_handler_run (ioloop=0x8108ab8) at ioloop-epoll.c:201
ctx = 
event = (const struct epoll_event *) 0x8108bf0
list = (struct io_list *) 0x810d118
io = (struct io_file *) 0x810bf28
tv = {tv_sec = 4, tv_usec = 999383}
t_id = 2
msecs = 
ret = 1
i = 0
j = 0
call = 
#11 0x080d8098 in io_loop_run (ioloop=0x8108ab8) at ioloop.c:308
No locals.
#12 0x080680db in main (argc=Cannot access memory at address 0x8
) at main.c:293
home = 0x0
(gdb)

==

Very similar to previous post (if not identical). Timo, how can i
compile with the -O2 option when building from debian source packages?

2008/6/4 Johannes Berg <[EMAIL PROTECTED]>:
>
>> But looking at the antispam code I think there's one bug:
>>
>> static int antispam_save_finish(struct mail_save_context *ctx)
>>   struct mail *dest_mail = ast->mail;
>>
>> I think ast->mail can be NULL. It should maybe be instead:
>>
>> dest_mail = ctx->dest_mail != NULL ? ctx->dest_mail : ast->mail;
>
> Yeah, probably lost that when copying from the quota code. Juan, can you
> try that?
>
> OTOH, super (i.e. the quota plugin) will never see this value and that's
> where it seems to crash.
>
> johannes
>


Re: [Dovecot] Error using antispam plugin

2008-06-04 Thread Johannes Berg

> But looking at the antispam code I think there's one bug:
> 
> static int antispam_save_finish(struct mail_save_context *ctx)
>   struct mail *dest_mail = ast->mail;
> 
> I think ast->mail can be NULL. It should maybe be instead:
> 
> dest_mail = ctx->dest_mail != NULL ? ctx->dest_mail : ast->mail;

Yeah, probably lost that when copying from the quota code. Juan, can you
try that?

OTOH, super (i.e. the quota plugin) will never see this value and that's
where it seems to crash.

johannes


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Error using antispam plugin

2008-06-04 Thread Timo Sirainen
On Wed, 2008-06-04 at 20:20 +0200, Juan Asensio Sánchez wrote:
> Program received signal SIGSEGV, Segmentation fault.
> mail_get_physical_size (mail=0x8129ba8, size_r=0x0) at mail.c:100
> 100   return p->v.get_physical_size(mail, size_r);
> (gdb) bt full
> #0  mail_get_physical_size (mail=0x8129ba8, size_r=0x0) at mail.c:100
> No locals.
> #1  0xb7db25c5 in quota_check (t=0x8129ba8, mail=0x0) at quota-storage.c:148
>   qt = (struct quota_transaction_context *) 0x0
>   ret = 
>   too_large = 8

The values are still a bit broken. Compiling without -O2 would probably
show what they really are.

But looking at the antispam code I think there's one bug:

static int antispam_save_finish(struct mail_save_context *ctx)
struct mail *dest_mail = ast->mail;

I think ast->mail can be NULL. It should maybe be instead:

dest_mail = ctx->dest_mail != NULL ? ctx->dest_mail : ast->mail;



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Error using antispam plugin

2008-06-04 Thread Juan Asensio Sánchez
Well

Now i think i did it. This is the debug information:

=

pdc-server:~# ps aux | grep -i dove
root  9044  0.0  0.2   1940   616 ?Ss   20:13   0:00
/usr/sbin/dovecot
root  9045  0.0  1.1   9680  2948 ?S20:13   0:00 dovecot-auth
dovecot   9046  0.0  0.5   3312  1512 ?S20:13   0:00 imap-login
dovecot   9047  0.0  0.5   3312  1512 ?S20:13   0:00 imap-login
dovecot   9070  0.0  0.5   3312  1512 ?S20:15   0:00 imap-login
mailuser  9071  0.2  0.5   2572  1444 ?S20:15   0:00
/usr/lib/dovecot/imap
root  9075  0.0  0.2   2876   752 pts/0R+   20:15   0:00 grep -i dove
pdc-server:~# gdb -p 9071
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
Attaching to process 9071
Reading symbols from /usr/lib/dovecot/imap...done.
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /lib/tls/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
Reading symbols from
/usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so
Reading symbols from
/usr/lib/dovecot/modules/imap/lib90_antispam_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/lib90_antispam_plugin.so
Reading symbols from /usr/lib/dovecot/modules/imap/autocreate_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/autocreate_plugin.so
Failed to read a valid object file image from memory.
0xb7ef3410 in ?? ()
(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
mail_get_physical_size (mail=0x8129ba8, size_r=0x0) at mail.c:100
100 return p->v.get_physical_size(mail, size_r);
(gdb) bt full
#0  mail_get_physical_size (mail=0x8129ba8, size_r=0x0) at mail.c:100
No locals.
#1  0xb7db25c5 in quota_check (t=0x8129ba8, mail=0x0) at quota-storage.c:148
qt = (struct quota_transaction_context *) 0x0
ret = 
too_large = 8
#2  0xb7da602d in antispam_save_finish (ctx=0x81417d8) at
antispam-storage-1.1.c:178
asbox = (struct antispam_mailbox *) 0x81262e0
ast = (struct antispam_internal_context *) 0x8129be0
dest_mail = (struct mail *) 0x812c578
ret = 135093999
#3  0x0805a1c8 in cmd_append_continue_message (cmd=0x810d4e0) at
cmd-append.c:405
client = (struct client *) 0x810bd48
ctx = (struct cmd_append_context *) 0x810d528
size = 135314760
ret = 
#4  0x0805a59a in cmd_append_continue_parsing (cmd=0x810d4e0) at
cmd-append.c:353
uid2 = 
msg = 
sync_flags = 
imap_flags = 
uid_validity = 
uid1 = 
client = (struct client *) 0x810bd48
ctx = (struct cmd_append_context *) 0x810d528
args = (const struct imap_arg *) 0x8129cb0
flags_list = (const struct imap_arg *) 0x8129d40
flags = MAIL_SEEN
keywords_list = (const char * const *) 0x0
keywords = (struct mail_keywords *) 0x0
internal_date_str = 0x0
internal_date = -1
ret = 0
timezone_offset = 0
nonsync = false
__PRETTY_FUNCTION__ = "cmd_append_continue_parsing"
#5  0x0805a7b5 in cmd_append (cmd=0x810d4e0) at cmd-append.c:499
storage = (struct mail_storage *) 0x810b660
box = 
client = (struct client *) 0x810bd48
ctx = (struct cmd_append_context *) 0x810d528
mailbox = 0x8110588 "Sent"
#6  0x0805fa6c in client_command_input (cmd=0x810d4e0) at client.c:580
---Type  to continue, or q  to quit---
client = (struct client *) 0x810bd48
command = 
__PRETTY_FUNCTION__ = "client_command_input"
#7  0x0805fb15 in client_command_input (cmd=0x810d4e0) at client.c:629
client = (struct client *) 0x810bd48
command = (struct command *) 0x8
__PRETTY_FUNCTION__ = "client_command_input"
#8  0x08060305 in client_handle_input (client=0x810bd48) at client.c:670
_data_stack_cur_id = 3
ret = 
remove_io = 
handled_commands = false
#9  0x0806050e in client_input (client=0x810bd48) at client.c:725
cmd = 
output = (struct ostream *) 0x810becc
bytes = 34
__PRETTY_FUN

Re: [Dovecot] Error using antispam plugin

2008-06-03 Thread Juan Asensio Sánchez
I compile Dovecot from the source packages of the Debian repository. I
don't know if it has been correctly compiled with that flag, i have
executed:

# CFLAGS=-g3 dpkg-buildpackage -rfakeroot -b

When running gdb again, i get diffrenet output but i think that this
information is not relevant:

(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x080b294d in mail_get_physical_size ()
(gdb) bt full
#0  0x080b294d in mail_get_physical_size ()
No symbol table info available.
#1  0xb7df0200 in quota_try_alloc () from
/usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
No symbol table info available.
#2  0xb7df4b01 in quota_plugin_deinit () from
/usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
No symbol table info available.
#3  0xb7df4edc in quota_plugin_deinit () from
/usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
No symbol table info available.
#4  0xb7de8036 in antispam_save_finish () from
/usr/lib/dovecot/modules/imap/lib90_antispam_plugin.so
No symbol table info available.
#5  0x080b5aa6 in mailbox_save_finish ()
No symbol table info available.
#6  0x0805ad8f in _start ()
No symbol table info available.
(gdb) cont
Continuing.

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb)

2008/6/4 Juan Asensio Sánchez <[EMAIL PROTECTED]>:
> I compile Dovecot from the source packages of the Debian repository. I
> don't know if it has been correctly compiled with that flag, i have
> executed:
>
> # CFLAGS=-g3 dpkg-buildpackage -rfakeroot -b
>
> When running gdb again, i get diffrenet output but i think that this
> information is not relevant:
>
> (gdb) cont
> Continuing.
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x080b294d in mail_get_physical_size ()
> (gdb) bt full
> #0  0x080b294d in mail_get_physical_size ()
> No symbol table info available.
> #1  0xb7df0200 in quota_try_alloc () from
> /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
> No symbol table info available.
> #2  0xb7df4b01 in quota_plugin_deinit () from
> /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
> No symbol table info available.
> #3  0xb7df4edc in quota_plugin_deinit () from
> /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
> No symbol table info available.
> #4  0xb7de8036 in antispam_save_finish () from
> /usr/lib/dovecot/modules/imap/lib90_antispam_plugin.so
> No symbol table info available.
> #5  0x080b5aa6 in mailbox_save_finish ()
> No symbol table info available.
> #6  0x0805ad8f in _start ()
> No symbol table info available.
> (gdb) cont
> Continuing.
>
> Program terminated with signal SIGSEGV, Segmentation fault.
> The program no longer exists.
> (gdb)
>
> 2008/6/3 Johannes Berg <[EMAIL PROTECTED]>:
>> On Tue, 2008-06-03 at 22:16 +0300, Timo Sirainen wrote:
>>> On Tue, 2008-06-03 at 21:11 +0200, Johannes Berg wrote:
>>> > On Tue, 2008-06-03 at 21:06 +0200, Juan Asensio Sánchez wrote:
>>> > > Wow. Thanks for your quick answer. I don't know much about compiling
>>> > > or debugging. Could anyone say me how to do that or give some tips?
>>> >
>>> > well, add -g3 somewhere to the CFLAGS when building dovecot.
>>>
>>> -g is added by default. Does -g3 add anything useful compared to it?
>>
>> I think it only adds debug information for macros.
>>
>> johannes
>>
>


Re: [Dovecot] Error using antispam plugin

2008-06-03 Thread Johannes Berg
On Tue, 2008-06-03 at 22:16 +0300, Timo Sirainen wrote:
> On Tue, 2008-06-03 at 21:11 +0200, Johannes Berg wrote:
> > On Tue, 2008-06-03 at 21:06 +0200, Juan Asensio Sánchez wrote:
> > > Wow. Thanks for your quick answer. I don't know much about compiling
> > > or debugging. Could anyone say me how to do that or give some tips?
> > 
> > well, add -g3 somewhere to the CFLAGS when building dovecot.
> 
> -g is added by default. Does -g3 add anything useful compared to it?

I think it only adds debug information for macros.

johannes


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Error using antispam plugin

2008-06-03 Thread Timo Sirainen
On Tue, 2008-06-03 at 21:11 +0200, Johannes Berg wrote:
> On Tue, 2008-06-03 at 21:06 +0200, Juan Asensio Sánchez wrote:
> > Wow. Thanks for your quick answer. I don't know much about compiling
> > or debugging. Could anyone say me how to do that or give some tips?
> 
> well, add -g3 somewhere to the CFLAGS when building dovecot.

-g is added by default. Does -g3 add anything useful compared to it?



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Error using antispam plugin

2008-06-03 Thread Johannes Berg
On Tue, 2008-06-03 at 21:06 +0200, Juan Asensio Sánchez wrote:
> Wow. Thanks for your quick answer. I don't know much about compiling
> or debugging. Could anyone say me how to do that or give some tips?

well, add -g3 somewhere to the CFLAGS when building dovecot.

johannes


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Error using antispam plugin

2008-06-03 Thread Juan Asensio Sánchez
Wow. Thanks for your quick answer. I don't know much about compiling
or debugging. Could anyone say me how to do that or give some tips?

Thanks in advance.

2008/6/3 Johannes Berg <[EMAIL PROTECTED]>:
>
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x0809ea67 in mail_get_physical_size ()
>> (gdb) bt full
>> #0  0x0809ea67 in mail_get_physical_size ()
>> No symbol table info available.
>> #1  0xb7e795c5 in quota_mail_storage_created () from
>> /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
>> No symbol table info available.
>> #2  0xb7e6d02d in antispam_save_finish (ctx=0x813b720) at
>> antispam-storage-1.1.c:178
>>   asbox = (struct antispam_mailbox *) 0x8124320
>>   ast = (struct antispam_internal_context *) 0x8134978
>>   dest_mail = (struct mail *) 0x8137310
>>   ret = 135092783
>> #3  0x0805a1c8 in _start ()
>> No symbol table info available.
>
> Hmm. Can you compile dovecot and the quota plugin with debugging symbols
> too? This doesn't look too useful.
>
> johannes
>


Re: [Dovecot] Error using antispam plugin

2008-06-03 Thread Johannes Berg

> Program received signal SIGSEGV, Segmentation fault.
> 0x0809ea67 in mail_get_physical_size ()
> (gdb) bt full
> #0  0x0809ea67 in mail_get_physical_size ()
> No symbol table info available.
> #1  0xb7e795c5 in quota_mail_storage_created () from
> /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
> No symbol table info available.
> #2  0xb7e6d02d in antispam_save_finish (ctx=0x813b720) at
> antispam-storage-1.1.c:178
>   asbox = (struct antispam_mailbox *) 0x8124320
>   ast = (struct antispam_internal_context *) 0x8134978
>   dest_mail = (struct mail *) 0x8137310
>   ret = 135092783
> #3  0x0805a1c8 in _start ()
> No symbol table info available.

Hmm. Can you compile dovecot and the quota plugin with debugging symbols
too? This doesn't look too useful.

johannes


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Error using antispam plugin

2008-06-03 Thread Juan Asensio Sánchez
Hi

Thanks for the help, This is the result of the running commands:

pdc-server:~# dpkg -l | grep gdb
ii  gdb   6.4.90.dfsg-1
The GNU Debugger
ii  libgdbm3  1.8.3-3
GNU dbm database routines (runtime version)
pdc-server:~# dpkg -l | grep dovecot
ii  dovecot-common1.1.rc7-0~auto+1
secure mail server that supports mbox and ma
ii  dovecot-dev   1.1.rc7-0~auto+1
header files for the dovecot mail server
ii  dovecot-imapd 1.1.rc7-0~auto+1
secure IMAP server that supports mbox and ma
ii  dovecot-pop3d 1.1.rc7-0~auto+1
secure POP3 server that supports mbox and ma
pdc-server:~# ps aux | grep imap
dovecot   2749  0.0  0.5   3312  1512 ?S20:45   0:00 imap-login
dovecot   2824  0.0  0.5   3308  1508 ?S20:52   0:00 imap-login
dovecot   2848  0.4  0.5   3308  1508 ?S20:54   0:00 imap-login
mailuser  2849  1.0  0.4   2540  1280 ?S20:54   0:00
/usr/lib/dovecot/imap
root  2852  0.0  0.2   2880   752 pts/0R+   20:54   0:00 grep imap
pdc-server:~# gdb -p 2849
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
Attaching to process 2849
Reading symbols from /usr/lib/dovecot/imap...(no debugging symbols
found)...done.
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...(no debugging
symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /lib/tls/i686/cmov/libc.so.6...(no debugging
symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
Reading symbols from
/usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so...(no
debugging symbols found)...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so
Reading symbols from
/usr/lib/dovecot/modules/imap/lib90_antispam_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/lib90_antispam_plugin.so
Reading symbols from /usr/lib/dovecot/modules/imap/autocreate_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/autocreate_plugin.so
Failed to read a valid object file image from memory.
0xb7fba410 in ?? ()
(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x0809ea67 in mail_get_physical_size ()
(gdb) bt full
#0  0x0809ea67 in mail_get_physical_size ()
No symbol table info available.
#1  0xb7e795c5 in quota_mail_storage_created () from
/usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
No symbol table info available.
#2  0xb7e6d02d in antispam_save_finish (ctx=0x813b720) at
antispam-storage-1.1.c:178
asbox = (struct antispam_mailbox *) 0x8124320
ast = (struct antispam_internal_context *) 0x8134978
dest_mail = (struct mail *) 0x8137310
ret = 135092783
#3  0x0805a1c8 in _start ()
No symbol table info available.
(gdb)

Regards.

2008/6/3 Johannes Berg <[EMAIL PROTECTED]>:
> On Tue, 2008-06-03 at 00:51 +0200, Juan Asensio Sánchez wrote:
>> Well
>>
>> Finally i found the error. It look like antispam is not compatible
>> with quota plugin.
>>
>> mail_plugins = quota imap_quota autocreate antispam
>>
>> If i remove quota and imap_quota plugins from imap protocol,
>> everything works fine and the message is saved in sent folder.
>>
>> mail_plugins = autocreate antispam
>
> Ok, that explains why I don't see that problem.
>
>> If i enable again the plugins, the error happens again. Any solution?
>
>> > Now i have compiled dovecot-antispam plugin with the -g3 option in
>> > CFLAGS. What to do now?
>
> http://dovecot.org/bugreport.html
>
> The "debugging hangs" section is what I usually do: start mail client,
> "gdb -p $(pidof imap)", enter "cont" in gdb, do operation in mail client
> that crashes, get backtrace from gdb.
>
> johannes
>


Re: [Dovecot] Error using antispam plugin

2008-06-03 Thread Johannes Berg
On Tue, 2008-06-03 at 00:51 +0200, Juan Asensio Sánchez wrote:
> Well
> 
> Finally i found the error. It look like antispam is not compatible
> with quota plugin.
> 
> mail_plugins = quota imap_quota autocreate antispam
> 
> If i remove quota and imap_quota plugins from imap protocol,
> everything works fine and the message is saved in sent folder.
> 
> mail_plugins = autocreate antispam

Ok, that explains why I don't see that problem.

> If i enable again the plugins, the error happens again. Any solution?

> > Now i have compiled dovecot-antispam plugin with the -g3 option in
> > CFLAGS. What to do now?

http://dovecot.org/bugreport.html

The "debugging hangs" section is what I usually do: start mail client, 
"gdb -p $(pidof imap)", enter "cont" in gdb, do operation in mail client
that crashes, get backtrace from gdb.

johannes


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Error using antispam plugin

2008-06-02 Thread Juan Asensio Sánchez
Well

Finally i found the error. It look like antispam is not compatible
with quota plugin.

mail_plugins = quota imap_quota autocreate antispam

If i remove quota and imap_quota plugins from imap protocol,
everything works fine and the message is saved in sent folder.

mail_plugins = autocreate antispam

If i enable again the plugins, the error happens again. Any solution?

Regards.

2008/5/31 Juan Asensio Sánchez <[EMAIL PROTECTED]>:
> Hi again
>
> Testing with Dovecot 1.1RC7, and antispam plugin 31/05/2008, 18:00,
> the problem persists. The error ocurrs when Evolution/Thunderbird
> tries to save the message in the Sent folder (the message is sent and
> received by the recipient correctly). If i disable antispam plugin
> from IMAP protocol everything works fine.
>
> Sent folder has been autocreated and autosubscribed using the
> autocreate plugin. With plugin autocreate disabled and folders
> subscribed manually the problem persists.
>
> Now i have compiled dovecot-antispam plugin with the -g3 option in
> CFLAGS. What to do now?
>
> The errors shown by dovecot are these:
>
> dovecot: May 31 19:49:24 Error: child 16929 (imap) killed with signal 11
> dovecot: May 31 19:49:24 Error: child 16933 (imap) killed with signal 11
> dovecot: May 31 19:49:25 Error: child 16936 (imap) killed with signal 11
> dovecot: May 31 19:49:26 Error: child 16940 (imap) killed with signal 11
>
> In syslog, antispam plugin logs this (compiled with DEBUG_VERBOSE=1):
>
> May 31 19:51:33 pdc-server imap: antispam: plugin initialising
> May 31 19:51:33 pdc-server imap: antispam: "Trash" is trash folder
> May 31 19:51:33 pdc-server imap: antispam: "Junk" is spam folder
> May 31 19:51:33 pdc-server imap: antispam: mail backend spam address -r
> May 31 19:51:33 pdc-server imap: antispam: mail backend not-spam address -k
> May 31 19:51:33 pdc-server imap: antispam: mail backend sendmail
> /usr/bin/spamassassin
> May 31 19:51:33 pdc-server imap: antispam: mail backend tmpdir /tmp
>
> repeated for every child error.
>
> Regards.
>
> 2008/5/29 Juan Asensio Sánchez <[EMAIL PROTECTED]>:
>> No idea how to add the -g3 option to compile. Once done, how and where
>> is the gdb generated? I would need detailed help to do this.
>>
>> I know that it is known to not work, but if nobody uses it, then it
>> will never work.
>>
>> I think this plugin is great, a great way to classify SPAM without
>> difficult instructions for the final users. I will use the plugin with
>> SpamAssassin, not DSPAM.
>>
>> Regards.
>>
>> 2008/5/28 Timo Sirainen <[EMAIL PROTECTED]>:
>>> On Wed, 2008-05-28 at 06:43 -0400, Charles Marcus wrote:
 Right, all I saw was rc15... so many distros have locked onto that
 version for some reason...
>>>
>>> I think it's mainly RHEL / CentOS. But RHEL 5.2 was released this week
>>> with Dovecot 1.0.7 (or so I've heard), so perhaps we can soon get rid of
>>> 1.0.rc15 questions. :)
>>>
>>
>


Re: [Dovecot] Error using antispam plugin

2008-05-31 Thread Juan Asensio Sánchez
Hi again

Testing with Dovecot 1.1RC7, and antispam plugin 31/05/2008, 18:00,
the problem persists. The error ocurrs when Evolution/Thunderbird
tries to save the message in the Sent folder (the message is sent and
received by the recipient correctly). If i disable antispam plugin
from IMAP protocol everything works fine.

Sent folder has been autocreated and autosubscribed using the
autocreate plugin. With plugin autocreate disabled and folders
subscribed manually the problem persists.

Now i have compiled dovecot-antispam plugin with the -g3 option in
CFLAGS. What to do now?

The errors shown by dovecot are these:

dovecot: May 31 19:49:24 Error: child 16929 (imap) killed with signal 11
dovecot: May 31 19:49:24 Error: child 16933 (imap) killed with signal 11
dovecot: May 31 19:49:25 Error: child 16936 (imap) killed with signal 11
dovecot: May 31 19:49:26 Error: child 16940 (imap) killed with signal 11

In syslog, antispam plugin logs this (compiled with DEBUG_VERBOSE=1):

May 31 19:51:33 pdc-server imap: antispam: plugin initialising
May 31 19:51:33 pdc-server imap: antispam: "Trash" is trash folder
May 31 19:51:33 pdc-server imap: antispam: "Junk" is spam folder
May 31 19:51:33 pdc-server imap: antispam: mail backend spam address -r
May 31 19:51:33 pdc-server imap: antispam: mail backend not-spam address -k
May 31 19:51:33 pdc-server imap: antispam: mail backend sendmail
/usr/bin/spamassassin
May 31 19:51:33 pdc-server imap: antispam: mail backend tmpdir /tmp

repeated for every child error.

Regards.

2008/5/29 Juan Asensio Sánchez <[EMAIL PROTECTED]>:
> No idea how to add the -g3 option to compile. Once done, how and where
> is the gdb generated? I would need detailed help to do this.
>
> I know that it is known to not work, but if nobody uses it, then it
> will never work.
>
> I think this plugin is great, a great way to classify SPAM without
> difficult instructions for the final users. I will use the plugin with
> SpamAssassin, not DSPAM.
>
> Regards.
>
> 2008/5/28 Timo Sirainen <[EMAIL PROTECTED]>:
>> On Wed, 2008-05-28 at 06:43 -0400, Charles Marcus wrote:
>>> Right, all I saw was rc15... so many distros have locked onto that
>>> version for some reason...
>>
>> I think it's mainly RHEL / CentOS. But RHEL 5.2 was released this week
>> with Dovecot 1.0.7 (or so I've heard), so perhaps we can soon get rid of
>> 1.0.rc15 questions. :)
>>
>


Re: [Dovecot] Error using antispam plugin

2008-05-29 Thread Juan Asensio Sánchez
No idea how to add the -g3 option to compile. Once done, how and where
is the gdb generated? I would need detailed help to do this.

I know that it is known to not work, but if nobody uses it, then it
will never work.

I think this plugin is great, a great way to classify SPAM without
difficult instructions for the final users. I will use the plugin with
SpamAssassin, not DSPAM.

Regards.

2008/5/28 Timo Sirainen <[EMAIL PROTECTED]>:
> On Wed, 2008-05-28 at 06:43 -0400, Charles Marcus wrote:
>> Right, all I saw was rc15... so many distros have locked onto that
>> version for some reason...
>
> I think it's mainly RHEL / CentOS. But RHEL 5.2 was released this week
> with Dovecot 1.0.7 (or so I've heard), so perhaps we can soon get rid of
> 1.0.rc15 questions. :)
>


Re: [Dovecot] Error using antispam plugin

2008-05-28 Thread Timo Sirainen
On Wed, 2008-05-28 at 06:43 -0400, Charles Marcus wrote:
> Right, all I saw was rc15... so many distros have locked onto that 
> version for some reason...

I think it's mainly RHEL / CentOS. But RHEL 5.2 was released this week
with Dovecot 1.0.7 (or so I've heard), so perhaps we can soon get rid of
1.0.rc15 questions. :)


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Error using antispam plugin

2008-05-28 Thread Anders
Juan Asensio Sánchez wrote:

> I am using Dovecot1.1 rc15 compiled from Debian source repositories
> (http://xi.rename-it.nl/debian/) and last version of antispam plugin,
> obtained with git. Any idea or help to debug?

I believe that antispam has not been announced working with 1.1 yet.


Anders.




Re: [Dovecot] Error using antispam plugin

2008-05-28 Thread Johannes Berg

> I am using Dovecot1.1 rc15 compiled from Debian source repositories
> (http://xi.rename-it.nl/debian/) and last version of antispam plugin,
> obtained with git. Any idea or help to debug?

Well, compile with -g3 and attach gdb. It's known to not work, and I
never said it work would, in fact, the defconfig file you edited clearly
states:

# Dovecot version to build against
DOVECOT_VERSION=1.0
#DOVECOT_VERSION=1.1# CURRENTLY BROKEN

No further comments.

johannes


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Error using antispam plugin

2008-05-28 Thread Charles Marcus

On 5/28/2008, Juan Asensio Sánchez ([EMAIL PROTECTED]) wrote:

Well, i did a mistake, it is 1.1rc5 version, so i don't think this is
an old version.


Right, all I saw was rc15... so many distros have locked onto that 
version for some reason...


--

Best regards,

Charles


Re: [Dovecot] Error using antispam plugin

2008-05-28 Thread Juan Asensio Sánchez
Well, i did a mistake, it is 1.1rc5 version, so i don't think this is
an old version.

2008/5/28 Charles Marcus <[EMAIL PROTECTED]>:
> On 5/28/2008, Juan Asensio Sánchez ([EMAIL PROTECTED]) wrote:
>>
>> I am using Dovecot1.1 rc15 compiled from Debian source repositories
>> (http://xi.rename-it.nl/debian/) and last version of antispam plugin,
>> obtained with git. Any idea or help to debug?
>
> First... upgrade... this is a very old version.
>
> --
>
> Best regards,
>
> Charles
>


Re: [Dovecot] Error using antispam plugin

2008-05-28 Thread Charles Marcus

On 5/28/2008, Juan Asensio Sánchez ([EMAIL PROTECTED]) wrote:

I am using Dovecot1.1 rc15 compiled from Debian source repositories
(http://xi.rename-it.nl/debian/) and last version of antispam plugin,
obtained with git. Any idea or help to debug?


First... upgrade... this is a very old version.

--

Best regards,

Charles