]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Squid FTP server dying because of an unhandled exception. (#102)
authorChristos Tsantilas <christos@chtsanti.net>
Thu, 14 Dec 2017 23:44:12 +0000 (01:44 +0200)
committerAmos Jeffries <yadij@users.noreply.github.com>
Thu, 14 Dec 2017 23:44:12 +0000 (12:44 +1300)
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

index 47521c983280deb9ee3024d3205e32b637f1f0f7..e5033c7e46c64785c5cdafe981c97542d9083042 100644 (file)
@@ -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