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

Totally broken on macOS 13+ because of new JSON based ips format change the line regex #43

Open
dreampiggy opened this issue Mar 8, 2024 · 7 comments · May be fixed by #44
Open

Totally broken on macOS 13+ because of new JSON based ips format change the line regex #43

dreampiggy opened this issue Mar 8, 2024 · 7 comments · May be fixed by #44

Comments

@dreampiggy
Copy link

dreampiggy commented Mar 8, 2024

For ips:

Thread 0::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	       0x19df63750 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x19dfa0574 _pthread_cond_wait + 1232
2   libc++.1.dylib                	       0x19dec8ef0 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   bdlli-bind                    	       0x10507c1ac llvm::ThreadPool::wait() + 60
4   bdlli-bind                    	       0x104f48f04 main + 4028
5   dyld                          	       0x19dc47f28 start + 2236

This regex parsing the line into the wrong status:

  • system symbol (the __psynch_cvwait)

image

  • app symbol (the llvm::ThreadPool::wait())

image

This code does not match what it actually get. The component[0] is not target at all

I think this is a bug similiar to #35

@dreampiggy dreampiggy changed the title Totally brokwn on macOS 13+ because of new JSON based ips format change the regex Totally broken on macOS 13+ because of new JSON based ips format change the line regex Mar 8, 2024
@dreampiggy
Copy link
Author

Is this App still in maintiness ? 🥹

@inket
Copy link
Owner

inket commented Mar 8, 2024

Yes it's still maintained. I'm working on the next update. Thanks for reporting this bug. Reporting bugs is very important since I cannot find all issues by myself.

@dreampiggy
Copy link
Author

dreampiggy commented Mar 8, 2024

Actually, for Mac app above.

I need the source code line number (which can be get from atos using manual address)

The symbol itself, it's already demangled from Mac's raw crash log🤔️

I think this is different from iOS App in the project demo like this:

Thread 0 name:   Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libswiftCore.dylib            	       0x18a98520c _assertionFailure(_:_:file:line:flags:) + 312
1   libswiftCore.dylib            	       0x18a98520c _assertionFailure(_:_:file:line:flags:) + 312
2   iOSCrashingTest               	       0x1022364bc 0x102230000 + 25788
3   iOSCrashingTest               	       0x1022361cc 0x102230000 + 25036
4   UIKitCore                     	       0x192fb1330 -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 84

@dreampiggy
Copy link
Author

Compared these two cases:

  • Contains both address + loaddress (no symbol name)
2   iOSCrashingTest               	       0x1022364bc 0x102230000 + 25788
  • Contains only address + symbol name
3   bdlli-bind                    	       0x10507c1ac llvm::ThreadPool::wait() + 60

@dreampiggy
Copy link
Author

dreampiggy commented Mar 8, 2024

I can update the regex to make it works on my local test example, and submit a PR if you want

The Mac format load address get be obtained from Binary Images: by parsing

I can show my example here:

Binary Images:
       0x104f44000 -        0x105257fff bdlli-bind (*) <18e247a7-aa91-3530-bb56-8be40b25fcbb> /Users/USER/*/bdlli-bind

@dreampiggy
Copy link
Author

dreampiggy commented Mar 8, 2024

The symbolicate report on the Mac case does not preserve the Source Code line as well.
Which atos shows:

xcrun atos -o bdlli-bind.dSYM -l 0x104f44000 0x10507c1ac
llvm::ThreadPool::wait() (in bdlli-bind) (ThreadPool.cpp:147)

I actually always NEED this ThreadPool.cpp:147 information

@dreampiggy
Copy link
Author

A basic changes can make this App works for my case (contains symbol but without source code filename/line number)

Thread 0::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	       0x19df63750 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x19dfa0574 _pthread_cond_wait + 1232
2   libc++.1.dylib                	       0x19dec8ef0 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   bdlli-bind                    	       0x10507c1ac llvm::ThreadPool::wait() + 60
4   bdlli-bind                    	       0x104f48f04 main + 4028
5   dyld                          	       0x19dc47f28 start + 2236

->

Thread 0::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	       0x19df63750 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x19dfa0574 _pthread_cond_wait + 1232
2   libc++.1.dylib                	       0x19dec8ef0 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   bdlli-bind                    	       0x10507c1ac llvm::ThreadPool::wait() + 60 (ThreadPool.cpp:147)
4   bdlli-bind                    	       0x104f48f04 main + 4028 (bdlli-bind.cpp:259)
5   dyld                          	       0x19dc47f28 start + 2236

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants