KuoHaoZeng/Interactive_Visual_Navigation

X Error of failed request: BadWindow (invalid Window parameter)

Closed this issue · 3 comments

Thanks for your amazing work.

I tried run the code locally on a server with Ubuntu 16.04, Xorg is working. I meet the error "X Error of failed request: BadWindow (invalid Window parameter)"
I also tried run the code on a remoted server, but the errors are the same.

I did not do the xserver refiguration for GPU sudo python startx.py
Refer to README, I can not find startx.py, but the Xorg is running.
How can I fix this error as follows, thanks.

(thor-ivn) lwy@ubun:/Extra/lwy/Interactive_Visual_Navigation$ allenact -s 23456 configs/ithor_ObsNav/obstacles_nav_rgbdk_vNIE.py -c pretrained_model_ckpts/exp_ObstaclesNav-RGBDK-vNIE__stage_00__steps_000010000490.pt -t $CURRENT_TIME 07/28 17:03:32 INFO: Running with args Namespace(approx_ckpt_steps_count=None, checkpoint='pretrained_model_ckpts/exp_ObstaclesNav-RGBDK-vNIE__stage_00__steps_000010000490.pt', deterministic_agents=False, deterministic_cudnn=False, disable_config_saving=False, disable_tensorboard=False, experiment='configs/ithor_ObsNav/obstacles_nav_rgbdk_vNIE.py', experiment_base='/Extra/lwy/Interactive_Visual_Navigation', extra_tag='', gp=None, log_level='info', max_sampler_processes_per_worker=None, output_dir='experiment_output', restart_pipeline=False, seed=23456, skip_checkpoints=0, test_date='2021-07-28_17-00-18') [main.py: 271] 07/28 17:03:32 INFO: Using 1 test workers on devices (device(type='cpu'),) [runner.py: 154] 07/28 17:03:35 INFO: Started 1 test processes [runner.py: 389] 07/28 17:03:35 INFO: Running test on 1 steps [10000490] [runner.py: 400] 07/28 17:03:35 INFO: Saving metrics in experiment_output/metrics/ObstaclesNav-RGBDK-vNIE/2021-07-28_17-00-18/metrics__test_2021-07-28_17-03-32.json [runner.py: 415] 07/28 17:03:35 INFO: test 0 args {'config': <configs.ithor_ObsNav.obstacles_nav_rgbdk_vNIE.ObstaclesNavRGBKvNIEConfig object at 0x7fe744355358>, 'results_queue': <multiprocessing.queues.Queue object at 0x7fe73db26cc0>, 'checkpoints_queue': <multiprocessing.queues.Queue object at 0x7fe73dabc240>, 'seed': 12345, 'deterministic_cudnn': False, 'deterministic_agents': False, 'mp_ctx': <multiprocessing.context.SpawnContext object at 0x7fe73dabc550>, 'num_workers': 1, 'device': device(type='cpu'), 'max_sampler_processes_per_worker': None, 'distributed_port': 0, 'mode': 'test', 'worker_id': 0} [runner.py: 235] 07/28 17:03:35 INFO: Using checkpoint start time pretrained_model_ckpts [runner.py: 435] 07/28 17:03:35 INFO: test worker 0 loading checkpoint from pretrained_model_ckpts

...

Found path: /home/lwy/.ai2thor/releases/thor-Linux64-b302ab97ccd30dba620fe84b1733f5be3e8558fc/thor-Linux64-b302ab97ccd30dba620fe84b1733f5be3e8558fc Unable to load player prefs X Error of failed request: BadWindow (invalid Window parameter) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 31 (RRGetOutputPrimary) Resource id in failed request: 0x20 Serial number of failed request: 48 Current serial number in output stream: 48

The details of my GPUs are as follows:
`+-----------------------------------------------------------------------------+
| NVIDIA-SMI 430.50 Driver Version: 430.50 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce RTX 208... Off | 00000000:03:00.0 On | N/A |
| 0% 32C P8 2W / 250W | 151MiB / 11018MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 1 GeForce RTX 208... Off | 00000000:04:00.0 Off | N/A |
| 0% 32C P8 15W / 250W | 1MiB / 11019MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 2 GeForce RTX 208... Off | 00000000:81:00.0 Off | N/A |
| 0% 34C P8 5W / 250W | 1MiB / 11019MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 3 GeForce RTX 208... Off | 00000000:82:00.0 Off | N/A |
| 0% 31C P8 8W / 250W | 1MiB / 11019MiB | 0% Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1606 G /usr/lib/xorg/Xorg 149MiB |
+-----------------------------------------------------------------------------+`

Hi,

I have uploaded the startx.py (apologize that I forgot to upload it).
Please use it to configurate your xsever by running sudo python startx.py (as you were trying) before launching the environment on GPUs.
Let me know if you have further questions!

Kuo-Hao

Hi KuoHao,
Thanks for your reply.
I tried the code on another server, the server has 3 GTX 3090 cards and a display, which is attached to the VGA on computer mainboard. The display is not attached to any graphics card.
At first, the display is OK from VGA.
after sudo python startx.py , no display from VGA.

Starting X on DISPLAY=:1
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BusID "PCI:59:0:0"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
DefaultDepth 24
Option "AllowEmptyInitialConfiguration" "True"
SubSection "Display"
Depth 24
Virtual 1024 768
EndSubSection
EndSection
Section "Device"
Identifier "Device1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BusID "PCI:94:0:0"
EndSection
Section "Screen"
Identifier "Screen1"
Device "Device1"
DefaultDepth 24
Option "AllowEmptyInitialConfiguration" "True"
SubSection "Display"
Depth 24
Virtual 1024 768
EndSubSection
EndSection
Section "Device"
Identifier "Device2"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BusID "PCI:175:0:0"
EndSection
Section "Screen"
Identifier "Screen2"
Device "Device2"
DefaultDepth 24
Option "AllowEmptyInitialConfiguration" "True"
SubSection "Display"
Depth 24
Virtual 1024 768
EndSubSection
EndSection
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" 0 0
Screen 2 "Screen2" 0 0
EndSection
X.Org X Server 1.19.6
Release Date: 2017-12-20
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.15.0-140-generic x86_64 Ubuntu
Current Operating System: Linux ubun 5.4.0-80-generic #90~18.04.1-Ubuntu SMP Tue Jul 13 19:40:02 UTC 2021 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.4.0-80-generic root=UUID=3000099b-35c3-45b3-8917-64837c3d76ae ro quiet splash vt.handoff=1
Build Date: 08 April 2021 01:57:21PM
xorg-server 2:1.19.6-1ubuntu4.9 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.34.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "xorg.log", Time: Wed Aug 4 09:17:44 2021
(++) Using config file: "/tmp/tmppcKX9u"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
pci id for fd 71: 1a03:2000, driver (null)
EGL_MESA_drm_image required.

the outputs of nvidia-smi are as follows:

| 0 N/A N/A 28924 G /usr/lib/xorg/Xorg 8MiB |
| 1 N/A N/A 28924 G /usr/lib/xorg/Xorg 8MiB |
| 2 N/A N/A 28924 G /usr/lib/xorg/Xorg 8MiB |

It looks like that xorg was started on 3 cards.

I tried the code with self.TEST_GPU_IDS = [1]:

allenact -s 23456 configs/ithor_ObsNav/obstacles_nav_rgbdk_vNIE.py -c pretrained_model_ckpts/{THE_DOWNLOADED_MODEL}.pt -t $CURRENT_TIME

but, the output was the errors as follows:

AssertionError: Invalid DISPLAY :0.1 - cannot find X server with xdpyinfo

Any suggestions to solve this? By the way, I can run the code on my desktop computer, and my computer has one graphics card and one display attached to the graphics card. I tried to run the code on my servers with more graphics cards, and there is no display attached to the cards directly.

Thanks.

It works after sudo service lightdm stop
I closed the issue.