Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XPRA - Matlab - Clipboard blinking, UI unresponsive #1139

Closed
totaam opened this issue Mar 2, 2016 · 15 comments
Closed

XPRA - Matlab - Clipboard blinking, UI unresponsive #1139

totaam opened this issue Mar 2, 2016 · 15 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Mar 2, 2016

Issue migrated from trac ticket # 1139

component: server | priority: major | resolution: fixed

2016-03-02 03:20:50: esarmien created the issue


This problem only occurs with MatLab R2015A.

Currently, we use NoMachine NX4 to login to our 'login' hosts,
and from there, users launch HTCondor jobs
which are powered by XPRA.

We haven't had any problems with most
of our applications -- we've deployed XPRA
cluster wide and all of our researchers use it.

However, with Matlab R2015A, the
clipboard icon keeps blinking, although there
is apparently nothing in the clipboard that
I can see.

When this occurs, the UI becomes unresponsive.

However, when I disable the clipboard,
everything works fine.

Unfortunately, disabling the clipboard isn't
a solution since people copy and paste
into Matlab pretty much all the time.

I was wondering if there was anything
I could do about this.

I am including a ZIP file that was generated by the XPRA bug report tool, as well as output logs from the xpra session.

@totaam
Copy link
Collaborator Author

totaam commented Mar 2, 2016

2016-03-02 03:21:12: esarmien uploaded file xpra-matlab-clipboard.zip (412.0 KiB)

@totaam
Copy link
Collaborator Author

totaam commented Mar 2, 2016

2016-03-02 04:30:51: antoine changed owner from antoine to esarmien

@totaam
Copy link
Collaborator Author

totaam commented Mar 2, 2016

2016-03-02 04:30:51: antoine commented


Can you run with clipboard debugging turned on?
The clipboard is infamously difficult to get working properly with applications that misbehave (ie: requesting clipboard contents eagerly). See Clipboard.

It's also very difficult to debug without being able to run the application on my testing environment, which may be difficult to arrange given Matlab's licensing.

@totaam
Copy link
Collaborator Author

totaam commented Mar 2, 2016

2016-03-02 14:55:39: esarmien uploaded file xpra-matlab-clipboard-debug.zip (7.5 KiB)

xpra matlab -d clipboard on

@totaam
Copy link
Collaborator Author

totaam commented Mar 2, 2016

2016-03-02 14:56:19: esarmien changed owner from esarmien to antoine

@totaam
Copy link
Collaborator Author

totaam commented Mar 2, 2016

2016-03-02 14:56:19: esarmien commented


Hi Antoine,

I just added output from '-d clipboard' from xpra server/client with MatLab R2015A.

Thanks for your prompt response, I really appreciate it

@totaam
Copy link
Collaborator Author

totaam commented Mar 2, 2016

2016-03-02 15:26:50: esarmien commented


Antoine,

If it's helpful -- I can give you a trial MatLab R2015B for Linux and you can use my trial username and license key.

Best,
Evan

@totaam
Copy link
Collaborator Author

totaam commented Mar 3, 2016

2016-03-03 15:11:45: antoine changed owner from antoine to esarmien

@totaam
Copy link
Collaborator Author

totaam commented Mar 3, 2016

2016-03-03 15:11:45: antoine commented


Looking at the logs, I see:

  • server side, lots of:
target for CLIPBOARD: 'TARGETS'
..
remote selection fetch timed out or empty
  • client side:
process clipboard request, request_id=8, selection=CLIPBOARD, local name=CLIPBOARD, target=TARGETS
..
_filter_targets(())=[]
clipboard raw -> wire: ('ATOM', 32, ()) -> ('atoms', [])

And so the server wants to know the "valid targets" (the type of data that it can request) for the clipboard data the client owns (a cut or copy initiated on the client I presume).
The client finds NO targets (which is strange, but not invalid AFAICT), and there seems to be a bug in that we then fail to send the empty list and do nothing instead..
The server side clipboard code then spins, times out and tries again.
This bug has been present for a very long time!


r12114 should fix this - I will backport it to the older branches in due time if it is correct.
@esarmien: can you try the latest beta builds and confirm that this fixes things? (no win32 or OSX builds yet with this change) I am not certain copying will work since there are no targets, but at least this particular bug should be gone.

Also, are there any particular reasons why you still use NX at all?
Having nested remote access is always going to be sub-optimal:

  • it adds to the latency
  • things like clipboard synchronization may encounter problems if one of the solutions does "over eager clipboard" (which may still play a part here? would explain the empty targets for example)
  • you end up with a subset of the features that would normally be available

@totaam
Copy link
Collaborator Author

totaam commented Mar 3, 2016

2016-03-03 17:13:19: esarmien changed owner from esarmien to antoine

@totaam
Copy link
Collaborator Author

totaam commented Mar 3, 2016

2016-03-03 17:13:19: esarmien commented


Thanks Antoine! The BETA version resolves the problem -- it works!

TBH, we don't want to use NoMachine. Here is how we're situated-- users login to a NoMachine desktop and from there start primarily graphical applications on our compute cluster. We were having serious problems with NoMachine NX4 -- users desktops were crashing and along with them, the applications they launched, often kept running for days for computations, as we were simply X Forwarding from the cluster nodes to the dekstop. XPRA has been a huge success for us now that we can basically mitigate NoMachine desktop crashes, which happen more often than we'd like.

In the future we are def. going to go torwards an total-XPRA solution, but in the meantime, we have this.

Thanks again!

Best,
Evan

@totaam
Copy link
Collaborator Author

totaam commented Mar 4, 2016

2016-03-04 10:35:34: antoine changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented Mar 4, 2016

2016-03-04 10:35:34: antoine set resolution to fixed

@totaam
Copy link
Collaborator Author

totaam commented Mar 4, 2016

2016-03-04 10:35:34: antoine changed title from XPRA 0.16.2 - Matlab - Clipboard blinking, UI unresponsive to XPRA - Matlab - Clipboard blinking, UI unresponsive

@totaam
Copy link
Collaborator Author

totaam commented Mar 4, 2016

2016-03-04 10:35:34: antoine commented


Thanks for testing.
The fix has been applied to all branches in 12115. (ie: it will be included in 0.16.3 - which also includes some other minor fixes for running matlab)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant