jonlee836 / neatx

Automatically exported from code.google.com/p/neatx
0 stars 0 forks source link

nxagent parse error #34

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Connect via nx with a valid password.

What is the expected output? What do you see instead?
Session should connect - instead error message generated:
NX> 500 Error: Session '32AC2C467ABAC02616CF26896AA3B79E' has 
status 'terminated', aborting

What version of the product are you using? On what operating system?
Gentoo - neatx v 0.3.1_p43-r1  (I'm sure the -r1 is a Gentoo addition).
nx v 3.3.0-r1

Please provide any additional information below.

See attached extra info (too long for comment field).

The bit about xrdb not existing is probably a red herring - the file does 
exist and is world executable.  It does execute fine by ordinary users.  
The first error I saw was the error when parsing the options by nxagent.  
I could not find an example anywhere of what a valid set of options looks 
like.

Original issue reported on code.google.com by freemanr...@gmail.com on 11 Oct 2009 at 11:29

Attachments:

GoogleCodeExporter commented 8 years ago
Here's the relevant error:

daemon:461 /usr/bin/nxagent[22505] stderr: Loop: PANIC! Parse error at 
environment option '-317-32AC2C467ABAC02616CF26896AA3B79E,backingstore'.

Looking at the options file you supplied, this part is malformed:

id=hostname,-317-32AC2C467ABAC02616CF26896AA3B79E

The id should be the hostname, the display number, and the session code, all
seperated by -'s. In your case, there's an extra , after the hostname, which is
causing nxagent to break.

Is there a , in your hostname?

Original comment by kormat on 11 Oct 2009 at 2:17

GoogleCodeExporter commented 8 years ago
Nope - I guess posting it won't hurt.  Here is the full line:
Oct 11 07:04:29 rich64 nxnode[22501]: DEBUG agent:620 Writing session 
options 
'nx/nx,product=Neatx-GPL,shpix=1,clipboard=both,render=1,composite=1,cache=16M,g
eometry=1024x768+128+92,accept=127.0.0.1,client=linux,strict=0,cleanup=0,cookie=
D9B4790305C7AB2503E0F81B7E65EAC4,resize=0,keyboard=pc102/us,images=64M,link=lan,
type=kde,id=rich.homedns.org,-317-32AC2C467ABAC02616CF26896AA3B79E,backingstore=
1,shmem=1:317\n'to 
/var/lib/neatx/sessions/32AC2C467ABAC02616CF26896AA3B79E/options

Not sure where it is getting the hostname from.  It isn't set in neatx.conf.

Original comment by freemanr...@gmail.com on 11 Oct 2009 at 3:59

GoogleCodeExporter commented 8 years ago
Turns out the syntax in /etc/hosts was wrong (included a comma between two 
hostnames for the machine's IP).  That problem must have been there for years - 
not 
sure why it was never a problem before.  In any case it might not hurt for 
neatx to 
sanitize the input.

Now I'm getting further, but the connection is terminating with an "internal 
error" 
reported to the client.

The error in the log seems to be:
Oct 11 12:09:30 rich64 nxserver[23477]: DEBUG protocol:227 
<<< 'restoresession  --link="lan" --backingstore="1" --encryption="1" 
--cache="16M" --images="64M" --shmem="1" --shpix="1" --strict="0" 
--composite="1" --media="0" --session="home" --type="unix-kde" 
--geometry="1024x768+128+92" --client="linux" --keyboard="pc102/us" 
--id="8A6CCB72B8E32CA14C5EEB0D52FBF541"\n'
Oct 11 12:09:30 rich64 nxserver[23477]: DEBUG protocol:172 
>>> 'Restoresession  --link="lan" --backingstore="1" --encryption="1" 
--cache="16m" --images="64m" --shmem="1" --shpix="1" --strict="0" 
--composite="1" --media="0" --session="home" --type="unix-kde" 
--geometry="1024x768+128+92" --client="linux" --keyboard="pc102/us" 
--id="8a6ccb72b8e32ca14c5eeb0d52fbf541"\n'
Oct 11 12:09:30 rich64 nxserver[23477]: INFO nxserver:515 Restoring 
session '8A6CCB72B8E32CA14C5EEB0D52FBF541'
Oct 11 12:09:30 rich64 nxserver[23477]: DEBUG session:248 Loading session 
8A6CCB72B8E32CA14C5EEB0D52FBF541 
from /var/lib/neatx/sessions/8A6CCB72B8E32CA14C5EEB0D52FBF541/neatx.data
Oct 11 12:09:30 rich64 nxserver[23477]: INFO nxserver:524 Found 
session '8A6CCB72B8E32CA14C5EEB0D52FBF541' in session database
Oct 11 12:09:30 rich64 nxserver[23477]: DEBUG nxserver:645 Connecting to nxnode
Oct 11 12:09:30 rich64 nxserver[23477]: INFO node:514 Connecting 
to '/var/lib/neatx/sessions/8A6CCB72B8E32CA14C5EEB0D52FBF541/nxnode.sock'
Oct 11 12:09:30 rich64 nxserver[23477]: ERROR protocol:165 Error while handling 
line 'restoresession  --link="lan" --backingstore="1" --encryption="1" 
--cache="16M" --images="64M" --shmem="1" --shpix="1" --strict="0" 
--composite="1" --media="0" --session="home" --type="unix-kde" 
--geometry="1024x768+128+92" --client="linux" --keyboard="pc102/us" 
--id="8A6CCB72B8E32CA14C5EEB0D52FBF541"'
Oct 11 12:09:30 rich64 nxserver[23477]: Traceback (most recent call last):
Oct 11 12:09:30 rich64 nxserver[23477]:   
File "/usr/lib64/python2.6/site-packages/neatx/protocol.py", line 161, in 
_HandleLine
Oct 11 12:09:30 rich64 nxserver[23477]:     self._handler(line)
Oct 11 12:09:30 rich64 nxserver[23477]:   
File "/usr/lib64/python2.6/site-packages/neatx/app/nxserver.py", line 209, in 
__call__
Oct 11 12:09:30 rich64 nxserver[23477]:     return self._RestoreSession(args)
Oct 11 12:09:30 rich64 nxserver[23477]:   
File "/usr/lib64/python2.6/site-packages/neatx/app/nxserver.py", line 527, in 
_RestoreSession
Oct 11 12:09:30 rich64 nxserver[23477]:     nodeclient = 
self._GetNodeClient(sessid, False)
Oct 11 12:09:30 rich64 nxserver[23477]:   
File "/usr/lib64/python2.6/site-packages/neatx/app/nxserver.py", line 646, in 
_GetNodeClient
Oct 11 12:09:30 rich64 nxserver[23477]:     nodeclient.Connect(retry)
Oct 11 12:09:30 rich64 nxserver[23477]:   
File "/usr/lib64/python2.6/site-packages/neatx/node.py", line 528, in Connect
Oct 11 12:09:30 rich64 nxserver[23477]:     self._InnerConnect(sock, False)
Oct 11 12:09:30 rich64 nxserver[23477]:   
File "/usr/lib64/python2.6/site-packages/neatx/node.py", line 493, in 
_InnerConnect
Oct 11 12:09:30 rich64 nxserver[23477]:     sock.connect(self._address)
Oct 11 12:09:30 rich64 nxserver[23477]:   File "<string>", line 1, in connect
Oct 11 12:09:30 rich64 nxserver[23477]: error: [Errno 111] Connection refused
Oct 11 12:09:30 rich64 nxserver[23477]: DEBUG protocol:172 >>> 'NX> 500 
Internal 
error\n'
Oct 11 12:09:30 rich64 nxserver[23477]: DEBUG protocol:172 >>> 'NX> 999 Bye.\n'
Oct 11 12:09:30 rich64 nxserver[23477]: DEBUG nxserver:701 No nxagent port, not 
starting netcat

Original comment by freemanr...@gmail.com on 11 Oct 2009 at 4:11

GoogleCodeExporter commented 8 years ago
Ok, it looks like cleaning out the old sessions helped - now it actually starts 
up 
KDE, but then the display freezes and eventually times out.  The relevant log 
entries seem to be:

Oct 11 12:23:25 rich64 nxnode[26118]: DEBUG daemon:461 -bash[26332] stderr: 
Xlib:  
extension "Generic Event Extension" missing on display ":150.0".
(repeated many times)
Oct 11 12:23:25 rich64 nxagent[26153]: segfault at 0 ip (null) sp 
00007fff1e88e018 
error 14 in nxagent[400000+3ae000]
Oct 11 12:23:25 rich64 nxnode[26118]: DEBUG daemon:560 
__CheckExit /usr/bin/nxagent[26153] stdin:True stdout:True stderr:False exit:11
Oct 11 12:23:25 rich64 nxserver[26081]: ERROR utils:865 netcat stderr: 
read(net): 
Connection reset by peer
Oct 11 12:23:25 rich64 nxserver[26081]: ERROR nxserver:731 Netcat failed 
(code=1, 
signal=None)
Oct 11 12:23:25 rich64 nxnode[26118]: DEBUG daemon:461 -bash[26332] stderr: 
ksplash: Fatal IO error: client killed
(then lots of other client errors)

Not sure if this is really neatx's fault (though nomachine's server works fine 
for 
me).  I'll see if I can rebuild nxagent with symbols - and maybe get a strace 
out 
of it.

Original comment by freemanr...@gmail.com on 11 Oct 2009 at 4:30

GoogleCodeExporter commented 8 years ago
Ok, rebuilt nx with debug symbols.  The strace didn't look particularly useful, 
but 
I can provide it if asked.  Here is the attached full backtrace of the crash.

Original comment by freemanr...@gmail.com on 11 Oct 2009 at 9:45

Attachments:

GoogleCodeExporter commented 8 years ago
I had another unusual software termination or two over the next day with memory-
confused.  Additionally, Gentoo just stabilized KDE 4.  Between a reboot and 
the KDE
upgrade, neatx now seems to be working just fine.  I think that this issue can 
be
considered resolved, but:

1.  Hostname input ideally could stand to be sanitized (not terribly important).
2.  More importantly, when nxagent does crash the session does not get marked as
terminated, and future nx connections keep getting directed to that dead session
which results in an "internal error" being reported by the client.  Only way to 
fix
this is to manually delete the session record.  This probably should be fixed -
sessions that look dead should be cleaned up.

Original comment by freemanr...@gmail.com on 13 Oct 2009 at 1:15

GoogleCodeExporter commented 8 years ago
Ah, good stuff re: neatx working fine now. Re: 1, yup, agreed.

Re: 2, hmm, we /should/ already be handling termination like that correctly, but
obviously there's a bug there somewhere. Thanks for spotting its effects.
http://code.google.com/p/neatx/issues/detail?id=23 covers the dead sessions 
still
being listed issue.

Original comment by kormat on 24 Oct 2009 at 6:26

GoogleCodeExporter commented 8 years ago
http://code.google.com/p/neatx/source/detail?r=48 commited which fixes 1.

Original comment by kormat on 11 Dec 2009 at 7:27