[Bug 674930] New: Logging to a file causes loss of logs when forking

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri Apr 27 02:46:16 PDT 2012


https://bugzilla.gnome.org/show_bug.cgi?id=674930
  GStreamer | gstreamer (core) | 0.10.x

           Summary: Logging to a file causes loss of logs when forking
    Classification: Platform
           Product: GStreamer
           Version: 0.10.x
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: vincent.penquerch at collabora.co.uk
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


GST_DEBUG=5 GST_DEBUG_FILE=gst.log gst-inspect -a

gst.log will be corrupt. This happens when more than one process spawned by the
gst using program tries to open the log file for writing.

I guess it could be solved by having a semaphore protect writes to the file,
but that might cause a large slowdown (not tried).

Preventing all but the first log prevents the corruption, but also loses the
logs from those processes.

Another way could be to let subsequent processes open a different file, maybe
named with their PID as a suffix (maybe using % format string in the
GST_DEBUG_FILE variable, such as "gst.%p.log", and replacing %p by PID. Could
do that for date/time too).

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list