Freebsd 11.0 RELEASE - ZFS deadlock

Henri Hennebert hlh at restart.be
Sun Nov 13 13:47:09 UTC 2016


On 11/13/2016 14:28, Henri Hennebert wrote:
> This 2 threads are innd processes. In core.txt.4:
>
>    8 14789 29165   0   24  4   40040   6612 zfs      DN    - 0:00.00 [innd]
>    8 29165     1   0   20  0   42496   6888 select   Ds    - 0:01.33 [innd]
>    8 49778 29165   0   24  4   40040   6900 zfs      DN    - 0:00.00 [innd]
>    8 82034 29165   0   24  4     132      0 zfs      DN    - 0:00.00 [innd]
>
> the corresponding info treads are:
>
>   687 Thread 101243 (PID=49778: innd)  sched_switch
> (td=0xfffff800b642b500, newtd=0xfffff8000285ea00, flags=<value optimized
> out>) at /usr/src/sys/kern/sched_ule.c:1973
>   681 Thread 101147 (PID=14789: innd)  sched_switch
> (td=0xfffff80065f4e500, newtd=0xfffff8000285f000, flags=<value optimized
> out>) at /usr/src/sys/kern/sched_ule.c:1973
>   669 Thread 101250 (PID=82034: innd)  sched_switch
> (td=0xfffff800b6429000, newtd=0xfffff8000285ea00, flags=<value optimized
> out>) at /usr/src/sys/kern/sched_ule.c:1973
>   665 Thread 101262 (PID=29165: innd)  sched_switch
> (td=0xfffff800b6b54a00, newtd=0xfffff8000285ea00, flags=<value optimized
> out>) at /usr/src/sys/kern/sched_ule.c:1973
>
In case it may help, I have a look at innd. This processes use 2 execv:

one to execute /bin/sh and the other to execute itself:

/*
**  Re-exec ourselves.
*/
static const char *
CCxexec(char *av[])
{
     char        *innd;
     char        *p;
     int         i;

     if (CCargv == NULL)
         return "1 no argv!";

     innd = concatpath(innconf->pathbin, "innd");
     /* Get the pathname. */
     p = av[0];
     if (*p == '\0' || strcmp(p, "innd") == 0)
         CCargv[0] = innd;
     else
         return "1 Bad value";

#ifdef DO_PERL
     PLmode(Mode, OMshutdown, av[0]);
#endif
#ifdef DO_PYTHON
     PYmode(Mode, OMshutdown, av[0]);
#endif
     JustCleanup();
     syslog(L_NOTICE, "%s execv %s", LogName, CCargv[0]);

     /* Close all fds to protect possible fd leaking accross successive 
innds. */
     for (i=3; i<30; i++)
         close(i);

     execv(CCargv[0], CCargv);
     syslog(L_FATAL, "%s cant execv %s %m", LogName, CCargv[0]);
     _exit(1);
     /* NOTREACHED */
     return "1 Exit failed";
}

The culprit may be /usr/local/news/bin/innd,

remember that find is locked in /usr/local/news/bin

Henri


More information about the freebsd-stable mailing list