summaryrefslogtreecommitdiff
path: root/lib/lib_errors.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-06-12 21:13:18 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-06-13 15:14:04 -0400
commit45f3d590846a45836e287dbb208a2fed61db431a (patch)
tree17e5fcbb43d38b7c022d8e28a19145ff6ebcec54 /lib/lib_errors.c
parent42aac9b2abe62b3eae952ba690bdec855edc1ba7 (diff)
lib: Prevent infinite loop in fd handling
If we have a case where have created a fd for i/o and we have removed the handling thread but still have the fd in the poll data structure, there existed a case where we would get the handle this fd return from poll but we would immediately do nothing with it because we didn't have a thread to hand the event to. This leads to an infinite loop. Prevent the infinite loop from happening and log the problem. We still need to find the cause of this happening. But let's prevent the system from melting down in the mean time. Fixes: #2796 Signed-off-by: David Lamparter <equinox@diac24.net> Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/lib_errors.c')
-rw-r--r--lib/lib_errors.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/lib_errors.c b/lib/lib_errors.c
index b6c764d873..e0559f332d 100644
--- a/lib/lib_errors.c
+++ b/lib/lib_errors.c
@@ -51,6 +51,12 @@ static struct log_ref ferr_lib_warn[] = {
.suggestion = "Gather log data and open an Issue",
},
{
+ .code = EC_LIB_NO_THREAD,
+ .title = "The Event subsystem has detected an internal FD problem",
+ .description = "The Event subsystem has detected a file descriptor read/write event without an associated handling function. This is a bug, please collect log data and open an issue.",
+ .suggestion = "Gather log data and open an Issue",
+ },
+ {
.code = EC_LIB_RMAP_RECURSION_LIMIT,
.title = "Reached the Route-Map Recursion Limit",
.description = "The Route-Map subsystem has detected a route-map depth of RMAP_RECURSION_LIMIT and has stopped processing",