Bug #1741
closed
NFD failure due to local_endpoint error in UnixStreamFace
Added by Alex Afanasyev over 10 years ago.
Updated over 10 years ago.
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.
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?
Unfortunately, I don't know exactly which exactly the message is and the error hasn't re-appeared again.
- 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.
- Status changed from In Progress to Code review
- % Done changed from 0 to 100
- 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.
- Status changed from In Progress to Code review
- % Done changed from 0 to 100
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.
- Status changed from Code review to Closed
Also available in: Atom
PDF