PointCloudLibrary / PointCloudLibrary/pcl

[pcl::io::loadPCDFile] The issue of thread stopping

Open
#6,209 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind: bug module: io
Dominant language
C++
Stars
11.1k
Forks
4.7k
Avg merge
4d 10h
Merged PRs (30d)
6

Description

Occasionally, there may be thread jamming issues when reading a PCD file.

The following is the stack information when the thread stops:
#0 0x0000ffff98218b44 in std::istream::sentry::sentry(std::istream&, bool) () from /lib/aarch64-linux-gnu/libstdc++.so.6
#1 0x0000ffff981c4420 in std::basic_istream<char, std::char_traits >& std::getline<char, std::char_traits, std::allocator >(std::basic_istream<char, std::char_traits >&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >&, char) () from /lib/aarch64-linux-gnu/libstdc++.so.6
#2 0x0000ffff742e1798 in pcl::PCDReader::readHeader(std::istream&, pcl::PCLPointCloud2&, Eigen::Matrix<float, 4, 1, 0, 4, 1>&, Eigen::Quaternion<float, 0>&, int&, int&, unsigned int&) () from /lib/aarch64-linux-gnu/libpcl_io.so.1.10
#3 0x0000ffff742e31a4 in pcl::PCDReader::readHeader(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, pcl::PCLPointCloud2&, Eigen::Matrix<float, 4, 1, 0, 4, 1>&, Eigen::Quaternion<float, 0>&, int&, int&, unsigned int&, int) () from /lib/aarch64-linux-gnu/libpcl_io.so.1.10
#4 0x0000ffff742e0ea8 in pcl::PCDReader::read(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, pcl::PCLPointCloud2&, Eigen::Matrix<float, 4, 1, 0, 4, 1>&, Eigen::Quaternion<float, 0>&, int&, int) () from /lib/aarch64-linux-gnu/libpcl_io.so.1.10
#7 0x0000ffff981d7f9c in ?? () from /lib/aarch64-linux-gnu/libstdc++.so.6
#8 0x0000ffff98c51624 in start_thread () from /lib/aarch64-linux-gnu/libpthread.so.0
#9 0x0000ffff9804562c in ?? () from /lib/aarch64-linux-gnu/libc.so.6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the PCLReader::readHeader(std::istream&) and PCLReader::read call chain shown in the stack trace, then reproduce the reported PCD loading scenario. Compare the blocked stream state with the surrounding PCD parsing flow; done means the cause of the thread stop is identified and PCD loading no longer hangs in that scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-vision
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.