PANIC: internal error when deleting users

Matthias Dieter Wallnöfer mdw at samba.org
Tue Nov 9 11:13:58 MST 2010


The next step to check would be to find out where a DN with absolutely 
no RDN value could be/was created. This place needs fixing.

Greets,
Matthias

Gianni L wrote:
> thanks Michael,
> doing a little check after calling ldb_dn_get_rdn_val() solves the
> crashing issue.
> but I still think I f*cked up my tdb files yesterday when I tried to
> delete the whole subtree from the directory.
> the "net ads user -S altair -U administrator" gives me the whole list
> of the users I imported yesterday.
> but not everyone of that users "exists" anymore in the db.
> fact is that if I try to delete a user where the information is still
> consistent in the directory it makes no problem but if I tried to
> delete another user the samba damon crashed.
> is there a way to repair the db files?
> if there's no way it's not a problem 'cause it's still a testserver :)
> thanks
> Gianni
>
> On Tue, Nov 9, 2010 at 3:48 PM, Michael Wood<esiotrot at gmail.com>  wrote:
>    
>> On 9 November 2010 15:11, Gianni L<slowsin at gmail.com>  wrote:
>>      
>>> yeah! I think I finally got it :)
>>> here's now a more detailed backtrace of the crash..
>>> sorry for my inexperience with debugging tools :)
>>> hope the info helps a bit..
>>>        
>> OK, so val is NULL in ldb_msg_add_value().  It comes from this line
>> insource4/dsdb/samdb/ldb_modules/repl_meta_data.c:
>>
>> ret = ldb_msg_add_value(msg, strlower_talloc(tmp_ctx, rdn_name),
>> new_rdn_value,&el);
>>
>> i.e. new_rdn_value is NULL.
>>
>> new_rdn_value is set just above that:
>>
>>                 /* work out what the new rdn value is, for updating the
>>                    rDN and name fields */
>>                 new_rdn_value = ldb_dn_get_rdn_val(new_dn);
>>
>> and ldb_dn_get_rdn_val() does this:
>>
>> const struct ldb_val *ldb_dn_get_rdn_val(struct ldb_dn *dn)
>> {
>>         if ( ! ldb_dn_validate(dn)) {
>>                 return NULL;
>>         }
>>         if (dn->comp_num == 0) return NULL;
>>         return&dn->components[0].value;
>> }
>>
>> So it seems there should be a check after calling ldb_dn_get_rdn_val()
>> to see if it returned NULL, or else the NULL value should be handled
>> in ldb_msg_add_value().
>>
>>      
>>> On Tue, Nov 9, 2010 at 1:17 PM, Michael Wood<esiotrot at gmail.com>  wrote:
>>>
>>>        
>>>> Hi
>>>>
>>>> On 9 November 2010 13:29, Gianni L<slowsin at gmail.com>  wrote:
>>>>          
>>>>> Hi Mat,
>>>>> sorry but I can't find any samba-segfault script, neither in the install
>>>>> location of samba 4 neither in the sourcecode :(
>>>>> tried even to search in the git sources of another computer and there's
>>>>> anything.
>>>>> if someone could provide me a copy of the script I would be happy to run
>>>>> another test and provide the results :)
>>>>>            
>>>> I don't have a samba-segfault script either, but try running "bt full"
>>>> in gdb when Samba crashes.  That will provide lots more useful
>>>> information.
>>>>
>>>> I've just found "examples/scripts/debugging/linux/backtrace" which
>>>> might be the script Matthieu is referring to.
>>>>          
>> --
>> Michael Wood<esiotrot at gmail.com>
>>
>>      
>    



More information about the samba-technical mailing list