Skip to content

Long project names fail with shell error. #994

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ckuehl opened this issue Oct 24, 2014 · 15 comments · Fixed by #1559
Closed

Long project names fail with shell error. #994

ckuehl opened this issue Oct 24, 2014 · 15 comments · Fixed by #1559
Assignees
Labels
Bug A bug

Comments

@ckuehl
Copy link

ckuehl commented Oct 24, 2014

I am seeing the following build error:

/bin/sh: 1: /home/docs/checkouts/readthedocs.org/user_builds/rackspace-cloud-core-infrastructure-services-user-guide/envs/latest/bin/sphinx-build: not found

I also see:

doc_builder
-----

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/readthedocs/projects/utils.py", line 85, in run
    stderr=subprocess.PIPE, env=environment)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

No settings have changed on our project, so can someone please take a look and see what is preventing our builds?

Thanks!

@guyfawcus
Copy link
Contributor

Strange. If you try to build it again (using the 'Build' button on your project page) does it still fail? May have just been a temporary server issue.

Link to builds.

@ckuehl
Copy link
Author

ckuehl commented Oct 27, 2014

@maelstrom59 I just triggered another build and it also failed for the same reason.

@guyfawcus
Copy link
Contributor

Looks like this is something for @ericholscher. Sorry I can't be of any help.

@ericholscher
Copy link
Member

This is really odd. The pip inside the virtualenv is giving this error:


-bash: /home/docs/checkouts/readthedocs.org/user_builds/rackspace-cloud-core-infrastructure-services-user-guide/envs/latest/bin/pip: /home/docs/checkouts/readthedocs.org/user_builds/rackspace-cloud-core-infrast: bad interpreter: No such file or directory

I'm looking into it, but it's something odd.

@ericholscher
Copy link
Member

I think this might be a line length limit error on the shebang that is included at the top of the pip file >:x

@ericholscher
Copy link
Member

I think the name of your project is too long, if it was shorter it would work... I don't really know what to do about it on the OS side :/

@ckuehl
Copy link
Author

ckuehl commented Oct 27, 2014

@ericholscher Interesting. Did something change in the last couple of months with the paths? I see that this was working about two months ago, but the paths were similar to the following in those logs:

/var/build/user_builds/rackspace-cloud-core-infrastructure-services-user-guide/checkouts/latest

Is there a way to rename the path used without changing the actual name/title of the document itself?

@ericholscher
Copy link
Member

Yea, used to use /var/build/user_builds instead -- I never realized that having the paths in there would cause issues >:x

The path is from the slug, which is what will be in the URL, and is generated from the title on import, you can rename the title (what displays in the UI) after the slug is created, but we don't let users change slugs. I could also change the slug for you, if that made sense, but it would break the old URLs if those are already in wide use.

@ckuehl
Copy link
Author

ckuehl commented Oct 27, 2014

@ericholscher Can you change the slug to "rackspace-core-infra-user-guide"? We're fine with the existing URLs being broken as these aren't in use by a large number of users yet. Thanks!

@ericholscher
Copy link
Member

Great, thanks. That fixed it.

I'll keep this ticket open for researching a real fix to the actual problem
:)

On Mon, Oct 27, 2014 at 2:00 PM, Christopher Kuehl <[email protected]

wrote:

@ericholscher https://github.com/ericholscher Can you change the slug
to "rackspace-core-infra-user-guide"? We're fine with the existing URLs
being broken as these aren't in use by a large number of users yet. Thanks!


Reply to this email directly or view it on GitHub
#994 (comment)
.

Eric Holscher
Maker of the internet residing in Portland, Or
http://ericholscher.com

@ckuehl
Copy link
Author

ckuehl commented Oct 27, 2014

@ericholscher Awesome - looks good now. Thanks for getting our docs taken care of.

@ericholscher ericholscher changed the title Builds failing due to sphinx-build missing Long project names fail with shell error. Oct 30, 2014
@fergonco
Copy link

I run into this same issue as well. After trying and trying, finally I found this issue and created the same project with a shorter name. It works now.

Maybe it is a good idea to limit the length of the project name until this issue is solved.

Many thanks for the awesome project, in any case.

@sjagoe
Copy link

sjagoe commented Feb 26, 2015

This also appears to be an issue when building a branch of a project where the branch-name is long.

@gregmuellegger
Copy link
Contributor

We should find out about the maximum path length that we can support and fix this in the code.
@ericholscher Can you remember any of the investigations you did for this?

@agjohnson
Copy link
Contributor

I'll take this on.

For background information here, the shebang max length is set in the kernel by BINPRM_BUF_SIZE, which defaults to 127 characters. Short of compiling a custom kernel, the easiest fix is to avoid shebang lines all together and instead call the virtualenv python with the script we're executing as an argument.

@agjohnson agjohnson assigned agjohnson and unassigned ericholscher Aug 12, 2015
agjohnson added a commit that referenced this issue Aug 12, 2015
This fixes #994, where the 127 character limit on shebang line lengths was
triggering failures of commands inside virtualenvs that had long names or
long branch names. This PR adds some path environment variable handling to
allow for shorter commands, and makes all python script call wrapped by a
call to the virtual env symlinked python binary.
agjohnson added a commit that referenced this issue Aug 12, 2015
This fixes #994, where the 127 character limit on shebang line lengths was
triggering failures of commands inside virtualenvs that had long names or
long branch names. This PR adds some path environment variable handling to
allow for shorter commands, and makes all python script call wrapped by a
call to the virtual env symlinked python binary.
agjohnson added a commit that referenced this issue Aug 14, 2015
This fixes #994, where the 127 character limit on shebang line lengths was
triggering failures of commands inside virtualenvs that had long names or
long branch names. This PR adds some path environment variable handling to
allow for shorter commands, and makes all python script call wrapped by a
call to the virtual env symlinked python binary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants