2

What is "can't identify protocol" when I run the command /usr/sbin/lsof -p 20085. The output of lsof is shown below

leak 20085 niki 3910u  sock        0,5            2457507716 can't identify protocol
leak 20085 niki 3911u  sock        0,5            2457508136 can't identify protocol
leak 20085 niki 3912u  sock        0,5            2457509392 can't identify protocol
leak 20085 niki 3913u  sock        0,5            2457510457 can't identify protocol
leak 20085 niki 3915u  sock        0,5            2457510696 can't identify protocol
leak 20085 niki 3916u  sock        0,5            2457511180 can't identify protocol
leak 20085 niki 3917u  sock        0,5            2457511820 can't identify protocol
leak 20085 niki 3918u  sock        0,5            2457512402 can't identify protocol
leak 20085 niki 3919u  sock        0,5            2457513490 can't identify protocol
leak 20085 niki 3920u  sock        0,5            2457513493 can't identify protocol
leak 20085 niki 3921u  sock        0,5            2457643983 can't identify protocol
leak 20085 niki 3922u  sock        0,5            2457645099 can't identify protocol
leak 20085 niki 3923u  sock        0,5            2457645570 can't identify protocol
leak 20085 niki 3924u  sock        0,5            2457646223 can't identify protocol
leak 20085 niki 3911u  sock        0,5            2457508136 can't identify protocol
leak 20085 niki 3912u  sock        0,5            2457509392 can't identify protocol

and why this leak always been sock 0,5.

Note : I am creating three sockets which must be always been opened at runtime, apart from this there are no files/sockets been created and my question is I am getting around 5000+ can't identify protocol. Why is this so?

Thanks.

Will
  • 24,082
  • 14
  • 97
  • 108
Nikhil
  • 576
  • 1
  • 11
  • 31
  • 2
    You never close or re-open the sockets? How do you open the sockets? What is the call-chain to the socket opening? Are they listening sockets or do you connect to some server? – Some programmer dude Jan 16 '12 at 07:07
  • Why is this tagged as C? – Ian Collins Jan 16 '12 at 08:17
  • @Joachim Pileborg. I am using socket(2) system call for opening the sockets. I will never close the sockets and i am creating only 3 socket. And the scokets will connect to some server. – Nikhil Jan 16 '12 at 10:37

1 Answers1

2

Probably you are creating the sockets in your function call which is called in a loop, but the created socket is never closed and this results in a leak.

b0ti
  • 2,319
  • 1
  • 18
  • 18