Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Aug 2002 19:26:39 +0200 (MET DST)
From:      =?iso-8859-1?Q?Henrik_Grubbstr=F6m?= <grubba@roxen.com>
To:        Ian Dowse <iedowse@FreeBSD.org>
Cc:        "freebsd-bugs@FreeBSD.org" <freebsd-bugs@FreeBSD.org>
Subject:   Re: misc/22190: A threaded read(2) from a socketpair(2) fd can sometimes fail with errno 19 (ENODEV)
Message-ID:  <Pine.GSO.4.21.0208201909300.1002-100000@jms.roxen.com>
In-Reply-To: <200208111957.g7BJvETx050200@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 11 Aug 2002, Ian Dowse wrote:

> Synopsis: A threaded read(2) from a socketpair(2) fd can sometimes fail with errno 19 (ENODEV)
> 
> State-Changed-From-To: open->feedback
> State-Changed-By: iedowse
> State-Changed-When: Sun Aug 11 12:56:44 PDT 2002
> State-Changed-Why: 
> 
> Does this problem still occur on more recent releases?

Yes, one of the machines in our build farm running FreeBSD 4.5-PRERELEASE
i386 just triggered the bug:

Process.create_process(): read(2) failed with ENODEV!
Probable operating system bug.
native module.Builtin.create_process: create(({"/bin/sleep","99999"}))
testsuite:11: gnapp(7)

The code I quoted in the original report has in more recent versions of
Pike been changed to (excerpt):

        case 0:
          /* read() probably failed. */
        default:
#ifdef ENODEV
          if ((e < 0) && (olderrno == ENODEV)) {
            /* This occurrs sometimes on FreeBSD... */
            Pike_error("Process.create_process(): read(2) failed with ENODEV!\n"
                       "Probable operating system bug.\n");
          }
#endif /* ENODEV */
          Pike_error("Process.create_process(): "
                "Child failed: %d, %d, %d, %d, %d!\n",
                buf[0], buf[1], buf[2], e, olderrno);
          break;

Thus the different error message. The rest of the code is essentially the
same.

Hmm... It seems to be a different test that triggered the bug, but the
end result is the same. The test that triggs the bug this time starts 10
threads, and from each of the threads starts 7*150 /bin/sleep 99999
processes one at a time, killing them immediately with SIG_KILL:

/home/kiwi/xeno/client/pike/labserver.isdnet.net/buildtmp/Pike7.3-20020820-155024/src/testsuite.in:9286: Test
10069 (shift 2) failed.
  0: mixed a() { 
  1:   class Fnord
  2:   {
  3: int gnapp(int t)
  4: {
  5:   int e;
  6:   for(e=0;e<7;e++)
  7:   {
  8:     for(int d=0;d<150;d++)
  9:     {
 10:       object o=Process.create_process(({\"/bin/sleep\",\"99999\"}));
 11:       kill( o->pid(), 9 );
 12:       o->wait();
 13:     }
 14:     __signal_watchdog();
 15: //    werror(\"%d\",t);
 16:   }
 17:   return -1;
 18: }
 19: 
 20: array start()
 21: {
 22:   array a=({});
 23:   for(int e=0;e<10;e++)
 24:     a+=({thread_create(gnapp,e)});
 25:   return a;
 26: }
 27: };
 28: 
 29: return Fnord()->start()->wait()-({ -1 });
 30: ; }
 31: mixed b() { return  ({}) ; }
 32: 

o->a(): ({ /* 1 element */
    0
})
o->b(): ({ })

> http://www.freebsd.org/cgi/query-pr.cgi?pr=22190

Thanks,

--
Henrik Grubbström					grubba@roxen.com
Roxen Internet Software AB


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.21.0208201909300.1002-100000>