Skip to content

Loading…

fail with android repo #21

Closed
neversetsun opened this Issue · 1 comment

2 participants

@neversetsun

The steps are:
repo forall -c 'git checkout -b XXX'
Ctrl+z
disown
screen
reptyr PID_OF_repo

The error log is:
[+] Allocated scratch page: 7f18b6fee000
[+] Looking up fds for tty in child.
[+] Resolved child tty: 8800
[+] Found an alias for the tty: 0
[+] Found an alias for the tty: 1
[+] Found an alias for the tty: 2
[+] Opened the new tty in the child: 4
[+] Target is not a session leader, attempting to setsid.
[+] Forked a child: 5115
[+] Change pgid for pid 4598
[+] Change pgid for pid 4617
[-] failed: Permission denied
[-] Failed to setsid: Operation not permitted
[+] Change pgid for pid 4598
[+] Change pgid for pid 5115
Unable to attach to pid 4598: Operation not permitted

BTW, i have changed /proc/sys/kernel/yama/ptrace_scope
cat /proc/sys/kernel/yama/ptrace_scope
0

@nelhage
Owner

Unfortunately, due to somewhat-arcane technical reasons, reptyr does not support attaching processes that make use of subprocesses (like repo). I've just pushed a commit which adds earlier checking and hopefully a somewhat-better error message in this case.

This limitation might be possible to partially work around with some more work, but unfortunately, I think the primitives Linux gives us makes it impossible to work fully-correctly :/

@nelhage nelhage closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.