Bug Report Mac: 60 GB, and locking up the system

keybounce

Member
I am attempting to use Mac OBS to stream Minecraft to twitch.

The problem: I'm getting "The system is out of swap space" messages, and the system is locking up, waiting for me to kill something.

Triggering a sysdiagnose gets a lot of diagnostics, including a process list showing OBS using 60 GB of data.

OBS log:
Code:
20:06:04: OBS 0.6.4 (mac)
20:06:05: CPU Name: Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
20:06:05: CPU Speed: 2500MHz
20:06:05: Physical Cores: 4, Logical Cores: 8
20:06:05: Physical Memory: 16384MB Total
20:06:05: OS Name: Mac OS X (NSMACHOperatingSystem)
20:06:05: OS Version: Version 10.9.5 (Build 13F34)
20:06:05: Kernel Version: 13.4.0
20:06:05: audio settings reset:
   samples per sec: 48000
   speakers:  2
   buffering (ms):  1000

20:06:05: convert_sampler_info: 1 <= max_anisotropy <= 16 violated, selected: 0, set: 1
20:06:05: convert_sampler_info: 1 <= max_anisotropy <= 16 violated, selected: 0, set: 1
20:06:05: convert_sampler_info: 1 <= max_anisotropy <= 16 violated, selected: 0, set: 1
20:06:05: convert_sampler_info: 1 <= max_anisotropy <= 16 violated, selected: 0, set: 1
20:06:05: convert_sampler_info: 1 <= max_anisotropy <= 16 violated, selected: 0, set: 1
20:06:05: convert_sampler_info: 1 <= max_anisotropy <= 16 violated, selected: 0, set: 1
20:06:05: convert_sampler_info: 1 <= max_anisotropy <= 16 violated, selected: 0, set: 1
20:06:05: convert_sampler_info: 1 <= max_anisotropy <= 16 violated, selected: 0, set: 1
20:06:05: convert_sampler_info: 1 <= max_anisotropy <= 16 violated, selected: 0, set: 1
20:06:05: convert_sampler_info: 1 <= max_anisotropy <= 16 violated, selected: 0, set: 1
20:06:05: video settings reset:
   base resolution:  1708x960
   output resolution: 852x480
   fps:  10/1
20:06:05: couldn't intialize font code page conversion:  'x-mac-hebrew' to 'utf-8': errno = 22
20:06:05: couldn't intialize font code page conversion:  'x-mac-hebrew' to 'utf-8': errno = 22
20:06:05: couldn't intialize font code page conversion:  'x-mac-hebrew' to 'utf-8': errno = 22
20:06:05: couldn't intialize font code page conversion:  'x-mac-hebrew' to 'utf-8': errno = 22
20:06:05: couldn't intialize font code page conversion:  'x-mac-hebrew' to 'utf-8': errno = 22
20:06:06: couldn't intialize font code page conversion:  'x-mac-hebrew' to 'utf-8': errno = 22
20:06:06: couldn't intialize font code page conversion:  'x-mac-hebrew' to 'utf-8': errno = 22
20:06:06: couldn't intialize font code page conversion:  'x-mac-hebrew' to 'utf-8': errno = 22
20:06:06: couldn't intialize font code page conversion:  'x-mac-hebrew' to 'utf-8': errno = 22
20:06:06: couldn't intialize font code page conversion:  'x-mac-hebrew' to 'utf-8': errno = 22
20:06:06: couldn't intialize font code page conversion:  'x-mac-hebrew' to 'utf-8': errno = 22
20:06:06: output 'default_file_output' (flv_output) created
20:06:06: output 'default_stream' (rtmp_output) created
20:06:06: encoder 'default_h264' (obs_x264) created
20:06:06: encoder 'default_aac' (ffmpeg_aac) created
20:06:06: service 'default_service' (rtmp_common) created
20:06:06: coreaudio: device 'USB Ear-Microphone' initialized
20:06:06: source 'Mic/Aux' (coreaudio_input_capture) created
20:06:06: source 'Scene' (scene) created
20:06:06: source 'Minecraft window' (display_capture) created
20:06:06: source 'Scene 1' (scene) created
20:06:06: Camtwist: No device selected
20:06:06: source 'Camtwist' (av_capture_input) created
20:06:06: source 'Window' (scene) created
20:06:06: source 'Minecraft' (window_capture) created
20:06:06: convert_sampler_info: 1 <= max_anisotropy <= 16 violated, selected: 0, set: 1
20:06:06: convert_sampler_info: 1 <= max_anisotropy <= 16 violated, selected: 0, set: 1
20:06:06: source 'Broadcast title' (text_ft2_source) created
20:06:06: convert_sampler_info: 1 <= max_anisotropy <= 16 violated, selected: 0, set: 1
20:06:06: convert_sampler_info: 1 <= max_anisotropy <= 16 violated, selected: 0, set: 1
20:06:07: source 'GC Log' (text_ft2_source) created
20:06:07: source 'Scene with no camera or log' (scene) created
20:06:07: coreaudio: device 'YC-SoundRecord' initialized
20:06:07: source 'Mic/Aux 2' (coreaudio_input_capture) created
20:08:23: [x264 encoder: 'default_h264'] preset: veryfast
20:08:23: [x264 encoder: 'default_h264'] settings:
   bitrate:  1500
   buffer size: 1500
   fps_num:  10
   fps_den:  1
   width:  852
   height:  480
   keyint:  5
   cbr:  on
