winbind assertation failed (samba 3.0.32): both EVENT_FD_WRITE and EVENT_FD_READ are set for event

boyang boyang at suse.de
Fri Nov 21 17:03:14 GMT 2008


Volodymyr Khomenko wrote:
> Hi all,
>
> I've encountered pity issue with winbindd for samba 3.0.32:
> it claimed about 'asseration failed' inside nsswitch/winbindd.c:rw_callback. Corrsponding code looks like this:
>
> static void rw_callback(struct fd_event *event, int flags)
> {
> ...
>     if (event->flags & EVENT_FD_WRITE) {
>         SMB_ASSERT(flags == EVENT_FD_WRITE);
> ...
>     }
>     if (event->flags & EVENT_FD_READ) {
>         SMB_ASSERT(flags == EVENT_FD_READ);
> ...
>     }
> ...
> }
>
> I've checked this by gdb and received:
> #5  0x00da573b in rw_callback (event=0x9464f3c, flags=3) at nsswitch/winbindd.c:415
> #6  0x00da6ae3 in process_loop () at nsswitch/winbindd.c:924
> #7  0x00da7514 in main (argc=5, argv=0xbffc3414, envp=0xbffc342c) at nsswitch/winbindd.c:1195
>
> I see that flags=3 (both EVENT_FD_WRITE=2 and EVENT_FD_READ=1 are set by process_loop):
>
>     ev = fd_events;
>     while (ev != NULL) {
> ...
>         int flags = 0;
>         if (FD_ISSET(ev->fd, &r_fds))
>             flags |= EVENT_FD_READ;
>         if (FD_ISSET(ev->fd, &w_fds))
>             flags |= EVENT_FD_WRITE;
>         if (flags)
>             ev->handler(ev, flags);
> ...
>     }
>
> So what's wrong with such flags? Why do we suppose that only READ or WRITE flag has to be set?
>   
I think winbindd basically is stop-wait protocol, so in normal case,
READ and WRITE are mutual exclusive.
> Shouln'd we fix SMB_ASSERT statements to allow both flags?
>   
This probably doesn't lie in SMB_ASSERT. Did your winbind client crash
suddenly? I can think of one possible reasons for this.
two struct fd_event with the same fd exist in the linked list fd_events,
maybe. I am not sure, I have to do some test to verify this.
> Thanks for help,
> Volodymyr Khomenko
> Software Engineer - Core Technologies, Exanet Ltd.
>
>   

-------------- next part --------------
A non-text attachment was scrubbed...
Name: boyang.vcf
Type: text/x-vcard
Size: 187 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20081122/61673e2e/boyang.vcf


More information about the samba-technical mailing list