[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#3764) deadlocked bdb



Aaron Richton wrote:
> OK, that's exactly what happened -- the first time through, I was getting
> more than I wanted, so I sigint'd slapcat and reran as slapcat | grep the
> second time around (which I did see to completion).
>
> Wow, this explains a lot of weird shutdown behavior. I would have thought
> it safe to use read-only tools with impunity, but dangling locks like this
> prove otherwise...
I've committed a patch for slapcat in HEAD that adds appropriate signal 
handlers to make it shutdown cleanly.

I have left slapadd/slapindex alone because they cannot be run while 
slapd is running. As such, if you interrupt them,
you can just do a manual db_recover (or in 2.3 you can allow back-bdb to 
auto recover) without hurting anything else. If slapcat is running 
concurrently with slapd, you cannot use db_recover after slapcat fails 
because that would destroy the environment while slapd is still using it 
(and that would be Very Bad).

I've left all of the other slap tools alone since none of them can have 
long run times.
-- 
  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support