Skip to content
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

annoying sticky bit being set #26

Open
tdaff opened this issue Apr 27, 2018 · 2 comments
Open

annoying sticky bit being set #26

tdaff opened this issue Apr 27, 2018 · 2 comments

Comments

@tdaff
Copy link
Owner

tdaff commented Apr 27, 2018

Original report by Anonymous.


Since version 5.0.0, jupyter_client sets the sticky bit on the connection info file and its parent directory. This is to avoid the file being unexpectedly "garbage collected". See
fixes in 5.0.0
This is harmless since the file is normally placed in /run/user/$uid/jupyter which is only used for that purpose.

Now remote_ikernel copies the connection info file on the remote machine in the current directory, resulting in that directory having its sticky bit set. This may be an unwanted side effect.

How about putting the remote copy of the connection info file also in /run/user/$uid/jupyter (on the remote machine).

@tdaff
Copy link
Owner Author

tdaff commented Apr 27, 2018

Original comment by Jean-Marc Andreoli (Bitbucket: jmandreoli, GitHub: jmandreoli).


The following simplistic fix seems to work: replace line 432
Current:

#!python

kernel_name = './{0}kernel-{1}.json'.format(RIK_PREFIX, self.uuid)

Proposed replacement:

#!python

kernel_name = '$JUPYTER_KERNEL_INFO_DIR/{0}kernel-{1}.json'.format(RIK_PREFIX, self.uuid)
conn.sendline('export JUPYTER_KERNEL_INFO_DIR=/run/user/`id -u`/jupyter')

(BTW, I am the anonymous creator of the issue)

@tdaff
Copy link
Owner Author

tdaff commented Apr 30, 2018

Original comment by Tom Daff (Bitbucket: tdaff, GitHub: tdaff).


Thanks for the issue!

It's been a while since I looked at any of these projects, but from a quick glance I'm tempted to say that Jupyter is misbehaving. The connection file is written by remote_ikernel to the working directory as the remote system could be anything and there is no guarantee that any other directories exist or would be accessible.

I'll see what they say on the Jupyter repository as I think the launcher should really only be setting the sticky bit if it has created the connection file itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant