= Description = I'm running "brand new" 1.6 branch changeset hash 2379:e1e980e7e9a7 (i.e that what I got after commanding hg clone...) and about 5 minutes after starting the standalone-server I noticed that CPU-usage was high and !MoinMoin's terminal was flooded by "DEBUG search:"-messages. == Steps to reproduce == ## Describe the steps needed to reproduce the bug. If we can't reproduce it, we probably can't fix it. This is what I did... I'm not sure which steps are really needed, but... 1. Fetch the changeset 2379:e1e980e7e9a7 from Mercurial 2. Extract the underlay-package to make the standalone server work. 3. Start the server. 4. Created a new user Foo. 5. Went to edit !MainPage (Actually !EtuSivu, I'm running Finnish version...) 6. Added &template=dfosad to URL to reproduce ArbitraryInjectionOfErrorMessage 7. Found after a short while the tests (?) running and taking >50% CPU. == Example == Short clip from the output I got to terminal: {{{ >> returned None 173916 DEBUG search: _getHits processing 'Self' u'LapM\xe9retek' '' 173916 DEBUG search: LinkSearch searching page u'LapM\xe9retek' for (negated = 0) u'K\xe4ytt\xe4j\xe4Asetukset' 173916 DEBUG search: LinkSearch returning None 173916 DEBUG search: matchSearchFunction > returned None 173916 DEBUG search: _getHits processing 'Self' u'Navega\xe7\xe3oDoS\xedtio' '' 173916 DEBUG search: LinkSearch searching page u'Navega\xe7\xe3oDoS\xedtio' for (negated = 0) u'K\xe4ytt\xe4j\xe4Asetukset' 173916 DEBUG search: LinkSearch returning None 173916 DEBUG search: matchSearchFunction > returned None 173916 DEBUG search: _getHits processing 'Self' u'Sl\u012bdr\u0101desVeidne' '' 173916 DEBUG search: LinkSearch searching page u'Sl\u012bdr\u0101desVeidne' for (negated = 0) u'K\xe4ytt\xe4j\xe4Asetukset' 173916 DEBUG search: LinkSearch returning None 173916 DEBUG search: matchSearchFunction > returned None 173916 DEBUG search: _getHits processing 'Self' u'LapM\xe9retek' '' 173916 DEBUG search: LinkSearch searching page u'LapM\xe9retek' for (negated = 0) u'K\xe4ytt\xe4j\xe4Asetukset' 173922 DEBUG search: LinkSearch returning None 173922 DEBUG search: matchSearchFunction > returned None }}} Eventually it stopped to this: {{{ 173922 DEBUG search: moinSearch found 18 hits 173922 DEBUG search: after filtering: 18 hits 173922 INFO 127.0.0.1 "GET /K%C3%A4ytt%C3%A4j%C3%A4Asetukset?action=fullsearch&context=180&value=linkto%3A%22K%C3%A4ytt%C3%A4j%C3%A4Asetukset%22 HTTP/1.1" 200 - 173922 ERROR error: (32, 'Broken pipe') Traceback (most recent call last): File "/home/ninnnu/projektit/MoinMoin/moin-1.6/MoinMoin/request/__init__.py", line 1283, in run handler(self.page.page_name, self) File "/home/ninnnu/projektit/MoinMoin/moin-1.6/MoinMoin/action/fullsearch.py", line 224, in execute request.emit_http_headers() File "/home/ninnnu/projektit/MoinMoin/moin-1.6/MoinMoin/request/__init__.py", line 1378, in emit_http_headers self._emit_http_headers(headers) File "/home/ninnnu/projektit/MoinMoin/moin-1.6/MoinMoin/request/request_standalone.py", line 100, in _emit_http_headers self.sareq.send_response(status_code, status_msg) File "BaseHTTPServer.py", line 370, in send_response self.send_header('Server', self.version_string()) File "BaseHTTPServer.py", line 376, in send_header self.wfile.write("%s: %s\r\n" % (keyword, value)) File "socket.py", line 262, in write self.flush() File "socket.py", line 249, in flush self._sock.sendall(buffer) error: (32, 'Broken pipe') 173922 DEBUG search: LinkSearch returning None 173922 DEBUG search: matchSearchFunction > returned None 173922 DEBUG search: moinSearch found 18 hits 173922 DEBUG search: after filtering: 18 hits 173922 INFO 127.0.0.1 "GET /K%C3%A4ytt%C3%A4j%C3%A4Asetukset?action=fullsearch&context=180&value=linkto%3A%22K%C3%A4ytt%C3%A4j%C3%A4Asetukset%22 HTTP/1.1" 200 - 173922 ERROR error: (32, 'Broken pipe') Traceback (most recent call last): File "/home/ninnnu/projektit/MoinMoin/moin-1.6/MoinMoin/request/__init__.py", line 1283, in run handler(self.page.page_name, self) File "/home/ninnnu/projektit/MoinMoin/moin-1.6/MoinMoin/action/fullsearch.py", line 224, in execute request.emit_http_headers() File "/home/ninnnu/projektit/MoinMoin/moin-1.6/MoinMoin/request/__init__.py", line 1378, in emit_http_headers self._emit_http_headers(headers) File "/home/ninnnu/projektit/MoinMoin/moin-1.6/MoinMoin/request/request_standalone.py", line 100, in _emit_http_headers self.sareq.send_response(status_code, status_msg) File "BaseHTTPServer.py", line 370, in send_response self.send_header('Server', self.version_string()) File "BaseHTTPServer.py", line 376, in send_header self.wfile.write("%s: %s\r\n" % (keyword, value)) File "socket.py", line 262, in write self.flush() File "socket.py", line 249, in flush self._sock.sendall(buffer) error: (32, 'Broken pipe') 173922 DEBUG search: LinkSearch returning None 173922 DEBUG search: matchSearchFunction > returned None 173922 DEBUG search: moinSearch found 18 hits 173922 DEBUG search: after filtering: 18 hits 173922 INFO 127.0.0.1 "GET /K%C3%A4ytt%C3%A4j%C3%A4Asetukset?action=fullsearch&context=180&value=linkto%3A%22K%C3%A4ytt%C3%A4j%C3%A4Asetukset%22 HTTP/1.1" 200 - 173922 ERROR error: (32, 'Broken pipe') Traceback (most recent call last): File "/home/ninnnu/projektit/MoinMoin/moin-1.6/MoinMoin/request/__init__.py", line 1283, in run handler(self.page.page_name, self) File "/home/ninnnu/projektit/MoinMoin/moin-1.6/MoinMoin/action/fullsearch.py", line 224, in execute request.emit_http_headers() File "/home/ninnnu/projektit/MoinMoin/moin-1.6/MoinMoin/request/__init__.py", line 1378, in emit_http_headers self._emit_http_headers(headers) File "/home/ninnnu/projektit/MoinMoin/moin-1.6/MoinMoin/request/request_standalone.py", line 100, in _emit_http_headers self.sareq.send_response(status_code, status_msg) File "BaseHTTPServer.py", line 370, in send_response self.send_header('Server', self.version_string()) File "BaseHTTPServer.py", line 376, in send_header self.wfile.write("%s: %s\r\n" % (keyword, value)) File "socket.py", line 262, in write self.flush() File "socket.py", line 249, in flush self._sock.sendall(buffer) error: (32, 'Broken pipe') }}} == Component selection == ## Where you think is this bug happening ? (general, plugin [plugin name], theme [theme name], ... * general == Details == ## If you got a traceback, please save the traceback page as html and attach here: ## attachment:traceback.html ## if the bug is in this wiki, just kill the table and write: This Wiki. ## If a traceback is not available, please fill in the details here: || '''!MoinMoin Version''' || 1.6 branch changeset hash 2379:e1e980e7e9a7 || || '''OS and Version''' || Ubuntu 7.10 || || '''Python Version''' || 2.5.1 || || '''Server Setup''' || || || '''Server Details''' || || || '''Language you are using the wiki in''' (set in the browser/UserPreferences) || Fi || == Workaround == ## How to deal with the bug until it is fixed = Discussion = {{{#!irc (16:59) < ThomasWal> ninnnu: if you edit a nonexisting page, moin will present you with a list of pages of similar names (17:01) < ThomasWal> (and it has to search for those :) (17:02) < ThomasWal> also it presents a list of Templates ... (17:03) < ThomasWal> also you did a linkto search ?action=fullsearch&context=180&value=linkto (17:04) < ThomasWal> which can be very expensive the first time it runs as it has to create the pagelinks cache for all pages (17:07) *** ThomasWaldmann moved the quicklink.patch to a better page (17:08) < cb22> ThomasWaldmann: ty, i just figured out the upload function :) (17:11) < ThomasWal> cb22: there are already plans to streamline this (unifying attachments and pages to generic items) (17:12) < ThomasWal> btw, of course we will lower the default loglevel to less than debug before release (17:12) < ninnnu> ThomasWaldmann: But I didn't try to edit nonexisting page... (17:13) < ThomasWal> 173922 INFO 127.0.0.1 "GET /K%C3%A4ytt%C3%A4j%C3%A4Asetukset?action=fullsearch&context=180&value=linkto%3A%22K%C3%A4ytt%C3%A4j%C3%A4Asetukset%22 HTTP/1.1" 200 - (17:13) < ThomasWal> this triggered the linkto stuff (17:15) < ninnnu> Hm.. Ok, so I clicked on wrong point after all.. (17:16) < ThomasWal> linkto search happens by clicking on a page title (17:16) < ninnnu> Apparently, yes. So it was a PEBCAK. }}} = Plan = ## This part is for Moin``Moin developers: * Priority: * Assigned to: * Status: not a bug, see discussion ---- ## If you are a moin core developer, replace the category to Category* in these cases: ## Category MoinMoinNoBug - if this is not a bug. ## Category MoinMoinBugConfirmed - if you can confirm the bug on current code. ## Category MoinMoinBugFixed - after the bug is fixed in current code. CategoryMoinMoinNoBug