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

Crash on MacOS Catalina #337

Open
miconda opened this issue Nov 9, 2020 · 2 comments
Open

Crash on MacOS Catalina #337

miconda opened this issue Nov 9, 2020 · 2 comments

Comments

@miconda
Copy link
Contributor

miconda commented Nov 9, 2020

The latest sngrep from git is crashing on macos catalina (10.15.7) while trying to load a pcap file sent to kamailio mailing list:

The sngrep 1.4.2 crashed first, I fetched the latest git version, compiled following the docs:

With configure flags:

./configure --with-pcre --with-openssl --enable-unicode --enable-ipv6 --enable-eep

I haven't done system wide installation, it was run from user folder, as was done before. It works with other pcap files.

The bt from lldb is next:

(lldb) bt
* thread #1, stop reason = signal SIGSTOP
  * frame #0: 0x0000000109499555 dyld`ImageLoaderMachO::libPath(unsigned int) const + 45
    frame #1: 0x000000010949f499 dyld`ImageLoaderMachOCompressed::findShallowExportedSymbol(char const*, ImageLoader const**) const + 265
    frame #2: 0x0000000109499075 dyld`ImageLoaderMachO::findExportedSymbol(char const*, bool, char const*, ImageLoader const**) const + 37
    frame #3: 0x00000001094990ff dyld`ImageLoaderMachO::findExportedSymbol(char const*, bool, char const*, ImageLoader const**) const + 175
    frame #4: 0x00000001094919dd dyld`ImageLoader::findExportedSymbolAddress(ImageLoader::LinkContext const&, char const*, ImageLoader const*, int, bool, ImageLoader const**, unsigned long*) const + 47
    frame #5: 0x000000010949fe99 dyld`ImageLoaderMachOCompressed::resolveTwolevel(ImageLoader::LinkContext const&, char const*, ImageLoader const*, ImageLoader const*, unsigned int, bool, bool, ImageLoader const**) + 89
    frame #6: 0x00000001094a0107 dyld`ImageLoaderMachOCompressed::resolve(ImageLoader::LinkContext const&, char const*, unsigned char, long, ImageLoader const**, ImageLoaderMachOCompressed::LastLookup*, bool) + 263
    frame #7: 0x00000001094a347a dyld`ImageLoaderMachOCompressed::doBindFastLazySymbol(unsigned int, ImageLoader::LinkContext const&, void (*)(), void (*)()) + 250
    frame #8: 0x0000000109483b8d dyld`dyld::fastBindLazySymbol(ImageLoader**, unsigned long) + 86
    frame #9: 0x00007fff706da692 libdyld.dylib`dyld_stub_binder + 282
    frame #10: 0x0000000106fad720 sngrep
    frame #11: 0x0000000106f933e0 sngrep`call_list_create + 720
    frame #12: 0x0000000106f903c7 sngrep`ui_create + 55
    frame #13: 0x0000000106f9114b sngrep`ui_create_panel + 27
    frame #14: 0x0000000106f8a2ee sngrep`main + 3006
    frame #15: 0x00007fff706dbcc9 libdyld.dylib`start + 1

It can be a MacOS issue, because I did a quick test using Ubuntu 20.04 (lts) with multipass on the same MacOS system and the version in Ubuntu (1.4.6) loads the pcap without crashing.

The pcap has quite large sip packets sent over tcp, but I have seen larger sip packets (webrtc) in the past with sngrep.

@Kaian
Copy link
Member

Kaian commented Nov 10, 2020

Hi @miconda

I can't recognize the backtrace information. It looks like a crash while loading a shared library, but class ImageLoaderMachO is MacOS specific, so I can't tell for sure. Sadly I have no MacOS to test the code right now, so It's hard to provider further information.

I will leave this issue opened in case other users suffer the same problem or some solution arises.

Thanks a lot for reporting!

@miconda
Copy link
Contributor Author

miconda commented Nov 10, 2020

The backtrace is taken with lldb (https://lldb.llvm.org/), because using gdb is no longer straightforward on macos (https://dev.to/jasonelwood/setup-gdb-on-macos-in-2020-489k).

I reported it mainly from the perspective that it crashes with this specific pcap, but not with others. So I was somehow assuming that it can have a relation with many tcp frames belonging to same sip message.

Otherwise, not something really critical. Maybe others will face something similar and then the case can be narrowed down.

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

No branches or pull requests

2 participants