Project

General

Profile

Actions

Bug #1741

closed

NFD failure due to local_endpoint error in UnixStreamFace

Added by Alex Afanasyev almost 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Normal
Category:
Faces
Target version:
Start date:
07/07/2014
Due date:
% Done:

100%

Estimated time:

Description

I cannot yet give steps to reproduce the problem, but I got a fatal error (exception that was handled in main()) after re-connecting many times with test cases.

Here is final log:

1404778977.777579 TRACE: [UnixStreamFace] [id:-1,endpoint:1404778977.777665 FATAL: [NFD] local_endpoint: Bad file descriptor
1404778977.777831 TRACE: [UnixStreamChannel] [/private/var/run/nfd.sock] Removing socket file

Most likely this error wouldn't be there when logging is disabled, but all logging should be checked again not to include local_endpoint() when it can cause error.

Actions #1

Updated by Davide Pesavento almost 10 years ago

The problem is most likely in StreamFace send or receive path, since there's no NFD_LOG_TRACE in UnixStreamFace. What's the message it was trying to log?

Actions #2

Updated by Alex Afanasyev almost 10 years ago

Unfortunately, I don't know exactly which exactly the message is and the error hasn't re-appeared again.

Actions #3

Updated by Alex Afanasyev almost 10 years ago

  • Status changed from New to In Progress
  • Assignee set to Alex Afanasyev

I will replace calls to local_endpoint() getLocalUri(). This is basically the same thing, but it would guarantee exception-safe behavior.

Actions #4

Updated by Alex Afanasyev almost 10 years ago

  • Status changed from In Progress to Code review
  • % Done changed from 0 to 100
Actions #5

Updated by Junxiao Shi almost 10 years ago

  • Description updated (diff)
  • Status changed from Code review to In Progress
  • % Done changed from 100 to 0

I basically agree with the solution in note-4.

However, why is local_endpoint or local FaceUri useful in UnixStreamFace log messages?
FaceId or file descriptor is sufficient.

Actions #6

Updated by Junxiao Shi almost 10 years ago

  • Status changed from In Progress to Code review
  • % Done changed from 0 to 100
Actions #7

Updated by Alex Afanasyev almost 10 years ago

It may not be useful that much and I wouldn't insist much on keeping it. The thing is that unix and tcp face are sharing the implementation and printing it in tcp case may be useful in some cases.

Actions #8

Updated by Alex Afanasyev almost 10 years ago

  • Status changed from Code review to Closed
Actions

Also available in: Atom PDF