Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

Problems connecting to VNC #16

Closed
ravener opened this issue Oct 30, 2018 · 10 comments
Closed

Problems connecting to VNC #16

ravener opened this issue Oct 30, 2018 · 10 comments
Labels
bug report Something is not working properly.

Comments

@ravener
Copy link
Member

ravener commented Oct 30, 2018

I followed the guide in wiki and started up vnc server and exported the DISPLAY variable and installed aterm, then i tried to connect through the vnc viewer app and everything went fine until after i entered password the connection got disconnected unexpectedly here's logs output from ~/.vnc/localhost:1.log


Xvnc TigerVNC 1.9.0 - built Oct 28 2018 20:05:34
Copyright (C) 1999-2018 TigerVNC Team and many others (see README.rst)
See http://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12003000, The X.Org Foundation


Tue Oct 30 21:29:07 2018
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on all interface(s), port 5901
 vncext:      created VNC server for screen 0
Sync Extension 3.1
[dix] Could not init font path element /data/data/com.termux/files/usr/share/fonts/misc/, removing from list!
[dix] Could not init font path element /data/data/com.termux/files/usr/share/fonts/TTF/, removing from list!
[dix] Could not init font path element /data/data/com.termux/files/usr/share/fonts/OTF/, removing from list!
[dix] Could not init font path element /data/data/com.termux/files/usr/share/fonts/Type1/, removing from list!
[dix] Could not init font path element /data/data/com.termux/files/usr/share/fonts/100dpi/, removing from list!
[dix] Could not init font path element /data/data/com.termux/files/usr/share/fonts/75dpi/, removing from list!
Popen: `"/data/data/com.termux/files/usr/bin/xkbcomp" -w 1 "-R/data/data/com.termux/files/usr/share/X11/xkb" -xkm "-" -em1 "The XKEYBOARD keymap compiler (xkbcomp) reports:" -emp "> " -eml "Errors from xkbcomp are not fatal to the X server" "/data/data/com.termux/files/usr/tmp/server-1.xkm"', fp = 0xb652fccc
Pclose: fp = 0xb652fccc
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported high keycode 372 for name <I372> ignored
>                   X11 cannot support keycodes above 255.
>                   This warning only shows for the first high keycode.
Errors from xkbcomp are not fatal to the X server
Loaded XKB keymap /data/data/com.termux/files/usr/tmp/server-1.xkm, defined=0x7f
client(0): Reserved pid(32315).
client(0): Reserved cmdname(/data/data/com.termux/files/usr/bin/Xvnc) and cmdargs(:1 -auth /data/data/com.termux/files/home/.Xauthority -desktop localhost:1 () -geometry 1024x768 -pn -rfbauth /data/data/com.termux/files/home/.vnc/passwd -rfbport 5901 -rfbwait 30000).
/data/data/com.termux/files/home/.vnc/xstartup: 11: /data/data/com.termux/files/home/.vnc/xstartup: twm: not found
client(200000): Reserved pid(32325).
client(200000): Reserved cmdname(aterm) and cmdargs(-geometry 80x24+10+10 -ls).
AllocNewConnection: client index = 1, socket fd = 9
aterm: can't load font "7x14"

Tue Oct 30 21:29:28 2018
 Connections: accepted: 127.0.0.1::33405
 SConnection: Client needs protocol version 3.8
 SConnection: Client requests security type VncAuth(2)
(EE) Segmentation fault at address 0xe
(EE) 
Fatal server error:
(EE) Caught signal 11 (Segmentation fault). Server aborting
(EE) 
XIO:  fatal IO error 11 (Try again) on X server ":1"
      after 1465 requests (1452 known processed) with 0 events remaining.

Any ideas? btw I'm on Android 5.1.1

@ghost
Copy link

ghost commented Oct 30, 2018

Can't reproduce this on AArch64/Oreo.

Whats your architecture (uname -m) ?

@ghost ghost added bug report Something is not working properly. unconfirmed A problem is not reproduced. labels Oct 30, 2018
@ravener
Copy link
Member Author

ravener commented Oct 30, 2018

@xeffyr armv7l

@Grimler91
Copy link
Member

I ran into the same error on arm android 7.1. It worked a moment ago though, before I accidently started a second vncserver (but I'm not sure that was the root cause)

@Grimler91
Copy link
Member

Doesn't work after a device reboot either so I'm guessing the vncserver that worked for me had been running for a couple of days and that some update has broken it since then (so that when I start a new one it doesn't work)

@ghost
Copy link

ghost commented Oct 30, 2018

Got same error on ARM/Android 6.

@ghost ghost removed the unconfirmed A problem is not reproduced. label Oct 30, 2018
@ghost
Copy link

ghost commented Oct 30, 2018

Just tried to run it under gdb - got illegal instruction in libcrypto.so.1.1.

@Grimler91
Copy link
Member

@xeffyr That's probably not the reason for the crash, see termux/termux-packages#1660 (arm is annoying)

@ghost
Copy link

ghost commented Oct 30, 2018

@Grimler91 Thanks. Now I have backtrace:

#0  0xb6686b7c in strlen () from /system/lib/libc.so                            
#1  0x7f648dfa in rfb::PlainPasswd::replaceBuf(char*) ()                        
#2  0x7f648dd8 in rfb::PlainPasswd::~PlainPasswd() ()                           
#3  0x7f64035c in rfb::SSecurityVncAuth::processMsg(rfb::SConnection*) ()
#4  0x7f6400b6 in rfb::SSecurityStack::processMsg(rfb::SConnection*) ()
#5  0x7f63bc36 in rfb::SConnection::processSecurityMsg() ()                     
#6  0x7f64154a in rfb::VNCSConnectionST::processMessages() ()                   
#7  0x7f62f3d0 in XserverDesktop::handleSocketEvent(int, network::SocketServer*, bool, bool) ()                                                                 
#8  0x7f62f290 in XserverDesktop::handleSocketEvent(int, bool, bool) ()         
#9  0x7f691270 in ospoll_wait ()                                                
#10 0x7f68cc9e in WaitForSomething ()                                           
#11 0x7f656fbc in Dispatch ()                                                   
#12 0x7f65d756 in dix_main ()                                                   
#13 0xb6685366 in __libc_init () from /system/lib/libc.so                       
#14 0x7f59fc1c in ?? ()

This can be introduced in b3ede89.

@ghost
Copy link

ghost commented Oct 30, 2018

To fix that issue, I will had to completely disable GLX. This means that OpenGL won't be available here.

Specifically, these commits should be reverted:

  • cd0f20c (mesa: enable glx via xlib)
  • effb70f (tigervnc, xorg-server-xvfb: fix GLX extension by providing 'swrast_dri.so' for these packages)
  • a954c55 (xorg-server-xvfb: disable dri as it is unsupported now)
  • bf945ba (mesa-swrast: install file 'dri_interface.h')

Currently, I don't have idea why it works on AArch64 and not on ARM: according to backtrace, there nothing wrong with mesa/glx, but it's configuration has effect somehow. Maybe I need to inspect source code and/or do a deeper debugging.

But current solution is only to disable GLX. If someone needs it, I can create a repository component experimental which will have features that considered as unstable.

@ghost ghost closed this as completed in 68de322 Oct 31, 2018
@ghost
Copy link

ghost commented Oct 31, 2018

Affected packages were updated.

ghost pushed a commit that referenced this issue Nov 22, 2020
 Fixes #16.

 This undo changes introduced in the following commits:

  * bf945ba.
  * a954c55.
  * effb70f.
  * cd0f20c.
@ghost ghost locked and limited conversation to collaborators Oct 9, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug report Something is not working properly.
Projects
None yet
Development

No branches or pull requests

2 participants