server icon indicating copy to clipboard operation
server copied to clipboard

tritonclient.utils.InferenceServerException: [StatusCode.INTERNAL] Unable to open shared memory region: '/tVHIApxKugk6TwsknLr1b'

Open manhtd98 opened this issue 2 years ago • 4 comments

I try to create share_memory on client and got that error: here is my source code

self.shm_ip0_handle = shm.create_shared_memory_region("input0_data",
                                                     self.key1,
                                                     100)
            self.shm_ip1_handle = shm.create_shared_memory_region("input1_data",
                                                     self.key2,
                                                     100)
            input0_data_serialized = utils.serialize_byte_tensor(in0n)
            input0_byte_size = utils.serialized_byte_size(input0_data_serialized)
            shm.set_shared_memory_region(self.shm_ip0_handle, [input0_data_serialized])
            self.triton_client.register_system_shared_memory("input0_data",
                                                     self.key1,
                                                     input0_byte_size)
            
            input1_data_serialized = utils.serialize_byte_tensor(loc)
            input1_byte_size = utils.serialized_byte_size(input1_data_serialized)
            shm.set_shared_memory_region(self.shm_ip1_handle, [input1_data_serialized])
            self.triton_client.register_system_shared_memory("input1_data",
                                                     self.key2,
                                                     input1_byte_size)
            inputs[0].set_shared_memory("input0_data")
            inputs[1].set_shared_memory("input1_data")

manhtd98 avatar Jul 22 '22 19:07 manhtd98

Hi @manhtd98, did the client code ran successfully? Can you share the entire server output?

kthui avatar Jul 22 '22 23:07 kthui

it cannot pass to server. I got this error on client:

tritonclient.utils.InferenceServerException: [StatusCode.INTERNAL] Unable to open shared memory region: '/tVHIApxKugk6TwsknLr1b' 

manhtd98 avatar Jul 23 '22 07:07 manhtd98

Are you running the client in a different container? If yes, you need to add --ipc host flag to both of the containers.

Tabrizian avatar Jul 25 '22 14:07 Tabrizian

i run client in host and triton on docker. I set --ipc host on triton

manhtd98 avatar Jul 25 '22 18:07 manhtd98

Closing due to inactivity. Please let us know if you would like this issue reopened for follow-up.

dyastremsky avatar Feb 23 '23 23:02 dyastremsky