xffm - xfsamba4 broken in 5-stable?

From: Andriy Gapon (avg_at_icyb.net.ua)
Date: 05/31/05

  • Next message: bruce_at_nikkel.com: "Re: IP Firewalling by DNS name"
    Date: Tue, 31 May 2005 20:39:47 +0300
    To: freebsd-stable@freebsd.org
    
    

    I've had the same problem and I think everybody using recent FreeBSD has
    it. The culprit seems to be the following line in tubo.c:

    if (kill(PID,SIGCONT) == 0) return TRUE;

    I am not sure about other OS's and what POSIX mandates in this case, but
    FreeBSD 5.4 allows to send signals to child processes that have exited
    but have not been reaped by parent. They show up in ps like this:
     5320 pd Z+ 0:00,05 <defunct>

    Because of the quoted line of code nmblookup processes are never reaped
    and xfsamba4 goes into infinite loop.

    Probably FreeBSD 5.1 had problems with respect to the described
    situation (it was an experimental release after all) and that line was a
    work-around for some FreeBSD bug, but now it actually breaks things.

    Removing that line fixed xfsamba4 for me, but I encountered another
    problem after that, my PDC (NT4) doesn't respond to the following
    request (Samba3 client):
            nmblookup -A <master browser ip>
    so instead I had to use
            nmblookup -M -S -- -
    and this made xfsamba4 perfectly well.

    P.S. just found the following about POSIX, kill, and defunct child
    processes:

    http://www.opengroup.org/onlinepubs/009695399/functions/kill.html

    Existing implementations vary on the result of a kill() with pid
    indicating an inactive process (a terminated process that has not been
    waited for by its parent). Some indicate success on such a call (subject
    to permission checking), while others give an error of [ESRCH]. Since
    the definition of process lifetime in this volume of IEEE Std
    1003.1-2001 covers inactive processes, the [ESRCH] error as described is
    inappropriate in this case. In particular, this means that an
    application cannot have a parent process check for termination of a
    particular child with kill(). (Usually this is done with the null
    signal; this can be done reliably with waitpid().)

    -- 
    Andriy Gapon
    _______________________________________________
    freebsd-stable@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-stable
    To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
    

  • Next message: bruce_at_nikkel.com: "Re: IP Firewalling by DNS name"

    Relevant Pages

    • Sending -ABRT signal to multi-threaded process
      ... I'm having trouble sending signals to a multi-threaded process on FreeBSD ... The process seems to lock up, possibly due to a mutex problem (the lockup ... the process to kill it and obtain a core dump, ... Guy Helmer, Ph.D., Principal System Architect, Palisade Systems, Inc. ...
      (freebsd-current)
    • RE: FBSD 5.5 and software timers
      ... timeouts, and has since FreeBSD 3.4. ... This dependency has ... One of my threads doesn't run, and it won't die (kill -9 doesn't even ...
      (freebsd-hackers)
    • xine and arts
      ... packages) on FreeBSD 5.2: ... If xine uses arts for audio-output, ... I have to kill it with 'kill -9' although ps marks it as runnable. ... that the price is always so low." ...
      (freebsd-questions)
    • Re: no more /var/run/sendmail.pid file
      ... Noah wrote: ... FreeBSD 4.11 ... kill -signal_number pid ... ...
      (freebsd-questions)
    • Problem with SIGILL: EPERM
      ... With NSD on FreeBSD 5.2-CURRENT, we found that a SIGILL signal, ... This happens when the parent process is initiated by root (to open ... and then fork a child. ... The problem is reproducable on FreeBSD 5.2-CURRENT and MacOS X 10.3.4, ...
      (freebsd-current)