Re: delayed expunge and subfolders

2006-10-20 Thread Leena Heino
In the cyrus.cache file there are always 10 cache fields per message. But 
what could cause this code in mailbox.c to fail in the middle of skipping 
over those fields:

 /* Compute size of this record */
 cacheitembegin = cacheitem = mailbox->cache_base + cache_offset;
 for (cache_ent = 0; cache_ent < NUM_CACHE_FIELDS; cache_ent++) {
 cacheitem = CACHE_ITEM_NEXT(cacheitem);
 }

I see this failure when I try to use cyr_expire with -X 1 or with any 
number greater than zero.

(gdb) frame 0
#0  process_records (mailbox=0xffbff080, newindex=0xe30a8,
index_base=0xfecd , exists=29,
deleted=0x2eb77c0, numdeleted=0xffbfbedc, quotadeleted=0xffbfbef0,
numansweredflag=0xffbfbeec, numdeletedflag=0xffbfbee8,
numflaggedflag=0xffbfbee4, newcache=0xe3098,
new_cache_total_size=0xffbfbee0, expunge_fd=-1, last_offset=0,
decideproc=0x16e18 , deciderock=0xffbffd60,
expunge_flags=2) at mailbox.c:1930
(gdb) p cache_ent
$1 = 8

OS: Solaris 9/Sparc
CC: Gcc 3.4.5
Cyrus: 2.3.7

--
  Leena Heino  University of Tampere / Computer Centre
  ( liinu at uta.fi )  ( http://www.uta.fi/laitokset/tkk )

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: delayed expunge and subfolders

2006-10-19 Thread Leena Heino
I've understood that this is supposed to mean that if delayed expuge is 
used and folder annotations does not specify anything else then messages 
are supposed to be deleted from all folders after two days.


More information. I tried to run the cyr_expire from shell and it segfaulted:
$ cyr_expire -E 3 -X 2 -v
expunging deleted messages in mailboxes older than 2 days
Segmentation Fault


But if define expunge delay to zero days then everything works ok and no 
segmentation faults:

$ cyr_expire -E 3 -X 0 -v
expunging deleted messages in mailboxes older than 0 days
expunged ...
$

--
  Leena Heino  University of Tampere / Computer Centre
  ( liinu at uta.fi )  ( http://www.uta.fi/laitokset/tkk )

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: delayed expunge and subfolders

2006-10-17 Thread Leena Heino

Is delayed expunge supposed to work in subfolders?

I have this in cyrus.conf:
delprune  cmd="cyr_expire -E 3 -X 2" at=0400

I've understood that this is supposed to mean that if delayed expuge is used 
and folder annotations does not specify anything else then messages are 
supposed to be deleted from all folders after two days.


More information. I tried to run the cyr_expire from shell and it 
segfaulted:

$ cyr_expire -E 3 -X 2 -v
expunging deleted messages in mailboxes older than 2 days
Segmentation Fault

(gdb) bt
#0  process_records (mailbox=0xffbff078, newindex=0xe2dd0,
index_base=0xfeca , exists=21,
deleted=0xe5b88, numdeleted=0xffbfbed4, quotadeleted=0xffbfbee8,
numansweredflag=0xffbfbee4, numdeletedflag=0xffbfbee0,
numflaggedflag=0xffbfbedc, newcache=0xe2dc0,
new_cache_total_size=0xffbfbed8, expunge_fd=-1, last_offset=0,
decideproc=0x16e18 , deciderock=0xffbffd58,
expunge_flags=2) at mailbox.c:1930
#1  0x0001ad08 in mailbox_expunge (mailbox=0xffbff078,
decideproc=0x16e18 , deciderock=0xffbffd58, flags=-4210808)
at mailbox.c:2306
#2  0x000170c8 in expire (name=0xffbff5d8 "user.atmaso",
matchlen=-4197520,
maycreate=1, rock=0xffbffd58) at cyr_expire.c:224
#3  0x0002034c in find_cb (rockp=0xffbffca8,
key=0xfc89b330 , keylen=11,
data=0xfc89b340 , datalen=37)
at mboxlist.c:1973
#4  0x00039d24 in myforeach (db=0xe4ad8, prefix=0xffbff8c8 "*",
prefixlen=0,
goodp=0x1ffbc , cb=0x20268 , rock=0xffbffca8,
tid=0x0) at cyrusdb_skiplist.c:996
#5  0x00020944 in mboxlist_findall (namespace=0x0, pattern=0xffbffd88 "*",
isadmin=1, userid=0x0, auth_state=0xffbff8c8, proc=0, rock=0xffbffca8)
at mboxlist.c:2165
#6  0x000173f8 in main (argc=6, argv=0xffbffe64) at cyr_expire.c:310


mailbox.c:1930
  1927  /* Compute size of this record */
  1928  cacheitembegin = cacheitem = mailbox->cache_base + 
cache_offset;
  1929  for (cache_ent = 0; cache_ent < NUM_CACHE_FIELDS; 
cache_ent++) {

  1930  cacheitem = CACHE_ITEM_NEXT(cacheitem);
  1931  }
  1932  cache_record_size = (cacheitem - cacheitembegin);
  1933  *new_cache_total_size += cache_record_size;
  1934
  1935  /* fwrite will automatically call write() in a sane 
way */


--
  Leena Heino  University of Tampere / Computer Centre
  ( liinu at uta.fi )  ( http://www.uta.fi/laitokset/tkk )

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


delayed expunge and subfolders

2006-10-17 Thread Leena Heino

Is delayed expunge supposed to work in subfolders?

I have this in cyrus.conf:
delprune  cmd="cyr_expire -E 3 -X 2" at=0400

I've understood that this is supposed to mean that if delayed expuge is 
used and folder annotations does not specify anything else then messages 
are supposed to be deleted from all folders after two days.


--
  Leena Heino  University of Tampere / Computer Centre
  ( liinu at uta.fi )  ( http://www.uta.fi/laitokset/tkk )

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html