From: David O. <da...@qc...> - 2017-10-06 09:46:57
|
Thanks Gustaf, I can only really reproduce it by hammering my development instance using apache bench (and only with a concurrency level of >100 after a few hundred requests) - not very scientific. The purpose of the filter_dos_check filter is to examine the server load (via ns_server active) and potentially return a 503 if we're too busy. However, the ns_server call is the first thing it does. In fact I can strip the filter down to only do the following and still get the same signal 11 (it also segfaults if returning filter_ok but takes longer) proc filter_dos_check { event args } { set requests_active [ns_server -server [ns_info server] -pool {} active -checkforproxy] return filter_return } Thanks for the patch. If there's anything I could capture during the segfault which would help let me know. On 5 October 2017 at 20:22, Gustaf Neumann <ne...@wu...> wrote: > > Hi David, > > so far, i could not recreate the problem. By reading the backtrace, the > problem > seems to be that the connection has no ns_set for the header fields. This > is strange, > since every ConnRun() sets these fields, an these are cleared after the > ConnRun(), > while the problem happens within ConnRun(). > So i wonder, how connPtr->headers can be lost. I see from the backtrace, > that the issue > happens in a preauth filter named "filter_dos_check". Can it be, that > this filter somehow > causes a cleanup of the connection? I can't see in the code, where this > might happen. > > For the time being, i've protected the crashing function call with test > for the > headers and added a debug line for the error.log. So, the crash at this > very situation should disappear. But probably, the function should not > be called in such situations at all, there might be as well other places, > that depend on the assumption, that the ns_set for the header exists > during the run. > > Do you see anything in your filter code related with this? > -g > > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > > |