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

Backend segmentation fault crash when working with high resolution region, cube and image #1383

Closed
AstroAaron opened this issue Jun 25, 2024 · 3 comments · Fixed by #1386
Closed
Assignees
Labels
bug Something isn't working

Comments

@AstroAaron
Copy link

Describe the bug
Segmentation fault:
/usr/bin/carta: line 20: 223486 Segmentation fault
Having loaded in a cube (size ~2.6GB) and another image (mom0 map), and having a region file loaded in with many points (~>300) crashes the backend immediately when moving the region with the cursor. See the number of points of the region in the image below.

To Reproduce
Steps to reproduce the behavior:

  1. Load in your cube produced with tclean in fits format.
  2. Append the second image (matched in spatial coordinates)
  3. Import region with high number of points (both pixel and sky coordinates will crash CARTA).
  4. Move the region with the cursor.
  5. See error.

Expected behavior
Moving the region should show the stats and spectra for that position.

Screenshots or videos
image

Platform info (please complete the following information):

  • OS: Ubuntu 22.04
  • Browser [e.g. chrome, safari, electron app]: Firefox
  • Browser version [e.g. 22]: 127.0.1 (64-bit)
  • Backend branch [e.g. dev, v3b2 release]: 4.1.0
  • Frontend branch [e.g. dev, v3b2 release]: 4.1.0
@kswang1029
Copy link
Contributor

May I have a copy of all your test images/files for debugging purpose?

@AstroAaron
Copy link
Author

Since the data is unpublished, I cannot share it here directly. Can you send me an email (it's in my profile)? We can discuss this there.

@kswang1029
Copy link
Contributor

kswang1029 commented Jun 25, 2024

Thanks. I can reproduce the issue with a different step. The root cause should be this same. We will schedule a fix.

v4.1 macOS election app crash log (dev has the same issue):

Thread 2 Crashed:
0 carta_backend 0x10229fe78 carta::Region::RemoveHorizontalPolygonPoints(casacore::Vector&, casacore::Vector&) + 520
1 carta_backend 0x10229fdd4 carta::Region::RemoveHorizontalPolygonPoints(casacore::Vector&, casacore::Vector&) + 356
2 carta_backend 0x10229e490 carta::Region::GetAppliedPolygonRegion(int, std::__1::shared_ptrcasacore::CoordinateSystem, casacore::IPosition const&) + 464
3 carta_backend 0x1022a778c carta::Region::GetImageRegion(int, std::__1::shared_ptrcasacore::CoordinateSystem, casacore::IPosition const&, StokesSource const&, bool) + 1084
4 carta_backend 0x1021150e0 carta::Frame::GetImageRegion(int, std::__1::shared_ptrcarta::Region, StokesSource const&, bool) + 168
5 carta_backend 0x1022af4d8 carta::RegionHandler::ApplyRegionToFile(int, int, StokesSource const&, bool) + 596
6 carta_backend 0x1022af91c carta::RegionHandler::ApplyRegionToFile(int, int, AxisRange const&, int, std::__1::shared_ptrcasacore::LCRegion, carta::StokesRegion&) + 216
7 carta_backend 0x1022b9b88 carta::RegionHandler::GetRegionStatsData(int, int, int, std::__1::vector<CARTA::StatsType, std::__1::allocatorCARTA::StatsType> const&, CARTA::RegionStatsData&) + 896
8 carta_backend 0x1022c6798 carta::RegionHandler::FillRegionStatsData(std::__1::function<void (CARTA::RegionStatsData)>, int, int)::$_22::operator()(int, int, std::__1::vector<CARTA::SetStatsRequirements_StatsConfig, std::__1::allocatorCARTA::SetStatsRequirements_StatsConfig>) const + 580
9 carta_backend 0x1022c627c carta::RegionHandler::FillRegionStatsData(std::__1::function<void (CARTA::RegionStatsData)>, int, int) + 356
10 carta_backend 0x1022e10c0 carta::Session::SendRegionStatsData(int, int) + 124
11 carta_backend 0x1022e0c74 carta::Session::OnSetStatsRequirements(CARTA::SetStatsRequirements const&) + 1800
12 carta_backend 0x10230aee4 carta::GeneralMessageTaskCARTA::SetStatsRequirements::execute() + 24
13 carta_backend 0x10233276c void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_deletestd::__1::__thread_struct>, carta::ThreadManager::StartEventHandlingThreads(int)::$_0>>(void*) + 192
14 libsystem_pthread.dylib 0x18b40bfa8 _pthread_start + 148
15 libsystem_pthread.dylib 0x18b406da0 thread_start + 8

@pford do you have time to have a look? If so, let me know and I can share the secret files to you with steps to reproduce the crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants