x11docker icon indicating copy to clipboard operation
x11docker copied to clipboard

PID Judge comes too fast results in premature kill.

Open ErinaInit opened this issue 2 years ago • 2 comments

I've came to a pretty intriguing bug up here:

At first running containers failed with the following error:

x11docker ERROR: start_container(): Did not receive PID of PID1 in container.
  Maybe the container immediately stopped for unknown reasons.
  Just in case, check if host and image architecture are compatible:
  Host architecture: amd64 (x86_64), image architecture: amd64.

After enabling verbose I found that the script repeatedly checks if any PID is received.

After some attempts I got one running successfully out of pure luck.

I found out AFTER the window appeared and BEFORE anything shows up in the window, if I suspend the x11docker process for some time, during which I guess docker is starting, and I run fg to bring the process back, the container can startup normally.

Is there an option to manually adjust the timeout?

I guess we should use some other mechanisms to determine if a docker container have been started up or not, instead of using PID and a timeout?

ErinaInit avatar Apr 04 '24 09:04 ErinaInit

There is no option yet to adjust the timeout. However, you could change the script at https://github.com/mviereck/x11docker/blob/cb29a996597839239e482409b895353b1097ce3b/x11docker#L8345

Instead of 40 (4 seconds) change e.g. to 100 (10 seconds).

I guess we should use some other mechanisms to determine if a docker container have been started up or not, instead of using PID and a timeout?

It is not a nice way, but the only one I found so far.

mviereck avatar Apr 06 '24 17:04 mviereck

So sad that I got this from a package manager. I'm pretty much unable to write to such scripts manually......

Actually I don't think this issue is even prevalent or whatsoever. I have a decent desktop, wonder why docker started so slow......

Currently I'm doing it the crude way and it worked quite well......

ErinaInit avatar Apr 08 '24 02:04 ErinaInit