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

Re: (ITS#4614) slapcat segfault with subordinate



Andreas Hasenack wrote:
> On Fri, Jul 14, 2006 at 08:26:56PM +0000, hyc@symas.com wrote:
>   
>> ahasenack@terra.com.br wrote:
>>     
>>> Full_Name: Andreas Hasenack
>>> Version: 2.3.24
>>> OS: linux
>>> URL: ftp://ftp.openldap.org/incoming/
>>> Submission from: (NULL) (200.140.247.99)
>>>
>>>
>>> I have two databases glued together with the glue overlay. Whenever I use
>>> "slapcat", I get a segfault:
>>>
>>> Program received signal SIGSEGV, Segmentation fault.
>>> glue_tool_entry_first (b0=0x81c3460) at backglue.c:636
>>> 636             return glueBack->be_entry_first (glueBack);
>>> (gdb) bt
>>> #0  glue_tool_entry_first (b0=0x81c3460) at backglue.c:636
>>> #1  0x080c52b5 in glue_tool_entry_next (b0=0x81c3460) at backglue.c:667
>>> #2  0x080c80b4 in slapcat (argc=1, argv=0xbfdbd8a4) at slapcat.c:82
>>> #3  0x08058951 in main (argc=1, argv=0xbfdbd8a4) at main.c:353
>>> (gdb) p glueBack
>>> $7 = (BackendDB *) 0x0
>>>   
>>>       
>> That's interesting, especially since  line 632 explicitly checks for a 
>> NULL here and bails out. You may have to set a breakpoint and step thru 
>> that function to see why line 632 didn't prevent this SEGV.
>>     
>
>         if (!glueBack || !glueBack->be_entry_open || !glueBack->be_entry_first ||
>                 glueBack->be_entry_open (glueBack, glueMode) != 0)
>                 return NOID;
>
>         return glueBack->be_entry_first (glueBack);
>
> glueBack is not 0x0 when it enters this "if". It's 0x0 after the
> glueBack->be_entry_open call. This points to glue_tool_entry_open, which always
> returns zero

Need to see your slapd.conf; glue_tool_entry_open should only ever get 
called once at program startup, not anywhere in the midst of traversing 
the DBs.

-- 
  -- Howard Chu
  Chief Architect, Symas Corp.  http://www.symas.com
  Director, Highland Sun        http://highlandsun.com/hyc
  OpenLDAP Core Team            http://www.openldap.org/project/