From: SourceForge.net <no...@so...> - 2004-05-24 22:51:03
|
Bugs item #911950, was opened at 2004-03-08 05:23 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=111118&aid=911950&group_id=11118 Category: funct: filtering Group: version 3.0 Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Privoxy terminates on large Initial Comment: regarding: Privoxy 3.0.2 on Windows 98 Dear Developers, entries were added to the file "default.filter", making it grow slowly - several rules each day. This file then had a size of 129668 bytes (approx. 127 Kbytes). Whenever privoxy was started, it only wrote two lines to the log file: (...) Privoxy version 3.0.2 (...) Program name: (...) and then terminated. (A symbol in the tray is still visible, but vanishes after the mouse cursor is moved to it.) It works again, after the file "default.filter" is reduced in size, even if this is done by deleting entries /other than the last entry added/ before the problem first was observed. It suffices to remove about 5 lines (rules) from about 1600 lines. This seems to indicate that it is /not/ the /contents/ of the filter rule that was added before the problem occured, but the sheer /size/ of the file "default.filter" that creates the problem. Possibly, the problem might be related to most of the rules begin complicated, for example, a typical rule (one line of the file, which might be wrapped in this bug report) looks like: s/\b(N|n)ach(\s|\n|\20|\0A|\0D|\xC2\xA0|\&(\#(x0*20|0*32|x0*(A|a)0|0*160|)|space|nbsp);)+dem(\s|\n|\20|\0A|\0D|\xC2\xA0|\&(\#(x0*20|0*32|x0*(A|a)0|0*160|)|space|nbsp);)+in(\s|\n|\20|\0A|\0D|\xC2\xA0|\&(\#(x0*20|0*32|x0*(A|a)0|0*160|)|space|nbsp);)+Kraft(\s|\n|\20|\0A|\0D|\xC2\xA0|\&(\#(x0*20|0*32|x0*(A|a)0|0*160|)|space|nbsp);)+treten\b/ach dem Inkrafttreten/mg However, all these complicated rules were working well, as long as the size of the file was smaller. Thank you. (I do not wish to receive notification of changes to Tracker items, therefore I have not entered an email address.) ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-05-24 15:51 Message: Logged In: NO Nobody has objected to "go without the check" as David Schmidt has suggested. (Changing "1000" to "32767" also would help.) The solution seems to be known and the effort to implement it seems to be restricted. Could someone assign this tracker item to himself and implement the modification? It would be helpful, if it would be included in the next release. Thank you! ---------------------------------------------------------------------- Comment By: David Schmidt (david__schmidt) Date: 2004-03-16 14:24 Message: Logged In: YES user_id=249980 Ah, here's the trouble: the assertion in file.c (list_is_valid) checks for size greater than 1000. Your sample gives us at least 1024, so off the edge we go: /* * Arbitrarily limit length to prevent infinite loops. */ if (++length > 1000) { return 0; /* i.e. fail assertion */ } We could do one of a couple things: 1) remove the check but run the risk of circular references 2) establish a higher limit Anyone know if we've actually run into people making circular references before? I'd be inclined to go without the check. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-03-16 11:34 Message: Logged In: NO This comment is a step-by-step instruction how the error can be reproduced. This refers to Privoxy 3.0.3 for Windows running under Windows 98. 1. Install Privoxy. 2. Start Privoxy to verify that it is running. 3. Terminate Privoxy. 4. Catch the standard output of the following C program. #include <stdio.h> #include <stdlib.h> int main( void ) { puts( "FILTER: large Show how Privox" "y terminates on a large filter" ); { int i; for( i = 0; i < 1024; ++i ) { fputs( "s/", stdout ); { int c; for( c = 0; c < 99; ++c ) putchar( 'a' + rand() % 26 ); } fputs( "/", stdout ); { int c; for( c = 0; c < 99; ++c ) putchar( 'a' + rand() % 26 ); } fputs( "/g\n", stdout ); }}} 5. Append this filter to the Privoxy file "default.filter". 6. Start Privoxy. Now an abnormal software termination should be observable. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-03-11 08:28 Message: Logged In: NO [This is the second addition of this comment, which was not added the first time] I now have observed that Privoxy 3.0.3 for Windows will also terminate if the default.filter file is too large (or possibly: if a filter is too large). However, it gives a more specific message: .----------------------------------------. | Microsoft Visual C++ Runtime Library | |----------------------------------------| | Assertation failed! | | | | Program: (...)PRIVOXY.EXE | | | | File: list.c | | Line 339 | | | | Expression: list_is_valid(the_list) | | | | (...) | | | '----------------------------------------' ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-03-11 08:23 Message: Logged In: NO I now can confirm the same behavior for "Privoxy 3.0.3 for Windows". However, when this terminates on a large "default.filter" file (or a large filter entry?) a more specific information is being displayed, which is given below: Microsoft Visual C++ Runtime Library Assertation failed! Program: (...)PRIVOXY.EXE File: list.c Line 339 Expression: list_is_valid(the_list) ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-03-10 07:15 Message: Logged In: NO After enabling the log bit 6 (log filtering), I now have observed that the last line before privoxy ends abnormally is: Mar 10 12:00:02 Privoxy(-498259) Re-Filter: Adding re_filter job s/\b(G|g)Bit/ibibit/g to filter f4391 succeeded. There are still filter lines following this line. Privoxy ends directly after startup when adding filter rules (not later when filtering a page). If there is a static buffer, it would be nice to have an option to increase it. If this line and the following few lines are deleted from the filter file, privoxy will continue to run. To send messages to me regarding this report, comments might be added here. Thanks, again. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=111118&aid=911950&group_id=11118 |