20:08:23: [x264 encoder: 'default_h264'] custom settings: keyint=5
20:08:24: Using ffmpeg "aac" aac encoder
20:08:24: FFmpeg AAC: bitrate: 128, channels: 2
20:08:24: [rtmp stream: 'default_stream'] Connecting to RTMP URL rtmp://live-mia.twitch.tv/app...
20:08:24: [rtmp stream: 'default_stream'] Connection to rtmp://live-mia.twitch.tv/app successful
21:09:20: [rtmp stream: 'default_stream'] User stopped the stream
21:09:20: Output 'default_stream': stopping
21:09:20: Output 'default_stream': Total frames: 36567
21:09:20: Output 'default_stream': Number of skipped frames: 0 (0%)
21:09:20: Output 'default_stream': Number of dropped frames: 36 (0.0984494%)
21:42:49: [x264 encoder: 'default_h264'] settings:
   bitrate:  1500
   buffer size: 1500
   fps_num:  10
   fps_den:  1
   width:  852
   height:  480
   keyint:  5
   cbr:  on
21:42:49: [x264 encoder: 'default_h264'] custom settings: keyint=5
21:42:49: [x264 encoder: 'default_h264'] settings:
   bitrate:  1500
   buffer size: 1500
   fps_num:  10
   fps_den:  1
   width:  852
   height:  480
   keyint:  5
   cbr:  on
21:42:49: [x264 encoder: 'default_h264'] custom settings: keyint=5
21:42:49: [x264 encoder: 'default_h264'] preset: veryfast
21:42:49: [x264 encoder: 'default_h264'] settings:
   bitrate:  1500
   buffer size: 1500
   fps_num:  10
   fps_den:  1
   width:  852
   height:  480
   keyint:  5
   cbr:  on
21:42:49: [x264 encoder: 'default_h264'] custom settings: keyint=5
21:42:49: Using ffmpeg "aac" aac encoder
21:42:49: FFmpeg AAC: bitrate: 128, channels: 2
21:42:49: [rtmp stream: 'default_stream'] Connecting to RTMP URL rtmp://live-mia.twitch.tv/app...
21:42:50: [rtmp stream: 'default_stream'] Connection to rtmp://live-mia.twitch.tv/app successful
22:12:34: Minecraft window: Dropped 9675 frames
22:12:34: WriteN, RTMP send error 32 (394 bytes)
22:12:34: WriteN, RTMP send error 32 (79 bytes)
22:12:34: WriteN, RTMP send error 9 (42 bytes)
22:12:34: [rtmp stream: 'default_stream'] Disconnected from rtmp://live-mia.twitch.tv/app
22:12:34: Output 'default_stream':  Reconnecting in 0 seconds..
22:12:34: [x264 encoder: 'default_h264'] settings:
   bitrate:  1500
   buffer size: 1500
   fps_num:  10
   fps_den:  1
   width:  852
   height:  480
   keyint:  5
   cbr:  on
