Page MenuHomePhabricator

"File does not exist or is unreadable" behind a proxy
Closed, ResolvedPublic

Description

Looks like commit b043befaf6c67530a2ea13b266d17240cddd7180 broke something. It keeps throwing the error "File does not exist or is unreadable".

Event Timeline

Galorefitz updated the task description. (Show Details)
Galorefitz raised the priority of this task from to Needs Triage.
Galorefitz added subscribers: Galorefitz, Dereckson, Tgr.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 11 2015, 12:00 PM
Galorefitz added a comment.EditedOct 11 2015, 12:31 PM

The issue seems to be proxy related. The extension doesn't seem to be accounting for proxy settings.

So taking care of proxy settings solves the issue of cloning repositories hosted online, but when the extension tries to clone a local repository, it gives a memory error and dies.

remote: Counting objects: 226, done.
remote: fatal: Out of memory, calloc failed
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: protocol error: bad pack header
error: Could not fetch origin

or

fatal: Out of memory? mmap failed: Cannot allocate memory
fatal: The remote end hung up upon initial contact
error: Could not fetch origin
fatal: Out of memory? mmap failed: Cannot allocate memory
fatal: The remote end hung up upon initial contact

I am not sure how this can be fixed. I am not even sure I understand why it's throwing this error.

There is another error. The branch, when entered, gets escaped twice. Gonna submit a patch right now fixing the proxy issue. Cloning from local repos still doesn't work.

Change 250055 had a related patch set uploaded (by Galorefitz):
Make Git2Pages respect proxy using $wgHTTPProxy

https://gerrit.wikimedia.org/r/250055

Change 250061 had a related patch set uploaded (by Galorefitz):
Remove mutliple wfEscapeShelArg() calls on $branch

https://gerrit.wikimedia.org/r/250061

Galorefitz set Security to None.Oct 30 2015, 7:54 PM
Galorefitz added a subscriber: Spage.

Change 250061 had a related patch set uploaded (by Galorefitz):
Remove mutliple wfEscapeShelArg() calls on $branch

https://gerrit.wikimedia.org/r/250061

Wrong bug id. This patch is for another bug :P

For the memory error - there's an extra argument you can add to wfShellExec to override built in memory limits. Might be good to add a config variable to the extension to set a different memory limit then the default one, which is usually quite restrictive.

There were two patches. The one for this bug is already submitted. I ended up submitting another one after that (the one that was for a different bug).

Dereckson renamed this task from Fix issue causing extension to throw "File does not exist or is unreadable" error to "File does not exist or is unreadable" behind a proxy.Nov 6 2015, 8:17 AM
Dereckson triaged this task as Normal priority.

So the MediaWiki core now have an Http::getProxy() method to get the proxy.

Change 250055 merged by jenkins-bot:
Make Git2Pages respect proxy using $wgHTTPProxy

https://gerrit.wikimedia.org/r/250055

Dereckson closed this task as Resolved.Mar 25 2016, 9:58 PM
Dereckson claimed this task.
Dereckson reassigned this task from Dereckson to Galorefitz.

[ Task assigned to code submitter. ]