NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/54068: ATF tests hung in pipe2_consume



The following reply was made to PR bin/54068; it has been noted by GNATS.

From: Andreas Gustafsson <gson%gson.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: bin/54068: ATF tests hung in pipe2_consume
Date: Sat, 20 Apr 2019 12:34:23 +0300

 I reproduced the problem on a system built with debug symbols,
 and see that atf-run is hung reading file descriptor 4:
 
   (gdb) where
   #0  0x0000700e5044292a in read () from /usr/lib/libc.so.12
   #1  0x000000010a816d0f in safe_read (report_errors=false, nbytes=1023, 
       buffer=0x700e517c2000, fd=4)
       at /usr/src/external/bsd/atf/dist/tools/io.cpp:258
   [etc]
 
 Per fstat(1), that's a pipe:
 
   # fstat | grep atf-run
   root     atf-run     2477   wd  /          964002 drwxr-xr-x    2048 r 
   root     atf-run     2477    0  /         2046084 crw-------  console rw
   root     atf-run     2477    1  /          664453 -rw-r--r--   47486 w 
   root     atf-run     2477    2  /          664453 -rw-r--r--   47486 w 
   root     atf-run     2477    3* rnd "509 31 1" flags 0x3<INIT_ANY,REKEY_ANY>
   root     atf-run     2477    4* pipe 0xffff81351176dea0 <- 0xffff81351c7da8a0 r
   root     atf-run     2477    6* pipe 0xffff81351176dd70 <- 0x0 r
 
 But when I try to identify the process at the other end of the pipe by
 running "fstat | grep 0xffff81351c7da8a0", I see three (!) processes
 referring to that PCB address: the atf-run process and the two ends of
 some entirely unrelated pipe:
 
   # fstat | grep 0xffff81351c7da8a0
   root     grep        3024    0* pipe 0xffff813509ac8d88 <- 0xffff81351c7da8a0 r
   root     fstat       2899    1* pipe 0xffff81351c7da8a0 -> 0xffff813509ac8d88 w
   root     atf-run     2477    4* pipe 0xffff81351176dea0 <- 0xffff81351c7da8a0 r
 
   # sleep 100 | sleep 100 &
 
   # fstat | grep 0xffff81351c7da8a0
   root     sleep       3046    0* pipe 0xffff813509ac8eb8 <- 0xffff81351c7da8a0 r
   root     sleep       2530    1* pipe 0xffff81351c7da8a0 -> 0xffff813509ac8eb8 w
   root     atf-run     2477    4* pipe 0xffff81351176dea0 <- 0xffff81351c7da8a0 r
 
 Is that supposed to happen?
 -- 
 Andreas Gustafsson, gson%gson.org@localhost
 


Home | Main Index | Thread Index | Old Index