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