From jingtaozf at gmail.com Thu Mar 1 00:42:29 2012 From: jingtaozf at gmail.com (Xu Jingtao) Date: Thu, 01 Mar 2012 08:42:29 +0800 (CST) Subject: [hunchentoot-devel] hunchentoot-1.2.2 throw a Recursive lock attempt error in sbcl 1.0.55 In-Reply-To: References: <20120229.095536.2234962845662686644.jingtaozf@gmail.com> Message-ID: <20120301.084229.298469278279175642.jingtaozf@gmail.com> Hi Hans, My server OS is debian 6.0(i686). Some hunchentoot setup codes like this: ======================================================================== (defclass my-site-acceptor (easy-acceptor) () (:documentation "This is the acceptor of the my-site framework.")) (defmethod acceptor-status-message ((acceptor my-site-acceptor) http-status-code &key &allow-other-keys) (when (/= http-status-code +http-service-error-handling+) (call-next-method))) (defmethod acceptor-remove-session ((acceptor my-site-acceptor) (session t)) (declare (ignore acceptor)) (loop for path in (session-value :|temp files|) do (ignore-errors (delete-file path)))) (defun start-site (&key (port 3001)) (cond (*site-acceptor* (warn "site has been started.") *site-acceptor*) (t (setf *site-acceptor* (make-instance 'my-site-acceptor :address "127.0.0.1" :port port :access-log-destination (strcat *log-path* "access.log") :message-log-destination (strcat *log-path* "message.log"))) (reset-session-secret) (start *site-acceptor*)))) ======================================================================== I have defined many pages with 'define-easy-handler',reproducing it is difficult because the server runs fine when started,they hung after random hours(sometimes many days) later, when people visit my site. > (SB-THREAD:MUTEX > > ? ? ? ? ? ? ? ? ? ? ? ? ? ?:NAME "global-message-log-lock" > > ? ? ? ? ? ? ? ? ? ? ? ? ? ?:%OWNER # > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?"hunchentoot-worker-127.0.0.1:43115" RUNNING > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?{C4F7F19}> > > ? ? ? ? ? ? ? ? ? ? ? ? ? ?:STATE 1). > > I have not been able to reproduce this problem. Can you provide a way > to reproduce it? > > Thanks, > -Hans ___________________________________ Jingtao Xu A Lisp Programmer www.jingtao.net From hans.huebner at gmail.com Thu Mar 1 01:04:45 2012 From: hans.huebner at gmail.com (=?ISO-8859-1?Q?Hans_H=FCbner?=) Date: Wed, 29 Feb 2012 20:04:45 -0500 Subject: [hunchentoot-devel] hunchentoot-1.2.2 throw a Recursive lock attempt error in sbcl 1.0.55 In-Reply-To: <20120301.084229.298469278279175642.jingtaozf@gmail.com> References: <20120229.095536.2234962845662686644.jingtaozf@gmail.com> <20120301.084229.298469278279175642.jingtaozf@gmail.com> Message-ID: >From looking at the code, it seems that the problem could be triggered by an error that is triggered from within the logging code, i.e. when another error is triggered while writing to the error log. One possible cause could be disk shortage. I will open up a tracker issue for the problem. -Hans From jingtaozf at gmail.com Thu Mar 1 01:19:34 2012 From: jingtaozf at gmail.com (Xu Jingtao) Date: Thu, 01 Mar 2012 09:19:34 +0800 (CST) Subject: [hunchentoot-devel] hunchentoot-1.2.2 throw a Recursive lock attempt error in sbcl 1.0.55 In-Reply-To: References: <20120301.084229.298469278279175642.jingtaozf@gmail.com> Message-ID: <20120301.091934.709592483552420150.jingtaozf@gmail.com> Hi Hans, My disk is enough,and this error happened in hunchentoot 1.1.1 too, but it don't crash my web server. > From looking at the code, it seems that the problem could be triggered > by an error that is triggered from within the logging code, i.e. when > another error is triggered while writing to the error log. One > possible cause could be disk shortage. > > I will open up a tracker issue for the problem. > > -Hans ___________________________________ Jingtao Xu A Lisp Programmer www.jingtao.net From hans.huebner at gmail.com Thu Mar 1 02:34:18 2012 From: hans.huebner at gmail.com (=?ISO-8859-1?Q?Hans_H=FCbner?=) Date: Wed, 29 Feb 2012 21:34:18 -0500 Subject: [hunchentoot-devel] hunchentoot-1.2.2 throw a Recursive lock attempt error in sbcl 1.0.55 In-Reply-To: <20120301.091934.709592483552420150.jingtaozf@gmail.com> References: <20120301.084229.298469278279175642.jingtaozf@gmail.com> <20120301.091934.709592483552420150.jingtaozf@gmail.com> Message-ID: Can you test whether the patch https://github.com/edicl/hunchentoot/commit/f4a3bbd5a915f83c42ff2351978f2e342a478b8a fixes your problem? If so, you should see a message on the console when logging an error failed. Please share that message. My suspicion is that the problem is related to character encoding problems (i.e. Hunchentoot tries to write characters that cannot be encoded in the external format of the error log stream), but at this point, this is just a guess. The error message will help. Thanks, Hans On Wed, Feb 29, 2012 at 8:19 PM, Xu Jingtao wrote: > Hi Hans, > > My disk is enough,and this error happened in hunchentoot 1.1.1 too, > but it don't crash my web server. > >> From looking at the code, it seems that the problem could be triggered >> by an error that is triggered from within the logging code, i.e. when >> another error is triggered while writing to the error log. ?One >> possible cause could be disk shortage. >> >> I will open up a tracker issue for the problem. >> >> -Hans > ___________________________________ > Jingtao Xu > A Lisp Programmer > www.jingtao.net > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel From jingtaozf at gmail.com Thu Mar 1 05:11:27 2012 From: jingtaozf at gmail.com (Xu Jingtao) Date: Thu, 01 Mar 2012 13:11:27 +0800 (CST) Subject: [hunchentoot-devel] hunchentoot-1.2.2 throw a Recursive lock attempt error in sbcl 1.0.55 In-Reply-To: References: <20120301.091934.709592483552420150.jingtaozf@gmail.com> Message-ID: <20120301.131127.1113213197319752582.jingtaozf@gmail.com> Hi Hans, I have update your patch to my web server(its hunchentoot version is 1.1.1). If I found some error output,I'll send them to this mail list. My site use a flexi-stream with cp936 patched (https://github.com/jingtaozf/flexi-streams). And the site use utf-8 as default encoding but some browser send us cp936 characters sometimes. With Best Regards. jingtao. > https://github.com/edicl/hunchentoot/commit/f4a3bbd5a915f83c42ff2351978f2e342a478b8a > fixes your problem? If so, you should see a message on the console > when logging an error failed. Please share that message. My > suspicion is that the problem is related to character encoding > problems (i.e. Hunchentoot tries to write characters that cannot be > encoded in the external format of the error log stream), but at this > point, this is just a guess. The error message will help. > > Thanks, > Hans > From jingtaozf at gmail.com Sat Mar 3 13:16:09 2012 From: jingtaozf at gmail.com (Jingtao Xu) Date: Sat, 3 Mar 2012 21:16:09 +0800 Subject: [hunchentoot-devel] hunchentoot-1.2.2 throw a Recursive lock attempt error in sbcl 1.0.55 In-Reply-To: <20120301.131127.1113213197319752582.jingtaozf@gmail.com> References: <20120301.091934.709592483552420150.jingtaozf@gmail.com> <20120301.131127.1113213197319752582.jingtaozf@gmail.com> Message-ID: Hi Hans, This is some output of my sbcl 1.0.55 on debian 6.0(i686): =========================================== error error in FORMAT: unknown format directive (character: Return) This sequence can't be decoded ~ using ~A as it is too short. ~A octet~:P missing at then end. ^ while processing indirect format string: [~A~@[ [~A]~]] ~?~% ^ while writing to error log, error not logged error error in FORMAT: unknown format directive (character: Return) This sequence can't be decoded ~ using ~A as it is too short. ~A octet~:P missing at then end. ^ while processing indirect format string: [~A~@[ [~A]~]] ~?~% ^ while writing to error log, error not logged =========================================== With best regards,jingtao. 2012/3/1 Xu Jingtao > Hi Hans, > > I have update your patch to my web server(its hunchentoot version is > 1.1.1). > If I found some error output,I'll send them to this mail list. > > My site use a flexi-stream with cp936 patched ( > https://github.com/jingtaozf/flexi-streams). > And the site use utf-8 as default encoding but some browser send us cp936 > characters sometimes. > > With Best Regards. > jingtao. > > > > https://github.com/edicl/hunchentoot/commit/f4a3bbd5a915f83c42ff2351978f2e342a478b8a > > fixes your problem? If so, you should see a message on the console > > when logging an error failed. Please share that message. My > > suspicion is that the problem is related to character encoding > > problems (i.e. Hunchentoot tries to write characters that cannot be > > encoded in the external format of the error log stream), but at this > > point, this is just a guess. The error message will help. > > > > Thanks, > > Hans > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans.huebner at gmail.com Sat Mar 3 13:34:13 2012 From: hans.huebner at gmail.com (=?ISO-8859-1?Q?Hans_H=FCbner?=) Date: Sat, 3 Mar 2012 08:34:13 -0500 Subject: [hunchentoot-devel] hunchentoot-1.2.2 throw a Recursive lock attempt error in sbcl 1.0.55 In-Reply-To: References: <20120301.091934.709592483552420150.jingtaozf@gmail.com> <20120301.131127.1113213197319752582.jingtaozf@gmail.com> Message-ID: On Sat, Mar 3, 2012 at 8:16 AM, Jingtao Xu wrote: > This is some output of my sbcl 1.0.55 on debian 6.0(i686): > =========================================== > error error in FORMAT: unknown format directive (character: Return) > ? This sequence can't be decoded ~ > using ~A as it is too short. ?~A octet~:P missing at then end. > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^ > while processing indirect format string: > ? [~A~@[ [~A]~]] ~?~% > ? ? ? ? ? ? ? ? ? ^ while writing to error log, error not logged > error error in FORMAT: unknown format directive (character: Return) This seems to be a nasty one. How did you get your copy of flexi-streams? It seems that it has been extracted with DOS line endings, and SBCL does not support that. While it will treat the #\Return characters as white space in source code and skip it, it will read it into string literals. In this case, the #\Return ended up in a format string in flexi-streams' length.lisp file and caused an error, as ~#\Return is not a valid format control sequence. One could debate whether SBCL is buggy here or not, but in any case, you can solve the problem by making sure that your Lisp source files have only Linefeeds as line endings under Linux. Thank you for reporting the bug in Hunchentoot! The fix will be part of the next release. -Hans From jingtaozf at gmail.com Sat Mar 3 13:48:28 2012 From: jingtaozf at gmail.com (Xu Jingtao) Date: Sat, 03 Mar 2012 21:48:28 +0800 (CST) Subject: [hunchentoot-devel] hunchentoot-1.2.2 throw a Recursive lock attempt error in sbcl 1.0.55 In-Reply-To: References: <20120301.131127.1113213197319752582.jingtaozf@gmail.com> Message-ID: <20120303.214828.2005476889759543436.jingtaozf@gmail.com> That's my pleasure. I'll check my codes as you suggest. Thanks very much! > > This seems to be a nasty one. How did you get your copy of > flexi-streams? It seems that it has been extracted with DOS line > endings, and SBCL does not support that. While it will treat the > #\Return characters as white space in source code and skip it, it will > read it into string literals. In this case, the #\Return ended up in > a format string in flexi-streams' length.lisp file and caused an > error, as ~#\Return is not a valid format control sequence. > > One could debate whether SBCL is buggy here or not, but in any case, > you can solve the problem by making sure that your Lisp source files > have only ___________________________________ From jingtaozf at gmail.com Sat Mar 3 13:50:08 2012 From: jingtaozf at gmail.com (Xu Jingtao) Date: Sat, 03 Mar 2012 21:50:08 +0800 (CST) Subject: [hunchentoot-devel] hunchentoot-1.2.2 throw a Recursive lock attempt error in sbcl 1.0.55 In-Reply-To: References: <20120301.131127.1113213197319752582.jingtaozf@gmail.com> Message-ID: <20120303.215008.992052243149541064.jingtaozf@gmail.com> I use flexi-streams from here: https://github.com/jingtaozf/flexi-streams > be a nasty one. How did you get your copy of > flexi-streams? From hans.huebner at gmail.com Sat Mar 3 14:32:38 2012 From: hans.huebner at gmail.com (=?ISO-8859-1?Q?Hans_H=FCbner?=) Date: Sat, 3 Mar 2012 09:32:38 -0500 Subject: [hunchentoot-devel] hunchentoot-1.2.2 throw a Recursive lock attempt error in sbcl 1.0.55 In-Reply-To: <20120303.215008.992052243149541064.jingtaozf@gmail.com> References: <20120301.131127.1113213197319752582.jingtaozf@gmail.com> <20120303.215008.992052243149541064.jingtaozf@gmail.com> Message-ID: On Sat, Mar 3, 2012 at 8:50 AM, Xu Jingtao wrote: > I use flexi-streams from here: https://github.com/jingtaozf/flexi-streams I would like to eventually merge the changes into the official flexi-streams version, but as they are relatively large, I'm hesitant to do it right away. I've opened an issue to remind me to do it. Thanks, Hans From hans.huebner at gmail.com Sat Mar 3 14:50:22 2012 From: hans.huebner at gmail.com (=?ISO-8859-1?Q?Hans_H=FCbner?=) Date: Sat, 3 Mar 2012 09:50:22 -0500 Subject: [hunchentoot-devel] Hunchentoot release 1.2.3 Message-ID: Hi, I have made a new Hunchentoot release, these are the changes: Fix crash when error occurs while logging error (reported by Xu Jingtao) Fix compilation with :hunchentoot-no-ssl feature (Mark Evenson) Fix Range header handling (Simon Sandlund) Export acceptor-remove-session ECL timeout support (Juan Jose Giarcia-Ripoll) Changed cookie handling - Hunchentoot no longer encodes cookies automatically. Applications must make sure that they only set cookies to permitted values (refer to RFC6265 for the details, thanks to Ralf Stoye for debugging help) The change in cookie handling is particularly noteworthy. If your application relied on Hunchentoot encoding cookie values, you need to change it so that it performs the encoding itself now. Please report any problems you may have. -Hans