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 crash related to spatial profiler #1102

Open
kswang1029 opened this issue May 6, 2022 · 3 comments
Open

backend crash related to spatial profiler #1102

kswang1029 opened this issue May 6, 2022 · 3 comments
Labels
critical bug critical bug which is a showstopper for release question Further information is requested

Comments

@kswang1029
Copy link
Contributor

This has no reliable way to reproduce the problem so please just consider this as a record until we find a reliable way. I spotted this when I use v3b2 electron app to

  1. load an image
  2. request a region file list

The macOS Monterey console shows

carta_backend(54323,0x70000588e000) malloc: Heap corruption detected, free list is damaged at 0x600000e481e0
*** Incorrect guard value: 41582587773184
abort() called

Thread 3 Crashed:
0 libsystem_kernel.dylib 0x7ff8133c100e __pthread_kill + 10
1 libsystem_pthread.dylib 0x7ff8133f71ff pthread_kill + 263
2 libsystem_c.dylib 0x7ff813342d24 abort + 123
3 libsystem_malloc.dylib 0x7ff81321c357 malloc_vreport + 551
4 libsystem_malloc.dylib 0x7ff813230307 malloc_zone_error + 178
5 libsystem_malloc.dylib 0x7ff81320f0e8 nanov2_allocate_from_block + 582
6 libsystem_malloc.dylib 0x7ff81320e677 nanov2_allocate + 130
7 libsystem_malloc.dylib 0x7ff81320e5a4 nanov2_malloc + 56
8 libsystem_malloc.dylib 0x7ff81322aabb _malloc_zone_malloc + 125
9 libc++abi.dylib 0x7ff8133b495a operator new(unsigned long) + 26
10 carta_backend 0x10f190e5e Frame::FillSpatialProfileData(PointXy, std::__1::vector<CARTA::SetSpatialRequirements_SpatialConfig, std::__1::allocatorCARTA::SetSpatialRequirements_SpatialConfig >, std::__1::vector<CARTA::SpatialProfileData, std::__1::allocatorCARTA::SpatialProfileData >&) + 6750
11 carta_backend 0x10f18f394 Frame::FillSpatialProfileData(std::__1::vector<CARTA::SpatialProfileData, std::__1::allocatorCARTA::SpatialProfileData >&) + 68
12 carta_backend 0x10f17093c Session::SendSpatialProfileData(int, int) + 1244
13 carta_backend 0x10f1733ff Session::OnSetSpatialRequirements(CARTA::SetSpatialRequirements const&) + 1055
14 carta_backend 0x10f378254 GeneralMessageTaskCARTA::SetSpatialRequirements::execute() + 20
15 carta_backend 0x10f393ad5 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*) + 181
16 libsystem_pthread.dylib 0x7ff8133f74e1 _pthread_start + 125
17 libsystem_pthread.dylib 0x7ff8133f2f6b thread_start + 15

@kswang1029 kswang1029 added question Further information is requested critical bug critical bug which is a showstopper for release labels May 6, 2022
@kswang1029
Copy link
Contributor Author

Got a crash event when I was viewing multiple images with the multi-panel mode and CARTA crashed right after I created a point region.

The macOS crash report says:

Thread 3 Crashed:
0 carta_backend 0x10f9c1be8 carta::RegionHandler::FillPointSpatialProfileData(int, int, std::__1::vector<CARTA::SpatialProfileData, std::__1::allocatorCARTA::SpatialProfileData >&) + 184
1 carta_backend 0x10f9eb8de carta::Session::SendSpatialProfileData(int, int) + 638
2 carta_backend 0x10f9eeb60 carta::Session::OnSetSpatialRequirements(CARTA::SetSpatialRequirements const&) + 928
3 carta_backend 0x10fa10814 carta::GeneralMessageTaskCARTA::SetSpatialRequirements::execute() + 20
4 carta_backend 0x10fa42050 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*) + 176
5 libsystem_pthread.dylib 0x7ff8047e24e1 _pthread_start + 125
6 libsystem_pthread.dylib 0x7ff8047ddf6b thread_start + 15

@veggiesaurus
Copy link
Collaborator

I was able to reproduce this issue when working on the workspaces issue, and had to work around it by making sure spatial profiles weren't enabled until all images were loaded. Mutex issue?

@kswang1029
Copy link
Contributor Author

I was able to reproduce this issue when working on the workspaces issue, and had to work around it by making sure spatial profiles weren't enabled until all images were loaded. Mutex issue?

I believed so but where then🤔 this is another CARTA mystery in our dev history 😆

@kswang1029 kswang1029 added this to CARTA Dec 6, 2023
@kswang1029 kswang1029 moved this to Icebox in CARTA Dec 6, 2023
@github-project-automation github-project-automation bot moved this to New issues/PRs in CARTA - backend Dec 14, 2023
@kswang1029 kswang1029 moved this from New issues/PRs to Icebox in CARTA - backend Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
critical bug critical bug which is a showstopper for release question Further information is requested
Projects
No open projects
Status: Icebox
Status: Icebox
Development

No branches or pull requests

2 participants