From 9118c9517dc62ea9c6a8291c92a818721dba6777 Mon Sep 17 00:00:00 2001 From: Christos Tsantilas Date: Fri, 15 Dec 2017 01:44:12 +0200 Subject: [PATCH] Squid FTP server dying because of an unhandled exception. (#102) Related message in cache.log: FATAL: Dying from an exception handling failure; exception: reply Unfortunately, Squid does not report the exact place where the exception was thrown, however the most possible reason is a "Must(reply)" failure inside Ftp::Server::writeErrorReply. This is a Measurement Factory project --- src/servers/FtpServer.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/servers/FtpServer.cc b/src/servers/FtpServer.cc index 47521c9832..e5033c7e46 100644 --- a/src/servers/FtpServer.cc +++ b/src/servers/FtpServer.cc @@ -1126,10 +1126,12 @@ Ftp::Server::writeErrorReply(const HttpReply *reply, const int scode) } #endif - Must(reply); - const char *reason = reply->header.has(Http::HdrType::FTP_REASON) ? - reply->header.getStr(Http::HdrType::FTP_REASON): - reply->sline.reason(); + const char *reason = "Lost Error"; + if (reply) { + reason = reply->header.has(Http::HdrType::FTP_REASON) ? + reply->header.getStr(Http::HdrType::FTP_REASON): + reply->sline.reason(); + } mb.appendf("%i %s\r\n", scode, reason); // error terminating line -- 2.47.3