Skip to content
This repository has been archived by the owner on Jun 13, 2020. It is now read-only.

Support Multiple client in vktrace #8

Open
szihs opened this issue Dec 10, 2018 · 3 comments
Open

Support Multiple client in vktrace #8

szihs opened this issue Dec 10, 2018 · 3 comments

Comments

@szihs
Copy link

szihs commented Dec 10, 2018

Hello,

Currently vktrace recording in client-server mode only support single instance recording in parallel

--------- beginning of /dev/log_main
E/vktrace ( 5024): vktrace_lib library loaded into PID 5024
E/vktrace ( 5024): Client: Connected to port 34201 successfully.
E/vktrace (  189): Connected on port 34201.
E/vktrace ( 5286): vktrace_lib library loaded into PID 5286
E/vktrace ( 5286): Client: Failed connect. Possibly non-fatal.
E/vktrace ( 5286): Client: Connect attempt 0 on port 34201 failed, trying again. (err=111)
E/vktrace ( 5286): Client: Failed connect. Possibly non-fatal.
E/vktrace ( 5286): Client: Connect attempt 1 on port 34201 failed, trying again. (err=111)
E/vktrace ( 5286): Client: Failed connect. Possibly non-fatal.
E/vktrace ( 5286): Client: Connect attempt 2 on port 34201 failed, trying again. (err=111)
E/vktrace ( 5286): Client: Failed connect. Possibly non-fatal.
E/vktrace ( 5286): Client: Connect attempt 3 on port 34201 failed, trying again. (err=111)
E/vktrace ( 5286): Client: Failed connect. Possibly non-fatal.
E/vktrace ( 5286): Client: Connect attempt 4 on port 34201 failed, trying again. (err=111)
E/vktrace ( 5286): Client: Failed connect. Possibly non-fatal.
E/vktrace ( 5286): Client: Connect attempt 5 on port 34201 failed, trying again. (err=111)
E/vktrace ( 5286): Client: Failed connect. Possibly non-fatal.
E/vktrace ( 5286): Client: Connect attempt 6 on port 34201 failed, trying again. (err=111)
E/vktrace ( 5286): Client: Failed connect. Possibly non-fatal.
E/vktrace ( 5286): Client: Connect attempt 7 on port 34201 failed, trying again. (err=111)
E/vktrace ( 5286): Client: Failed connect. Possibly non-fatal.
E/vktrace ( 5286): Client: Connect attempt 8 on port 34201 failed, trying again. (err=111)
E/vktrace ( 5286): Client: Failed connect. Possibly non-fatal.
E/vktrace ( 5286): Client: Connect attempt 9 on port 34201 failed, trying again. (err=111)
E/vktrace ( 5286): Client: Couldn't find any connections.

In above logs, PID 5024 is successfully intercepted, however at same time running process 5286 fail in connect call.

Please advise how to fix multiple connections.
Regards,
Harsh

@davidlunarg
Copy link
Collaborator

This is a known shortcoming of vktrace, it cannot handle multiple instances. I worked on this problem a while ago and came up with a prototype for a solution, but have not come up with a final solution. The prototype is in branch david_vktrace_mult_instances_update_1.

The shortcoming of this solution is that you need to start multiple trace servers - one for each instance that will exist simultaneously, so you need to know the number of servers to start before you start tracing. Ideally, you would like a single trace server to handle multiple instances. If you use that branch, you should probably rebase from master.

@szihs
Copy link
Author

szihs commented Dec 11, 2018

Is this current shortcoming not addressable by single server technically?

I hope server listening socket can bind and handle multiple incoming connect calls.

Thanks for your support

@davidlunarg
Copy link
Collaborator

I single trace server should be able to handle multiple connections. I don't think there are technical barriers to implementing this, I think it is just a matter of writing the code.

@KarenGhavam-lunarG KarenGhavam-lunarG transferred this issue from LunarG/VulkanTools Jun 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants