xrdb: Connection refused AND xrdb: Can't open display ':1002'

Hi everyone,

I’m trying to log into an LXDE workstation over FreeNX/NX. I’ve recently upgraded from 11.4 to 12.1. New users created after the upgrade can log in while users that existed on 11.4 cannot.

The NX authentication succeeds and the !M window appears for about 3 or 4 seconds, then disappears. Looking in the ~/.nx/C-host-xxxx/sessions file shows the following errors below. Also a core file appears in the user’s home directory, but I don’t know how to analyze it.

Any ideas on what is failing and how to fix it?

Info: Established X client connection.
Info: Using shared memory parameters 1/1/0/0K.
*** glibc detected *** /usr/lib/NX/nxagent: free(): invalid pointer: 0x084f0e48


======= Backtrace: =========
/lib/libc.so.6(+0x6ed8b)[0xb73a0d8b]
/lib/libc.so.6(cfree+0x9b)[0xb73a528b]
/usr/lib/NX/nxagent[0x80b4830]
/usr/lib/NX/nxagent[0x80b5c5e]
/usr/lib/NX/nxagent[0x80c2e9d]
/usr/lib/NX/nxagent[0x80543c9]
/lib/libc.so.6(__libc_start_main+0xf3)[0xb734b003]
/usr/lib/NX/nxagent[0x8054cd9]
======= Memory map: ========

Warning: Parent process appears to be dead. Exiting keeper.
xrdb: Connection refused
xrdb: Can’t open display ‘:1002’

Here’s the complete stacktrace:

======= Backtrace: =========
/lib/libc.so.6(+0x6ed8b)[0xb73a0d8b]
/lib/libc.so.6(cfree+0x9b)[0xb73a528b]
/usr/lib/NX/nxagent[0x80b4830]
/usr/lib/NX/nxagent[0x80b5c5e]
/usr/lib/NX/nxagent[0x80c2e9d]
/usr/lib/NX/nxagent[0x80543c9]
/lib/libc.so.6(__libc_start_main+0xf3)[0xb734b003]
/usr/lib/NX/nxagent[0x8054cd9]
======= Memory map: ========
08048000-08488000 r-xp 00000000 08:02 2444 /usr/lib/NX/nxagent
08488000-08489000 r–p 00440000 08:02 2444 /usr/lib/NX/nxagent
08489000-084ae000 rw-p 00441000 08:02 2444 /usr/lib/NX/nxagent
084ae000-08775000 rw-p 00000000 00:00 0 [heap]
b7127000-b718d000 rw-p 00000000 00:00 0
b718d000-b718f000 r-xp 00000000 08:02 2280 /usr/lib/libXdamage.so.1.1.0
b718f000-b7190000 r–p 00001000 08:02 2280 /usr/lib/libXdamage.so.1.1.0
b7190000-b7191000 rw-p 00002000 08:02 2280 /usr/lib/libXdamage.so.1.1.0
b7191000-b7198000 r-xp 00000000 08:02 2381 /usr/lib/libXrandr.so.2.2.0
b7198000-b7199000 r–p 00006000 08:02 2381 /usr/lib/libXrandr.so.2.2.0
b7199000-b719a000 rw-p 00007000 08:02 2381 /usr/lib/libXrandr.so.2.2.0
b719a000-b719b000 rw-p 00000000 00:00 0
b719b000-b71a0000 r-xp 00000000 08:02 2283 /usr/lib/libXtst.so.6.1.0
b71a0000-b71a1000 r–p 00004000 08:02 2283 /usr/lib/libXtst.so.6.1.0
b71a1000-b71a2000 rw-p 00005000 08:02 2283 /usr/lib/libXtst.so.6.1.0
b71a2000-b71be000 r-xp 00000000 08:02 5981 /lib/libgcc_s.so.1
b71be000-b71bf000 r–p 0001b000 08:02 5981 /lib/libgcc_s.so.1
b71bf000-b71c0000 rw-p 0001c000 08:02 5981 /lib/libgcc_s.so.1
b71c0000-b72a2000 r-xp 00000000 08:02 23397 /usr/lib/libstdc++.so.6.0.16
b72a2000-b72a6000 r–p 000e2000 08:02 23397 /usr/lib/libstdc++.so.6.0.16
b72a6000-b72a7000 rw-p 000e6000 08:02 23397 /usr/lib/libstdc++.so.6.0.16
b72a7000-b72ae000 rw-p 00000000 00:00 0
b72ae000-b72ee000 r-xp 00000000 08:02 2403 /usr/lib/libjpeg.so.62.0.0
b72ee000-b72ef000 r–p 00040000 08:02 2403 /usr/lib/libjpeg.so.62.0.0
b72ef000-b72f0000 rw-p 00041000 08:02 2403 /usr/lib/libjpeg.so.62.0.0
b72f0000-b7300000 rw-p 00000000 00:00 0
b7300000-b732a000 r-xp 00000000 08:02 187 /usr/lib/libpng12.so.0.46.0
b732a000-b732b000 r–p 00029000 08:02 187 /usr/lib/libpng12.so.0.46.0
b732b000-b732c000 rw-p 0002a000 08:02 187 /usr/lib/libpng12.so.0.46.0
b732c000-b732d000 rw-p 00000000 00:00 0
b732d000-b7330000 r-xp 00000000 08:02 5893 /lib/libdl-2.14.1.so
b7330000-b7331000 r–p 00002000 08:02 5893 /lib/libdl-2.14.1.so
b7331000-b7332000 rw-p 00003000 08:02 5893 /lib/libdl-2.14.1.so
b7332000-b7498000 r-xp 00000000 08:02 76 /lib/libc-2.14.1.so
b7498000-b749a000 r–p 00165000 08:02 76 /lib/libc-2.14.1.so
b749a000-b749b000 rw-p 00167000 08:02 76 /lib/libc-2.14.1.so
b749b000-b749e000 rw-p 00000000 00:00 0
b749e000-b74a0000 r-xp 00000000 08:02 3056 /usr/lib/libXcomposite.so.1.0.0
b74a0000-b74a1000 r–p 00001000 08:02 3056 /usr/lib/libXcomposite.so.1.0.0
b74a1000-b74a2000 rw-p 00002000 08:02 3056 /usr/lib/libXcomposite.so.1.0.0
b74a2000-b74a7000 r-xp 00000000 08:02 3055 /usr/lib/libXfixes.so.3.1.0
b74a7000-b74a8000 r–p 00004000 08:02 3055 /usr/lib/libXfixes.so.3.1.0
b74a8000-b74a9000 rw-p 00005000 08:02 3055 /usr/lib/libXfixes.so.3.1.0
b74a9000-b74b2000 r-xp 00000000 08:02 2404 /usr/lib/NX/lib/libXrender.so.1
.2.2
b74b2000-b74b3000 r–p 00008000 08:02 2404 /usr/lib/NX/lib/libXrender.so.1
.2.2
b74b3000-b74b4000 rw-p 00009000 08:02 2404 /usr/lib/NX/lib/libXrender.so.1
.2.2
b74b4000-b74b5000 rw-p 00000000 00:00 0
b74b5000-b74bf000 r-xp 00000000 08:02 612 /usr/lib/NX/lib/libXcompshad.so
.3.4.0
b74bf000-b74c0000 r–p 00009000 08:02 612 /usr/lib/NX/lib/libXcompshad.so
.3.4.0
b74c0000-b74c1000 rw-p 0000a000 08:02 612 /usr/lib/NX/lib/libXcompshad.so
.3.4.0
b74c1000-b74cf000 r-xp 00000000 08:02 532 /usr/lib/NX/lib/libXcompext.so.
3.4.0
b74cf000-b74d0000 r–p 0000d000 08:02 532 /usr/lib/NX/lib/libXcompext.so.
3.4.0
b74d0000-b74d1000 rw-p 0000e000 08:02 532 /usr/lib/NX/lib/libXcompext.so.
3.4.0
b74d1000-b74d2000 rw-p 00000000 00:00 0
b74d2000-b75c7000 r-xp 00000000 08:02 526 /usr/lib/NX/lib/libXcomp.so.3.4
.0
b75c7000-b75c8000 —p 000f5000 08:02 526 /usr/lib/NX/lib/libXcomp.so.3.4
.0
b75c8000-b75cb000 r–p 000f5000 08:02 526 /usr/lib/NX/lib/libXcomp.so.3.4
.0
b75cb000-b75cc000 rw-p 000f8000 08:02 526 /usr/lib/NX/lib/libXcomp.so.3.4
.0
b75cc000-b75d1000 rw-p 00000000 00:00 0
b75d1000-b75e2000 r-xp 00000000 08:02 3111 /usr/lib/libXpm.so.4.11.0
b75e2000-b75e3000 r–p 00010000 08:02 3111 /usr/lib/libXpm.so.4.11.0
b75e3000-b75e4000 rw-p 00011000 08:02 3111 /usr/lib/libXpm.so.4.11.0
b75e4000-b760d000 r-xp 00000000 08:02 5931 /lib/libm-2.14.1.so
b760d000-b760e000 r–p 00028000 08:02 5931 /lib/libm-2.14.1.so
b760e000-b760f000 rw-p 00029000 08:02 5931 /lib/libm-2.14.1.so
b760f000-b7610000 rw-p 00000000 00:00 0
b7610000-b7626000 r-xp 00000000 08:02 5091 /lib/libz.so.1.2.5
b7626000-b7627000 r–p 00015000 08:02 5091 /lib/libz.so.1.2.5
b7627000-b7628000 rw-p 00016000 08:02 5091 /lib/libz.so.1.2.5
b7628000-b7730000 r-xp 00000000 08:02 242 /usr/lib/NX/lib/libX11.so.6.2
b7730000-b7731000 —p 00108000 08:02 242 /usr/lib/NX/lib/libX11.so.6.2
b7731000-b7732000 r–p 00108000 08:02 242 /usr/lib/NX/lib/libX11.so.6.2
b7732000-b7735000 rw-p 00109000 08:02 242 /usr/lib/NX/lib/libX11.so.6.2
b7735000-b7736000 rw-p 00000000 00:00 0
b7736000-b7746000 r-xp 00000000 08:02 2399 /usr/lib/NX/lib/libXext.so.6.4
b7746000-b7747000 r–p 0000f000 08:02 2399 /usr/lib/NX/lib/libXext.so.6.4
b7747000-b7748000 rw-p 00010000 08:02 2399 /usr/lib/NX/lib/libXext.so.6.4
b7748000-b77cc000 r-xp 00000000 08:02 17213 /usr/lib/libfreetype.so.6.7.2
b77cc000-b77d0000 r–p 00083000 08:02 17213 /usr/lib/libfreetype.so.6.7.2
b77d0000-b77d1000 rw-p 00087000 08:02 17213 /usr/lib/libfreetype.so.6.7.2
b77d6000-b77d7000 rw-p 00000000 00:00 0
b77d7000-b77e0000 r-xp 00000000 08:02 3134 /usr/lib/libXcursor.so.1.0.2
b77e0000-b77e1000 r–p 00008000 08:02 3134 /usr/lib/libXcursor.so.1.0.2
b77e1000-b77e2000 rw-p 00009000 08:02 3134 /usr/lib/libXcursor.so.1.0.2
b77e2000-b77e5000 rw-p 00000000 00:00 0
b77e5000-b7804000 r-xp 00000000 08:02 3402 /lib/ld-2.14.1.so
b7804000-b7805000 r–p 0001f000 08:02 3402 /lib/ld-2.14.1.so
b7805000-b7806000 rw-p 00020000 08:02 3402 /lib/ld-2.14.1.so
bfa9b000-bfabc000 rw-p 00000000 00:00 0 [stack]
ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso]
Warning: Parent process appears to be dead. Exiting keeper.
xrdb: Connection refused
xrdb: Can’t open display ‘:1002’

Further debugging has shown that the problem is not with xrdb. The xrdb errors appear to be symptoms/side-effects of a problem with /usr/lib/NX/nxagent.

Debugging thread: http://forums.opensuse.org/english/other-forums/development/programming-scripting/469312-core-file-user-directory-what-program-failed.html

I noticed - in your other posts already - that you can not access display 1002. I wonder if there is not a lock on that particular display (from an older session). Maybe you could try to change DISPLAY_BASE in node.conf from 1000 to something else (for example 2000) and restart the NX server, then see what happens when your client tries to access display 2000+n (or if it still insists on opening display 1002).

And again - I don’t know if I suggested that already - you should try to connect as the same user (the one who cannot connect) from another computer (to exclude problems on that client’s side).

The display increments by one each time I try to connect, so I don’t think stale lock files are a problem. I also have /tmp clear itself each boot to try to prevent that.

Can you make sure that both FreeNX and NX packages are from the same repo? Use

zypper info FreeNX
zypper info NX

FreeNX 0.7.3-22.1 and NX 3.4.0-83.1 are the ones I have at the moment in my repo. They run on several 11.4 machines, one 32bit an another 64bit 12.1 systems.
I assume you already set the maximum verbosity for server log in node.conf. If not, set

NX_LOG_LEVEL=7

Not sure it will help, but you can try to install NoMachine NX (as well) and run it on a different SSH port while FreeNX remains the main server and will just forward incoming connections on this port to the NoMachine server. NoMachine free edition is limited to one client connection.

If you want to try that - again not sure it will help - I can explain you how to run them in parallel. It’s not extremely complicated (but you’ll have to manually remove the nx user prior to NoMachine installation).

I am running the same FreeNX and NX versions from your repo.

Sure, I can try running both. Let me know what I have to do.

OK, look here: http://forums.opensuse.org/english/get-technical-help-here/how-faq-forums/unreviewed-how-faq/469607-running-nomachine-nx-parallel-freenx.html

Actually, I dug around in the source and found the problem: http://forums.opensuse.org/english/other-forums/development/programming-scripting/469312-core-file-user-directory-what-program-failed-2.html#post2420332. There’s a description and a diff in successive posts.