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

New builded packages do not show up with their name as command with ps/pgrep/pkill , /proc #73

Open
kwaegema opened this issue Sep 27, 2017 · 8 comments

Comments

@kwaegema
Copy link
Member

This changed now to 'python' , which makes using those commands less easier.
[root@osd010 ~]# cat /proc/2302819/comm
zkrsync

[root@osd009 ~]# cat /proc/2278866/comm
python

@JensTimmerman
Copy link
Contributor


[root@osd010 ~]# cat /proc/2302819/cmdline
/usr/bin/python-E/usr/bin/zkrsync--configfiles=/etc/zkrs/kyukonhome.conf--session=kyukonhome--daemon-D

still shows /usr/bin/zkrsync in there

@stdweird
Copy link
Member

@JensTimmerman osd010 wasn't updated yet

@JensTimmerman
Copy link
Contributor

same on osd009


[root@osd009 ~]#  cat /proc/2278866/cmdline
/usr/bin/python-E/usr/bin/zkrsync--configfiles=/etc/zkrs/kyukonhome.conf--session=kyukonhome--daemon-D

@stdweird
Copy link
Member

@JensTimmerman try ps -C
i guess the new wrapper in the shebang does an exec and ps sometimes shows before vs after exec?

@JensTimmerman
Copy link
Contributor

@stdweird I know the procname is different, that is indeed changed, just trying to give some alternatives here.

If you consider this a bug, we could have the wrapper set the correct procname (linux only) with

def set_proc_name(newname):
    from ctypes import cdll, byref, create_string_buffer
    libc = cdll.LoadLibrary('libc.so.6')
    buff = create_string_buffer(len(newname)+1)
    buff.value = newname
    libc.prctl(15, byref(buff), 0, 0, 0)

but this seems a bit hacky

@stdweird
Copy link
Member

@JensTimmerman oh, i don't consider it a bug 😄
it would be nice to understand why it happened, but nothing more then that imho.
@kwaegema your fixes in https://github.ugent.be/hpcugent/vsc-backup/pull/6 are sufficient to work around this, right?

@JensTimmerman
Copy link
Contributor

JensTimmerman commented Sep 27, 2017

It happens because we now always call python, via
https://github.com/hpcugent/vsc-install/blob/master/bin/python-stripped-env#L32

maybe we should exec it instead?

@stdweird
Copy link
Member

@JensTimmerman ah, we wrote that. what happens if you use exec $PYTHON ... to start it?

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

No branches or pull requests

3 participants