22:12:34: [x264 encoder: 'default_h264'] custom settings: keyint=5
22:12:34: [x264 encoder: 'default_h264'] preset: veryfast
22:12:34: [x264 encoder: 'default_h264'] settings:
   bitrate:  1500
   buffer size: 1500
   fps_num:  10
   fps_den:  1
   width:  852
   height:  480
   keyint:  5
   cbr:  on
22:12:34: [x264 encoder: 'default_h264'] custom settings: keyint=5
22:12:34: Using ffmpeg "aac" aac encoder
22:12:34: FFmpeg AAC: bitrate: 128, channels: 2
22:12:34: [rtmp stream: 'default_stream'] Connecting to RTMP URL rtmp://live-mia.twitch.tv/app...
22:12:35: [rtmp stream: 'default_stream'] Connection to rtmp://live-mia.twitch.tv/app successful
22:13:13: Minecraft window: Dropped 445 frames
22:13:13: Minecraft window: Dropped 398 frames
22:13:42: WriteN, RTMP send error 32 (4097 bytes)
22:13:42: WriteN, RTMP send error 32 (79 bytes)
22:13:42: WriteN, RTMP send error 9 (42 bytes)
22:13:42: [rtmp stream: 'default_stream'] Disconnected from rtmp://live-mia.twitch.tv/app

Lockup happened at about 10:09 (22:09 in the above log), or after about 30 minutes of streaming, right before frames are being dropped.

Top log from the sysdiagnostic: https://gist.github.com/keybounce/0ea8376e3b558a86ecee

EDIT: Hmm, 852x480? Should have been 854x480, that's a typo. Might even explain the slowness?
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
It says you're using window capture, display capture, and capturing camtwist via the device capture. I want you to remove one, test, and see if the problem stops, then repeat with each of the other sources. Let me know which one causes it to stop.

Also, If you're capturing minecraft, you should probably be using syphon, just syphon instead of two other simultaneous captures.

I haven't heard any similar reports so I'm not sure what's going on but I'd like to get to the source of the problem, which is probably one of the sources.
 

keybounce

Member
Hmm, why did this thread not get marked for email notifications?

I had several sources defined, yes -- camtwist, window capture, and display capture -- but I was only using one of them. It never occurred to me that having multiple sources defined but not currently in use was a bad thing -- I did not see a way to get my input setup saved, and having to constantly re-define what I am doing is just asking for inconsistency and errors.

Using just syphon is probably not going to do what I want, for the same reason that I moved away from window capture to display capture -- sometimes I want to show a different window, especially if I am playing with config settings / restarting minecraft, or looking at log files after a problem.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Well it's partly our fault at the moment -- we have code that can optimize for inactive sources but don't use it yet. We'll have to add it to the sources at some point.

I was asking you to do that just to see if any particular source was the problem though.

If you could find that out, or if you could see if it happens regardless of what you do, that would be really appreciated.
 

keybounce

Member
Alright, testing now: camtwist removed, a window capture, and a display capture

... OK, no runaway memory consumption. No swapspace usage, actually.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
We have an update scheduled that should fix the issue, but our build server is currently down, making us unable to properly make a new release. I'm hoping it'll be up in the next few days or so but it's been driving me somewhat crazy right now because of the amount of changes that we have waiting for users to get.
 

keybounce

Member
Ok, this is NOT resolved.

I don't know what was going on. I did NOT see large memory consumption from OBS looking at activity monitor, but the memory usage by the system was still large, and went away when I quit OBS.

System log files show processes being sent kill -9's at 22:54:55, and the low disk space kernel log message at 23:02:55. I had to actually quit OBS to get the memory used by the system back to normal.

Restarting OBS, and re-streaming, I saw the memory usage of the system creeping slowly up, yet no significant change that I could see attributed to any process in Activity Monitor.

The two log files:
https://gist.github.com/anonymous/9d0954be20b8ac442371
https://gist.github.com/anonymous/fd7076fb1c37d59436a1

Uploading to Twitch, Veryfast, 20 fps, keyint=20 (one keyframe per second).
 
Top