PANIC: internal error when deleting users

Gianni L slowsin at gmail.com
Sat Nov 13 15:32:41 MST 2010


done.. uhm.. why I dind't thought about it by myself? XD
but thx for the hint and the help :)

Gianni

On Sat, Nov 13, 2010 at 10:37 PM, Michael Wood <esiotrot at gmail.com> wrote:
> Hi
>
> On 10 November 2010 17:26, Gianni L <slowsin at gmail.com> wrote:
>> Hello,
>> it's me again! maybe I have some good/strange news.
>> I just took some time from work to compare the different entries from
>> the ldifde exported files and I found that the entries that caused the
>> crash have all a comma in the "dn", the "cn" and the
>> "distinguishedName".
>
> You should probably create a bug at https://bugzilla.samba.org/ with
> all of the information from this thread so that it does not get
> forgotten.
>
>> for example an ldif entry containing the following:
>>
>> dn: CN=Name\, Surname,DC=my,DC=test,DC=domain
>> cn: Name, Surname
>> distinguishedName: CN=Name\, Surname,DC=my,DC=test,DC=domain
>>
>> will be imported fine, but makes the damon crash when trying to delete
>> the entry.
>>
>> so most probably  ldb_dn_validate(dn) returns NULL when there is a
>> "\," in the CN.
>>
>> hope this infos helps you now..
>>
>> greets
>> Gianni
>>
>>
>> On Tue, Nov 9, 2010 at 7:13 PM, Matthias Dieter Wallnöfer <mdw at samba.org> wrote:
>>> 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