Ticket #9646 (new defect)

Opened 1 year ago

Last modified 10 months ago

WindowsError: (5, 'Access is denied')

Reported by: dukenmarga@gmail.com Assigned to: hvr
Priority: highest Component: GitPlugin
Severity: blocker Keywords: directory,
Cc: Trac Release: 0.12

Description

How to Reproduce

While doing a GET operation on /browser/app/application/core, Trac issued an internal error.

I installed git+trac on my windows recently. The installation was finished and I can integrate git and trac and can be viewed in browser. But I have problem when I browse the resource via browser. I am developing web application using codeigniter. When I browse the root directory, it can be viewed by browser. But, when I tried to browser the child directory, the browser give me an error: WindowsError?: [Error 5] Access is denied. I don't know its error came from git, trac, or windows itself. Then I try to search on internet and also from trac forum at google and I can't find anything useful. I need any help from you or any information that be able to solve my problem. Thanks anyway.

Request parameters:

{'path': u'/app/application/core'}

User agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7

System Information

Trac 0.12.2
Genshi 0.6
GIT 1.7.8.msysgit.0
MySQL server: "5.1.37", client: "5.1.50", thread-safe: 1
MySQLdb 1.2.3
Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)]
setuptools 0.6c11
jQuery 1.4.2

Enabled Plugins

tracgit 0.12.0.5dev

Python Traceback

Traceback (most recent call last):
  File "c:\users\duken\appdata\local\temp\easy_install-vinrpq\Trac-0.12.2-py2.6-win32.egg.tmp\trac\web\main.py", line 511, in _dispatch_request
    dispatcher.dispatch(req)
  File "c:\users\duken\appdata\local\temp\easy_install-vinrpq\Trac-0.12.2-py2.6-win32.egg.tmp\trac\web\main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "c:\users\duken\appdata\local\temp\easy_install-vinrpq\Trac-0.12.2-py2.6-win32.egg.tmp\trac\versioncontrol\web_ui\browser.py", line 390, in process_request
    dir_data = self._render_dir(req, repos, node, rev, order, desc)
  File "c:\users\duken\appdata\local\temp\easy_install-vinrpq\Trac-0.12.2-py2.6-win32.egg.tmp\trac\versioncontrol\web_ui\browser.py", line 549, in _render_dir
    entries = [entry(n) for n in node.get_entries()
  File "build\bdist.win32\egg\tracext\git\git_fs.py", line 544, in get_entries
    yield GitNode(self.repos, ent[-1], self.rev, self.log, ent, historian)
  File "C:\Python26\lib\contextlib.py", line 23, in __exit__
    self.gen.next()
  File "build\bdist.win32\egg\tracext\git\PyGIT.py", line 760, in get_historian
    p[0].terminate()
  File "C:\Python26\lib\subprocess.py", line 937, in terminate
    TerminateProcess(self._handle, 1)
WindowsError: [Error 5] Access is denied

Attachments

Change History

01/16/12 11:48:41 changed by anonymous

I have the same issue

Any one fixing it?

01/23/12 20:39:46 changed by torresrogerio@gmail.com

me too,

Any one fixing it?

01/24/12 01:04:57 changed by moreati

  • owner changed from moreati to daveappendix.
  • component changed from BrowserSvnOperationsPlugin to RoadmapFilterPlugin.

Hi, sorry for the delay. Are you sure you sure this bug is filed against the right plugin. BrowserSvnOperationsPlugin the deals with Subversion. Your description and traceback suggest you're having a problem with GitPlugin

01/24/12 01:06:00 changed by moreati

  • owner changed from daveappendix to moreati.
  • component changed from RoadmapFilterPlugin to BrowserSvnOperationsPlugin.

02/03/12 17:01:27 changed by torresrogerio@gmail.com

  • owner changed from moreati to hvr.
  • component changed from BrowserSvnOperationsPlugin to GitPlugin.

I have the same problem. Any update about it?

02/16/12 01:22:02 changed by rjollos

#9658 closed as a duplicate.

(follow-up: ↓ 8 ) 02/17/12 04:25:32 changed by Greg

I was also having the same issue. It seems that calling p[0].terminate() (on lines 744 and 760 of PyGIT.py) will fail with the access is denied message on Windows (I'm using Windows XP and Python 2.7.2) if the process has already completed (i.e. is no longer running).

An easy, but possibly error-prone, fix which solved the problem for me would be to poll the sub-process to see if it's alive before trying to terminating it:

if p[0].poll() is None:
    p[0].terminate()

A possibly more robust solution would be to catch the exception and ignore it:

try:
    p[0].terminate()
except WindowsError:
    pass

(in reply to: ↑ 7 ) 06/18/12 06:01:41 changed by anonymous

Thanks Greg! this fixed the issue.

#!python try: p[0].terminate() except WindowsError?: pass

06/28/12 10:21:13 changed by anonymous

Greg's fix also worked for me. For anyone who is unable to find PyGIT.py, it is most likely part of the tracgit egg file. Egg files are just renamed zip files, so you can just change it to a zip, open it, edit the file and rezip it/re-egg it.

I would recommend making a backup of the original before mucking around with it.

07/23/12 23:37:58 changed by torresrogerio@gmail.com

  • priority changed from normal to highest.
  • severity changed from normal to blocker.

I did the change, but now I'm receiving this error: ZipImportError?: bad local file header in C:\\Python26\\lib\\site-packages\\tracgit-0.12.0.5dev-py2.6.egg

Anyone here can help me?


Add/Change #9646 (WindowsError: (5, 'Access is denied'))




Change Properties
Action