Closed Bug 152728 Opened 23 years ago Closed 22 years ago

XpuWaitForPrintFileChild() needs to call XFlush() before waiting for the consumer child

Categories

(Core Graveyard :: Printing: Xprint, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.0.2

People

(Reporter: roland.mainz, Assigned: roland.mainz)

Details

Attachments

(1 file)

XpuWaitForPrintFileChild() needs to call XFlush() before waiting for the consumer child, otherwise it will may cause a deadlock between consumer child and main process/thread. The problem is burried deeply in the Xlib internals, the deadlock occurs because XpuWaitForPrintFileChild() waits for a child process (or thread) while the child is still expecting data which will never appear because the registered hooks have to be called (via any Xlib event) function first. But the parent is waiting for the child and does not do any event processing at that moment --> deadlock. Mozilla's Xprint module seems to be _not_ affected by this problem since we wait for the XpExtension events (which triggers a |XFlush()| automagically when there are no events queued yet (maybe we hit this issue on large multi-CPU-machines - but it is still very unlikely)).
Suffering is all mine...
Assignee: katakai → Roland.Mainz
QA Contact: Roland.Mainz → katakai
Status: NEW → ASSIGNED
Keywords: patch, review
Requesting r=/sr= ...
Target Milestone: --- → mozilla1.0.1
Comment on attachment 88230 [details] [diff] [review] Patch for 2002-06-13-08-trunk r=calvin.liu@sun.com
Attachment #88230 - Flags: review+
Comment on attachment 88230 [details] [diff] [review] Patch for 2002-06-13-08-trunk sr=bzbarsky
Attachment #88230 - Flags: superreview+
Target Milestone: mozilla1.0.1 → mozilla1.0.2
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Filed bug http://xprint.mozdev.org/bugs/show_bug.cgi?id=2146 ("XpuWaitForPrintFileChild() needs to call XFlush() before waiting for the consumer child") to check this patch "in" into the XprintUtil copy in xprint.mozdev.org's source tree...
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: