Skip to content

compute_fpfh_feature hanging if excecuted inside a multiprocessing.Process #6096

Open
@amarion35

Description

@amarion35

Checklist

Describe the issue

If the function o3d.pipelines.registration.compute_fpfh_feature is excecuted inside a Process that is not the main one, it never exits the function. It works fine with Threads though.

[input]

from multiprocessing import Process
import open3d as o3d
o3d.utility.set_verbosity_level(o3d.utility.VerbosityLevel.Debug)

path = "any/pointcloud/file.pcd"
pcd = o3d.io.read_point_cloud(path)

def compute_fpfh(pcd):
    print("start")
    pcd_fpfh = o3d.pipelines.registration.compute_fpfh_feature(
        pcd,
        o3d.geometry.KDTreeSearchParamHybrid(radius=1, max_nn=100)
    )
    print("end")
    return pcd_fpfh

[input]

compute_fpfh(pcd)

[output]

start
end

Feature class with dimension = 33 and num = 1000
Access its data via data member.

[input]

process = Process(
    target=compute_fpfh,
    args=(pcd,)
)
process.start()
process.join()

[output]

start

Steps to reproduce the bug

from multiprocessing import Process
import open3d as o3d
o3d.utility.set_verbosity_level(o3d.utility.VerbosityLevel.Debug)

path = "any/pointcloud/file.pcd"
pcd = o3d.io.read_point_cloud(path)

def compute_fpfh(pcd):
    print("start")
    pcd_fpfh = o3d.pipelines.registration.compute_fpfh_feature(
        pcd,
        o3d.geometry.KDTreeSearchParamHybrid(radius=1, max_nn=100)
    )
    print("end")
    return pcd_fpfh

compute_fpfh(pcd)
process = Process(
    target=compute_fpfh,
    args=(pcd,)
)
process.start()
process.join()

Error message

No response

Expected behavior

No response

Open3D, Python and System information

- Operating system: Ubuntu 20.04 (WSL)
- Python version: Python 3.8
- Open3D version: 0.16.1+1c84344a
- System architecture: x86
- Is this a remote workstation?: no
- How did you install Open3D?: build from source
- Compiler version (if built from source): ?

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugNot a build issue, this is likely a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions