cyrusimap / cyrus-imapd

Cyrus IMAP is an email, contacts and calendar server
http://cyrusimap.org
Other
544 stars 149 forks source link

squatter exits with bus error #1299

Open brong opened 13 years ago

brong commented 13 years ago

From: Rudy Gevaert Bugzilla-Id: 3441 Version: 2.4.6 Owner: Bron Gondwana

brong commented 13 years ago

From: Rudy Gevaert

Hi,

It als seems that our squatter is having problems:

Core was generated by `/usr/cyrus-2.4.6/bin/squatter -C /etc/cyrus-ugent/conf/mail12/imapd.conf -s -i'. Program terminated with signal 7, Bus error.

0 squat_scan_recurse (s=0x7f2afed135fe <Address 0x7f2afed135fe out of

bounds>, data_end=0x7f2afed1b0cc <Address 0x7f2afed1b0cc out of bounds>, name=0x7fff32e33b30 "9 &i", level=3, handler=0x431260 <squat_count_docs_callback>, closure=0x7fff32e33fec) at squat.c:687 687 squat.c: No such file or directory. in squat.c (gdb) bt

0 squat_scan_recurse (s=0x7f2afed135fe <Address 0x7f2afed135fe out of

bounds>, data_end=0x7f2afed1b0cc <Address 0x7f2afed1b0cc out of bounds>, name=0x7fff32e33b30 "9 &i", level=3, handler=0x431260 <squat_count_docs_callback>, closure=0x7fff32e33fec) at squat.c:687

1 0x0000000000431809 in squat_scan_recurse (s=0x7f2afed135fe <Address

0x7f2afed135fe out of bounds>, data_end=<value optimized out>, name=0x7fff32e33b30 "9 &i", level=<value optimized out>, handler=<value optimized out>, closure=<value optimized out>) at squat.c:749

2 0x0000000000431809 in squat_scan_recurse (s=0x7f2afed135fe <Address

0x7f2afed135fe out of bounds>, data_end=<value optimized out>, name=0x7fff32e33b30 "9 &i", level=<value optimized out>, handler=<value optimized out>, closure=<value optimized out>) at squat.c:749

3 0x0000000000431d34 in squat_count_docs (index=0x27d1b10, first_char=57 '9',

counter=0x7fff32e33fec) at squat.c:952

4 0x000000000041221b in dump_index_trie_words (index=0x27ae270, OK=<value

optimized out>) at squat_build.c:1375

5 index_close_internal (index=0x27ae270, OK=<value optimized out>) at

squat_build.c:1545

6 0x00000000004076e8 in squat_single (state=0x279e030, incremental=1) at

squatter.c:482

7 0x0000000000407c9f in index_me (name=0x2635cc0

"ugent.be!user.els^baerten.Drafts", matchlen=<value optimized out>, maycreate=<value optimized out>, rock=<value optimized out>) at squatter.c:623

8 0x0000000000408104 in main (argc=5, argv=0x7fff32e35c38) at squatter.c:745

brong commented 13 years ago

From: Rudy Gevaert

I've nailed it down to a specific mailbox:

cyrus@cyrprd2:~$ gdb /usr/cyrus-2.4.6/bin/squatter GNU gdb (GDB) 7.0.1-debian Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt; This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/&gt;... Reading symbols from /usr/cyrus-2.4.6/bin/squatter...done. (gdb) run -C /etc/cyrus-ugent/conf/mail12/imapd.conf -s -i -r user/els.baerten@ugent.be Starting program: /usr/cyrus-2.4.6/bin/squatter -C /etc/cyrus-ugent/conf/mail12/imapd.conf -s -i -r user/els.baerten@ugent.be [Thread debugging using libthread_db enabled]

Program received signal SIGBUS, Bus error. squat_scan_recurse (s=0x7ffff28675fe <Address 0x7ffff28675fe out of bounds>, data_end=0x7ffff286f0cc "", name=0x7fffffffbd10 "9 &i", level=3, handler=0x431260 <squat_count_docs_callback>, closure=0x7fffffffc1cc) at squat.c:687 687 squat.c: No such file or directory. in squat.c (gdb) bt

0 squat_scan_recurse (s=0x7ffff28675fe <Address 0x7ffff28675fe out of bounds>, data_end=0x7ffff286f0cc "", name=0x7fffffffbd10 "9 &i", level=3, handler=0x431260 <squat_count_docs_callback>,

closure=0x7fffffffc1cc) at squat.c:687

1 0x0000000000431809 in squat_scan_recurse (s=0x7ffff28675fe <Address 0x7ffff28675fe out of bounds>, data_end=<value optimized out>, name=0x7fffffffbd10 "9 &i", level=<value optimized out>,

handler=&lt;value optimized out&gt;, closure=&lt;value optimized out&gt;) at squat.c:749

2 0x0000000000431809 in squat_scan_recurse (s=0x7ffff28675fe <Address 0x7ffff28675fe out of bounds>, data_end=<value optimized out>, name=0x7fffffffbd10 "9 &i", level=<value optimized out>,

handler=&lt;value optimized out&gt;, closure=&lt;value optimized out&gt;) at squat.c:749

3 0x0000000000431d34 in squat_count_docs (index=0x779d90, first_char=57 '9', counter=0x7fffffffc1cc) at squat.c:952

4 0x000000000041221b in dump_index_trie_words (index=0x7763e0, OK=<value optimized out>) at squat_build.c:1375

5 index_close_internal (index=0x7763e0, OK=<value optimized out>) at squat_build.c:1545

6 0x00000000004076e8 in squat_single (state=0x7757a0, incremental=1) at squatter.c:482

7 0x0000000000407c9f in index_me (name=0x7fffffffccf0 "ugent.be!user.els^baerten.Drafts", matchlen=<value optimized out>, maycreate=<value optimized out>, rock=<value optimized out>) at squatter.c:623

8 0x000000000041ec0e in find_cb (rockp=0x7fffffffda10, key=<value optimized out>, keylen=32, data=<value optimized out>, datalen=<value optimized out>) at mboxlist.c:1697

9 0x000000000044a8ae in myforeach (db=0x775220, prefix=<value optimized out>, prefixlen=26, goodp=<value optimized out>, cb=<value optimized out>, rock=<value optimized out>, tidptr=0x0)

at cyrusdb_skiplist.c:1122

10 0x000000000041dbc5 in mboxlist_findall (namespace=<value optimized out>, pattern=<value optimized out>, isadmin=1, userid=<value optimized out>, auth_state=<value optimized out>,

proc=&lt;value optimized out&gt;, rock=0x7fffffffeaec) at mboxlist.c:1889

11 0x0000000000407f88 in main (argc=7, argv=<value optimized out>) at squatter.c:757

(gdb)

brong commented 13 years ago

From: Bron Gondwana

I'm looking at it :)

brong commented 13 years ago

From: Bron Gondwana

I'm going to leave this one for 'future'. First I need to see what's wrong with the specific squatter file!

brong commented 13 years ago

From: Bron Gondwana

Tuning this right down - the file can certainly kill squatter on 2.4.6, and doesn't on 2.4.8 - but I don't think it's because we've fixed anything - more that the memory layout is slightly different and it's trashing something else. Squatter is nasty nasty code :(