You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: libobs/util: os_process_pipe_write reports discarded data as written after EPIPE (POSIX) #264
os_process_pipe_write in libobs/util/pipe-posix.c keeps calling fwrite until it returns 0. After a failed write, glibc's fwrite copies data into the stdio buffer, fails the flush, discards the buffer and still returns the copied count, 4096 bytes at a time. So once the child's stdin is gone, the function returns the full length, while only the kernel's first partial write (at most one pipe's worth, 64 KiB) was accepted, and nobody read it.
Impact: the frontend blocks SIGPIPE, so writes to a dead child fail with EPIPE instead of killing OBS. plugins/obs-ffmpeg/obs-ffmpeg-mux.c writes every recorded packet to ffmpeg-mux through this function and only checks ret != size. If ffmpeg-mux dies mid-recording, OBS keeps "recording" and discards everything, with no failure signalled until stop.
Found while investigating #192; details and the syscall trace are on #192. Windows (pipe-windows.c) does one WriteFile per call and is not affected; neither is the Rust port.
Activity