Summary: | Race condition in cairo-trace | ||
---|---|---|---|
Product: | cairo | Reporter: | Seongwon Cho <seongwon1.cho> |
Component: | general | Assignee: | Carl Worth <cworth> |
Status: | RESOLVED MOVED | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | normal | ||
Priority: | medium | ||
Version: | 1.12.2 | ||
Hardware: | All | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Seongwon Cho
2012-07-30 04:31:12 UTC
You can see the reason why it has to be like that? The trace file is a sequential stream and can't handle multiple processes simultaneously. To handle such tracing, the idea was to specify a directory and for each trace to be written to a separate file (in CAIRO_TRACE_OUTDIR). However, looks like that's broken if the child is spawned after the logfile is open. Can you please try: diff --git a/util/cairo-trace/trace.c b/util/cairo-trace/trace.c index da7d2f0..f7945e7 100644 --- a/util/cairo-trace/trace.c +++ b/util/cairo-trace/trace.c @@ -832,7 +832,7 @@ _init_logfile (void) filename, name, getpid()); filename = buf; - + } else { setenv ("CAIRO_TRACE_FD", "-1", 1); } Hi, Chris If I block setenv() I can get trace from both Parent and Child process. Actually I already got trace by workaround but I just want to let you know the problem. Thank you. In general, that will lead to an unreplayable trace. If Parent and Child don't share any resources (context, surface, pattern etc) each other Do I still get unreplayable trace ? You will get a broken trace if the parent and child ever call into cairo concurrently - that is if A sets up some state then B performs a fill assuming its own earlier state was still valid. -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/227. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.