0

I'm currently debugging a system which has a resource leak. It seems that we have too many pipse open. When I go the my /proc/PROC_ID/fd I see the list of pipes

l-wx------ 1 root root 64 Jun 30 12:32 100 -> pipe:[39199]
lr-x------ 1 root root 64 Jun 30 12:32 99 -> pipe:[39199]

this suggests an open pipe, with both RW ends. When I use lsof, I see that there are a lot of results with this pipe ID

COMMAND    PID  TID           USER   FD      TYPE             DEVICE  SIZE/OFF       NODE NAME
myapp      7209                root   99r     FIFO                0,8       0t0      39199 pipe
myapp      7209                root  100w     FIFO                0,8       0t0      39199 pipe
myapp      7209 7210           root   99r     FIFO                0,8       0t0      39199 pipe
myapp      7209 7210           root  100w     FIFO                0,8       0t0      39199 pipe
myapp      7209 7211           root   99r     FIFO                0,8       0t0      39199 pipe
myapp      7209 7211           root  100w     FIFO                0,8       0t0      39199 pipe
myapp      7209 7212           root   99r     FIFO                0,8       0t0      39199 pipe
...

so there are several threads using the pipes. Now, I need some help interpreting this info

  1. What is the ID next to the pipe (in ls)? Can I get it from the call to pipe() somehow?
  2. why does the type in lsof is FIFO and not PIPE? I checked http://man7.org/linux/man-pages/man8/lsof.8.html and there is a separate type for it. Did I get it wrong? I'm on RHEL 7.2 UPDATE to be more clear on the second question - judging by the pipe:[<number>] output of the ls, the object looks like an anonymous pipe. However, the lsof type is FIFO and not PIPE. I dont understand how these refer to the same object.

cheers

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.