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 upload file causes UI thread delays #2668

Closed
totaam opened this issue Mar 23, 2020 · 17 comments
Closed

xpra upload file causes UI thread delays #2668

totaam opened this issue Mar 23, 2020 · 17 comments
Labels

Comments

@totaam
Copy link
Collaborator

totaam commented Mar 23, 2020

Issue migrated from trac ticket # 2668

component: client | priority: minor | resolution: needinfo

2020-03-23 11:34:09: stdedos created the issue


Is it possible that you need to do r25486 (from #2617) also for file uploading?

I uploaded a 4mb file over the internet; and the shadow server freezing "matches approximately" the time it would take to upload said file.

-No UI thread polling waited ... message though on client output.*

@totaam
Copy link
Collaborator Author

totaam commented Mar 23, 2020

2020-03-23 13:46:48: antoine changed status from new to assigned

@totaam
Copy link
Collaborator Author

totaam commented Mar 23, 2020

2020-03-23 13:46:48: antoine changed title from xpra upload file on the main thread to xpra upload file causes UI thread delays

@totaam
Copy link
Collaborator Author

totaam commented Mar 23, 2020

2020-03-23 13:46:48: antoine commented


That's odd, we don't use the main thread for handling file transfer packets.
To be absolutely certain of this, I changed the code in r25744 to also log the thread handling the packet when xpra is started with:

XPRA_LOG_PACKET_TYPE=1 xpra ..

And this is what I see:

sending   ack-file-chunk (thread=<Thread(format, started daemon 140228485605120)>)
receiving send-file-chunk (thread=<Thread(parse, started daemon 140228383725312)>)

But maybe somehow we're slowing down the parse thread instead and causing knock on effects?

@totaam
Copy link
Collaborator Author

totaam commented Mar 23, 2020

2020-03-23 15:55:14: stdedos commented


Replying to [comment:1 Antoine Martin]:

To be absolutely certain of this, I changed the code in r25744 to also log the thread handling the packet when xpra is started with:

Server or client?

Server is Xenial (I know backports are not a good idea, I could try to apply manually), and Client has no beta builds posted

@totaam
Copy link
Collaborator Author

totaam commented Mar 23, 2020

2020-03-23 17:02:37: antoine commented


Server or client?
Both.

Server is Xenial (I know backports are not a good idea, I could try to apply manually),
Applying by hand should be trivial. This will not be backported at present because it is not a bug fix or an important feature.

and Client has no beta builds posted
There are now.

@totaam
Copy link
Collaborator Author

totaam commented Mar 24, 2020

2020-03-24 13:24:39: stdedos commented


You must control 2020-03-24 15:22:44,572 sending logging (thread=<Thread(format, started daemon 16768)>) messages!. You are spamming client-logging every millisecond!

@totaam
Copy link
Collaborator Author

totaam commented Mar 24, 2020

2020-03-24 13:51:09: antoine commented


You must control ..
Disable remote logging: --remote-logging=no.

@totaam
Copy link
Collaborator Author

totaam commented Mar 24, 2020

2020-03-24 15:00:57: stdedos commented


Replying to [comment:5 Antoine Martin]:

You must control ..
Disable remote logging: --remote-logging=no.

Isn't it better to handle it in-code? :/


I added a big file to upload; it uploaded 2.9mb / ~90mb file.

I could normally enter gibberish on my X11 lock screen, so I guess the delay was unrelated (but concurrent) to the file upload.

However: Server output (attached) contains a lot of send-file-chunk but no ack-file-chunk. Due to the above issue, client's output is impossible to save / work with (Windows terminal limitations).

@totaam
Copy link
Collaborator Author

totaam commented Mar 24, 2020

2020-03-24 15:01:31: stdedos uploaded file redact-uniq-xpra-2668-display-0-timestamp.log (82.6 KiB)

@totaam
Copy link
Collaborator Author

totaam commented Mar 24, 2020

2020-03-24 15:13:09: antoine changed status from assigned to new

@totaam
Copy link
Collaborator Author

totaam commented Mar 24, 2020

2020-03-24 15:13:09: antoine changed owner from antoine to stdedos

@totaam
Copy link
Collaborator Author

totaam commented Mar 24, 2020

2020-03-24 15:13:09: antoine commented


Isn't it better to handle it in-code? :/
No. No special case. This is a debugging tool, if you see optional packets you're not interested in, toggle the feature off. ie: audio, clipboard, etc..

I added a big file to upload; it uploaded 2.9mb / ~90mb file.
I only see a single receiving packet in the whole file, and lots of sending. How can that be?
I'm getting a mix of both.

@totaam
Copy link
Collaborator Author

totaam commented Mar 24, 2020

2020-03-24 15:49:46: stdedos commented


Replying to [comment:7 Antoine Martin]:

I added a big file to upload; it uploaded 2.9mb / ~90mb file.
I only see a single receiving packet in the whole file, and lots of sending. How can that be?
I'm getting a mix of both.

No idea. The server log is complete, minus all-but-first sending logging line.

@totaam
Copy link
Collaborator Author

totaam commented Mar 26, 2020

2020-03-26 09:30:39: stdedos commented


Replying to [comment:8 stdedos]:

Replying to [comment:7 Antoine Martin]:

I added a big file to upload; it uploaded 2.9mb / ~90mb file.
I only see a single receiving packet in the whole file, and lots of sending. How can that be?
I'm getting a mix of both.

No idea. The server log is complete, minus all-but-first sending logging line.

I have a small idea why there might not be any receiving-logging:

u@h:/usr/lib/python3/dist-packages/xpra$ grep -TrinIF 'def call_handler():'
u@h:/usr/lib/python3/dist-packages/xpra$ 

I forgot to backport r25744 to my server

@totaam
Copy link
Collaborator Author

totaam commented May 19, 2020

2020-05-19 13:46:44: stdedos commented


I just uploaded a 20mb file ... nothing like that happened.

Let's just ignore this for now.

@totaam
Copy link
Collaborator Author

totaam commented Oct 6, 2020

2020-10-06 14:11:16: antoine changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented Oct 6, 2020

2020-10-06 14:11:16: antoine set resolution to needinfo

@totaam totaam closed this as completed Oct 6, 2020
@totaam totaam added the v3.0.x label Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant