Closed sandrokeil closed 6 years ago
The terminal list output is created by a set -x
that I inserted for debugging and accidently uploaded to master. It is already removed in latest master.
The ps
error is something different, not sure now. Can you please update and try again?
Alright, just updated to latest master. The Terminallist
is gone, but I still have the process ID error. Just quick lookup, maybe it's something like this?
It occurs since this commit https://github.com/mviereck/x11docker/commit/02657d8851253c29276d75a26fb51f3b75d67e28#diff-308fa5eac58a6b2ba23e0fbc6e033041 Previous revisions worked fine.
Can you run with option --debug
and show me the output, please? It shows at lot of background process handling and gives good chances to find the false ps
command. I assume it happens in finish()
.
Currently I don't have this issue, maybe it depends on special options.
It's Command at Line 5702 returned with error code 1: awk '{print $1}'
x11docker note: You are running a beta version of x11docker.
Beta versions change often and may introduce temporary new bugs.
If you prefer latest stable release, run 'x11docker --update'.
If you prefer to follow development, run 'x11docker --update-master'.
You can contribute to x11docker if you find bugs and report them at:
https://github.com/mviereck/x11docker
DEBUGNOTE:(20:28:01) Command at Line 1878 returned with error code 1:
tr -cd '[:alpha:][:digit:][:blank:]-_.'
0 - ::main
DEBUGNOTE:(20:28:01) Command at Line 1878 returned with error code 1:
Imagecommandbasename=$(basename $(echo $Imagecommand | cut -d' ' -f1) 2>/dev/null | tr -cd '[:alpha:][:digit:][:blank:]-_.')
0 - ::main
DEBUGNOTE:(20:28:01) Dependency check for --hostdisplay: 0
DEBUGNOTE:(20:28:01) Dependency check for --hostdisplay: 0
DEBUGNOTE:(20:28:01) Using X server option --hostdisplay
x11docker WARNING: To allow clipboard sharing with option --hostdisplay,
trusted cookies and insecure option --hostipc will be enabled.
No protection against X security leaks is left!
Please consider to use another X server option.
x11docker WARNING: Option --hostdisplay with trusted cookies provides
QUITE BAD CONTAINER ISOLATION !
Keylogging and controlling host applications is possible!
x11docker WARNING: Security risk:
Option --hostipc causes severe reduction of container isolation!
Drawback: IPC namespace remapping is disabled.
Advantage: X extension MIT-SHM is possible.
DEBUGNOTE:(20:28:01) Stored background pid 8466 of watchpidlist
DEBUGNOTE:(20:28:01) Stored background pid 8472 of watchmessagefifo
DEBUGNOTE:(20:28:01) Watching 8196 pts/0 00:00:00 x11docker
DEBUGNOTE:(20:28:01) docker command:
docker run -d --tty --rm --name=x11docker_X1_00bf0e_sandrokeil-archlinux \
--user=1000:985 --env USER=skeil \
--userns=host \
--cap-drop ALL \
--volume //usr/bin/docker-init://x11docker/tini:ro \
--security-opt no-new-privileges \
--security-opt label=type:container_runtime_t \
--group-add 995 \
--group-add 986 \
--tmpfs //run --tmpfs //run/lock \
--entrypoint=env \
--env container=docker \
-v //home/skeil/.cache/x11docker/X53-sandrokeil-archlinux/share://x11docker:rw \
-v '//home/skeil/data/x11docker/robo3t':'//home/skeil':rw \
-e DISPLAY=:1 -e XAUTHORITY=//x11docker/Xclientcookie \
-v //tmp/.X11-unix/X1://X1:rw \
--ipc=host \
--workdir //tmp \
-- sandrokeil/archlinux:robo3t //bin/sh - //x11docker/container.CMD.sh
DEBUGNOTE:(20:28:01) Users and terminal:
x11docker was started by: skeil
As host user serves (running X, storing cache): skeil
Container user will be: skeil
Container user password: x11docker
Getting permission to run docker with: bash -c
Running X and other user commands with: bash -c
Terminal for password frontend: bash -c
Terminal to show docker pull progress: dbus-launch gnome-terminal -x
Running on console: no
Running over SSH: no
Running on MS Windows: no
Running on CYGWIN or MSYS2: no
Running on WSL: no
DEBUGNOTE:(20:28:01) Stored background pid 8528 of containershell
DEBUGNOTE:(20:28:01) Waiting for X server --hostdisplay to be ready.
DEBUGNOTE:(20:28:01) Running xinitrc
DEBUGNOTE:(20:28:01) --hostdisplay is ready
DEBUGNOTE:(20:28:01) Command at Line 5702 returned with error code 1:
awk '{print $1}'
0 - ::main
DEBUGNOTE:(20:28:01) Command at Line 5702 returned with error code 1:
Xinitpid="$(pgrep -a xinit | grep "xinit $Xinitrc" | awk '{print $1}')"
0 - ::main
error: process ID list syntax error
Usage:
ps [options]
Try 'ps --help <simple|list|output|threads|misc|all>'
or 'ps --help <s|l|o|t|m|a>'
for additional help text.
For more details see ps(1).
DEBUGNOTE:(20:28:02) Stored background pid PID of 1
DEBUGNOTE:(20:28:02) Watching
DEBUGNOTE:(20:28:02) watchpidlist: PID PID has terminated
DEBUGNOTE:(20:28:02) time to say goodbye (watchpidlist PID)
DEBUGNOTE:(20:28:02) time to say goodbye (watchpidlist)
DEBUGNOTE:(20:28:02) time to say goodbye (xinit)
DEBUGNOTE:(20:28:02) Terminating x11docker.
DEBUGNOTE:(20:28:02) List of stored background processes:
8466 watchpidlist
8472 watchmessagefifo
8528 containershell
PID 1
error: process ID list syntax error
Usage:
ps [options]
Try 'ps --help <simple|list|output|threads|misc|all>'
or 'ps --help <s|l|o|t|m|a>'
for additional help text.
For more details see ps(1).
DEBUGNOTE:(20:28:02) Running dockerrc
DEBUGNOTE:(20:28:02) Checking: PID (1):
DEBUGNOTE:(20:28:02) Checking: 8528 (containershell): 8528 pts/0 00:00:00 x11docker
DEBUGNOTE:(20:28:02) Terminating 8528 (containershell) x11docker: 8528 pts/0 00:00:00 x11docker
DEBUGNOTE:(20:28:02) Checking: 8472 (watchmessagefifo):
DEBUGNOTE:(20:28:02) Checking: 8466 (watchpidlist):
DEBUGNOTE:(20:28:02) time to say goodbye (finish)
DEBUGNOTE:(20:28:02) Exitcode 0
It looks like $Bgpidfile
has as last entry PID 1
Thank you for investigating!
The bug itself has been two lines below and only appeared with --hostdisplay
:
echo $Xcommand | grep -q Xorgwrapper && Line="Xorg $Newdisplay" || Line="$Xcommand"
Xserverpid=$(ps aux | grep "$(echo "$Line" | cut -d' ' -f1-2)" | grep -v grep | grep -v xinit | awk '{print $2}')
[ "$Xserverpid" ] && setonwatchpidlist $Xserverpid && storepid $Xserverpid Xserver
With --hostdisplay
variable $Line
is empty. ps aux | grep "$(echo "$Line" [...]
gives full output of ps aux
and leads coincidentally in parsing to PID 1
. Thanks god that x11docker failed to kill PID 1 accidentally. :-)
The fix is now not to parse for X server pid with --hostdisplay
.
I just realized that the current master version is broken. Version 4.3.6 works fine. Any idea what goes wrong? It looks it's only a x11/UI problem, because this error does not occur with
--nothing
.Here is the output. What is this kind of
Terminallist
output? I guess the main error iserror: process ID list syntax error
.