1. Segfault (itch) Mac Os Download
  2. Mac Os Catalina

I wanted to share a story of a segmentation fault I helped track down this weekend. I thought the final root cause of the segfault was interesting because of how unrelated it was to the code I was trying to debug.

Version history for Wireshark for Mac OS X (Intel) OS X, and source code are now available. DailyMed will deliver this notification to your desktop, Web browser, or e-mail depending on the RSS Reader you select to use. To view updated drug label links, paste the RSS feed address (URL) shown below into a RSS reader, or use a browser which supports RSS feeds, such as Safari for Mac OS X. How to discontinue the RSS feed. The actual segfault was happening inside of a function called “socketsend” in libsamba-sockets-samba4.so, which was being called by a function in libusbmuxd, which is bundled as part of the obs-ios-camera-source plugin source code and is used for communicating with iOS devices over USB.

ITCH Controllers with internal audio mixing Allen & Heath Xone:DX Novation TWITCH Numark NS7 Numark NS6 Pioneer DDJ-S1 Vestax VCI-300. ITCH Components for outboard audio mixing Denon DJ DN-HC5000 Numark V7. ITCH DJ FX Controllers Numark NSFX Vestax VFX-1. Support for all current OS. Mac OS X 10.5.8 / 10.6 / 10.7 Windows 7 / Vista / XP 32-bit. The compiler that we use to build TBB. For OS X, it's either Clang or Intel Compiler; you can check that with `strings libtbb.dylib grep BUILDCOMPILER`; or just tell me which version of TBB you use and I will find out. The compiler that you use to build the application, i.e.

I’ve been maintaining a Linux fork of obs-ios-camera-source, which is an OBS plugin that allows you to use an iPhone or iPad’s camera and microphone as a video and audio source in OBS. It works in conjunction with the “Camera for OBS Studio” app in the App Store. This kind of thing is useful for online streamers who want to use their phone’s camera instead of buying a separate camera. For those of you who don’t know, OBS is short for Open Broadcaster Software. A lot of streamers use it to handle broadcasting their stream. It allows you to capture audio and video, mix it all together, do all kinds of cool things with it, and then record the final result and/or stream it to sites such as YouTube and Twitch.

Getting this plugin working on Linux wasn’t really complicated, because it was already well-written without much platform-specific code. After all, the existing codebase was already operational on both macOS and Windows. It mostly just required tweaking a few compile/link options to make the code run happily on Linux.

Segfault (itch) Mac Os Download

Anyway, I’m pretty sure a good number of people have been using my Linux port of this plugin without issues. I know it works fine for me when I test with it in Ubuntu 18.04 or 20.04. I’ve helped people on other distros get it working too. I don’t really do any streaming myself — maybe someday though!

On Friday, GitHub user rrondeau reported an issue: after a half a year of the obs-ios-camera-source plugin working without a problem, it suddenly started causing OBS to segfault on his computer (currently running Fedora 33). He provided a stack trace that showed that the segfault was happening because of something initiated by the plugin. Afterward, he used GDB to get a better stack trace that provided more info about the functions being called and the parameters being passed:

The actual segfault was happening inside of a function called “socket_send” in libsamba-sockets-samba4.so, which was being called by a function in libusbmuxd, which is bundled as part of the obs-ios-camera-source plugin source code and is used for communicating with iOS devices over USB. When I first saw this in the stack trace, my mind thought “Huh…that’s weird. Why does libusbmuxd use Samba’s library for its socket code instead of providing its own?” (Samba is an implementation of the Windows file sharing protocol used by pretty much every Linux distribution)

I tested and couldn’t reproduce the issue in Ubuntu. I know basically nothing about Fedora, but I faked my way through grabbing a Fedora 33 virtual machine, installing OBS, and compiling the plugin. I ran into the exact same issue that he was seeing.

Before I had a chance to look deeper and understand what was going on, rrondeau beat me to the correct conclusion: code in Samba’s library was mistakenly being called. libusbmuxd has a function called socket_send, but clearly libsamba-sockets-samba4’s function that is also named socket_send was accidentally being called instead.

Honestly, that’s all we really needed to know. Renaming libusbmuxd’s socket_send function to something else, and updating all references to it to use the new name, fixed the issue. I still wanted to understand why this suddenly became an issue when it had been working fine prior to that. Why were we calling into Samba libraries? Why does an iOS USB multiplexing library even consider talking to a library associated with Windows file sharing?

Not knowing the answer to that question bothered me. I decided to dig deeper and understand exactly what was going on. I started by using ldd, which lists all dynamic libraries used by a program or library:

I truncated the output because it spit out a very long list of libraries. As we can see from ldd’s output, obs-ios-camera-source.so depends on libsamba-sockets-samba4.so. ldd lists all recursive dependencies as well, and I couldn’t find any references to “samba” in the plugin source code, so this was likely an indirect dependency instead. I confirmed this by using readelf to show only the direct dependencies:

At this point I used ldd and readelf to walk through the tree of dependencies and figure out what was actually linking against the Samba libraries. I later learned that I could have installed lddtree (part of the pax-utils package) to do this automatically. Either way, this led me to discover that the Samba libraries were being included through libsmbclient, which was a dependency of libavformat (part of FFmpeg). libavformat is a dependency of libobs.

Mac Os Catalina

Repeating this experiment on Ubuntu showed that libavformat on Ubuntu does not depend on libsmbclient. This explains why I couldn’t reproduce the issue on Ubuntu. So why does Fedora’s (well, RPM Fusion‘s) version of libavformat depend on libsmbclient?

It turns out that it’s a compile-time option for FFmpeg. libavformat contains code for talking with Windows servers using libsmbclient, but it’s an optional thing that you can choose to enable at compile time. Clearly Ubuntu chooses not to enable it, but RPM Fusion does. Actually, I found the exact post on RPM Fusion’s commits mailing list where the patch was added for enabling SMB support in FFmpeg. This patch is what led to the whole issue happening. If Ubuntu’s version of FFmpeg was being built with SMB support, we would have seen this a long time ago. This commit to RPM Fusion was made on December 31, 2020, which explains why rrondeau had only recently begun seeing the problem.

The root cause here is that the obs-ios-camera-source plugin was linking against two libraries that both provided a function named socket_send: libsamba-sockets-samba4 (indirectly through libobs) and libusbmuxd. libusbmuxd was being linked statically, but that doesn’t prevent functions in it from being resolved through dynamic linking rules anyway. So even though libusbmuxd was a static library with its own internal implementation of socket_send, it was using libsamba-sockets-samba4’s implementation instead.

rrondeau and I settled on changing what we had control over: the libusbmuxd source code embedded inside of the plugin’s source code. We went with simply adding a “usbmuxd_” prefix before all of the socket_ functions. There may be a more complex way of forcing it to use its own internal version of socket_send through linker options, but I feel that this is probably the simplest solution. It’s easy to implement, and it gets the job done.

This segfault turned out to be a pretty simple issue to solve and diagnose. Is it really worthy of a blog post? Maybe, maybe not. I could definitely foresee someone else running into this issue with another combination of libraries. socket_create, socket_close, socket_send, etc. are such generic names that it may happen again. This is a great opportunity to remind everyone: don’t use generic function names like this in your shared libraries, at least not in your exported symbols! You could easily run into a situation similar to this one. In my opinion, prefixes are definitely a good idea for your library’s exported symbols. In this case, both libusbmuxd and Samba were breaking that guideline.

This can be tricky because dynamic libraries on Linux export all symbols by default unless you specify otherwise. This is backwards from how Windows works with DLLs. Windows DLLs require you to specify which functions are being exported. I actually like that approach better! Here’s an interesting reference on how to customize the visibility of your Linux dynamic library’s symbols.

Segfault (itch) Mac OS

libusbmuxd already fixed this on their end quite a while ago — they now only export functions intended to be public, which have a usbmuxd_ or libusbmuxd_ prefix. I think the version included with the plugin’s source code is quite a bit older. For fun, I tried applying the visibility fixes from the linked patch to the plugin’s embedded libusbmuxd source code. The patches don’t apply cleanly because the embedded libusbmuxd code is actually built using CMake, so I have to add the compiler flags to CMakeLists.txt. After doing that, it does indeed cause libusbmuxd’s internal socket_send function to be called instead, and thus fixes the segfault.

What do you think? Would it make sense to try to convince the Samba project to rename their exported socket functions, or would I be barking up the wrong tree? I suspect that Samba’s socket library is actually intentionally exporting these functions so that other Samba libraries can call the socket functions. Would renaming Samba’s exported socket functions to give them less generic names cause a ton of incompatibilities given how long those function names have existed? Is it too late at this point? Am I wrong to think that Samba’s exported socket functions should have a “samba_” prefix or something like that?

A downloadable tool for Windows, macOS, and Linux

A lightweight music creation software
super easy to use, instant and fun

You don't have musical background ? You don't want to engage in years of music theory training ?
Create complex music compositions simply by drawing on the screen.
1BITDRAGON is the most intuitive software for music creation!

Make your own track in just minutes



Audio Demos


Features

  • Simplified interface, easy to understand and use
  • 175 high quality handcrafted instruments
  • 150 high quality handcrafted drum sounds
  • 66 accompaniment patterns, 396 variations
  • 24 arpeggiator presets
  • 24 different scales
  • Euclidean Rhythm Generator that generates natural-sounding rhythmical patterns
  • Live Mode that gives you full control of your live performances while recording a WAV file
  • Internal 64-bit audio processing engine with various built-in FX
  • High-pass and low-pass filters
  • MIDI export
  • WAV recording and export (44.1 kHz, 16-Bit, stereo .wav files)


FAQ

Q. How can I learn 1BITDRAGON?
R. Read the User's Guide. Watch the videos.

Q Can I distribute songs made with 1BITDRAGON?
R. Yes, you can distribute, sell or copyright any production rendered from 1BITDRAGON.

Q. Do I get updates?
R. Yes, you do. With your purchase you will be able to download updates from itch.io and you do not have to repay. When you buy something on itch.io you don’t need an account. When purchasing without an account your purchase is tied to your email address. You just have to redownload 1BITDRAGON. If you ever lose the link, you can request it to be resent to your email.

Q. Ahhh! I found a bug!
R. Keep calm and report the bug here.


System Requirements

Windows

  • OS: Windows 7 (SP1+) and Windows 10
  • Processor: x86, x64 architecture with SSE2 instruction set support
  • Memory: 500 MB RAM
  • Graphics: DX10, DX11, DX12 capable
  • Storage: 200 MB available space
  • Additional Notes: Hardware vendor officially supported drivers

Mac OS X

  • OS: Sierra 10.12+
  • Processor: x64 architecture with SSE2
  • Memory: 500 MB RAM
  • Graphics: Metal capable Intel or AMD GPUs
  • Storage: 200 MB available space
  • Additional Notes: Apple officially supported drivers

Linux

  • OS: Ubuntu 16.04 and Ubuntu 18.04
  • Processor: x64 architecture with SSE2 instruction set support
  • Memory: 500 MB RAM
  • Graphics: OpenGL 3.2+, Vulkan capable, Nvidia using Nvidia official proprietary graphics driver or AMD GPUs using AMD Mesa graphics driver
  • Storage: 200 MB available space
  • Additional Notes: Gnome desktop environment running on top of X11 windowing system


Reviews




Testimonials









StatusReleased
CategoryTool
PlatformsWindows, macOS, Linux
Rating
Author1BITDRAGON
Made withUnity
Tagsaudio, chiptune, drum-machine, Instrument, Music, Music Production, Pixel Art, sequencer, Soundtoy, tracker
MentionsAnnouncing the Game Making itch.io Selec...

Purchase

In order to download this tool you must purchase it at or above the minimum price of $20 USD. You will get access to the following files:

Community

2d
12d
13d
13d
19d