From owner-freebsd-multimedia Mon Jun 15 20:29:32 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA21178 for freebsd-multimedia-outgoing; Mon, 15 Jun 1998 20:29:32 -0700 (PDT) (envelope-from owner-freebsd-multimedia@FreeBSD.ORG) Received: from whqvax.picker.com (whqvax.picker.com [144.54.1.1]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id UAA21172 for ; Mon, 15 Jun 1998 20:29:30 -0700 (PDT) (envelope-from rhh@ct.picker.com) Received: from ct.picker.com by whqvax.picker.com with SMTP; Mon, 15 Jun 1998 23:28:14 -0400 (EDT) Received: from elmer.ct.picker.com by ct.picker.com (4.1/SMI-4.1) id AA23006; Mon, 15 Jun 98 23:28:13 EDT Received: by elmer.ct.picker.com (SMI-8.6/SMI-SVR4) id XAA20585; Mon, 15 Jun 1998 23:27:57 -0400 Message-Id: <19980615232757.A20479@ct.picker.com> Date: Mon, 15 Jun 1998 23:27:57 -0400 From: Randall Hopper To: brian@worldcontrol.com Cc: multimedia@FreeBSD.ORG Subject: Re: Fxtv 0.47 core dump - patch Mail-Followup-To: brian@worldcontrol.com, multimedia@freebsd.org References: <19980606125810.A7887@top.worldcontrol.com> <19980606184150.A5041@ct.picker.com> <19980614135044.A3024@top.worldcontrol.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=82I3+IH0IqGh5yIs X-Mailer: Mutt 0.91.1i In-Reply-To: <19980614135044.A3024@top.worldcontrol.com>; from brian@worldcontrol.com on Sun, Jun 14, 1998 at 01:50:44PM -0700 Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --82I3+IH0IqGh5yIs Content-Type: text/plain; charset=us-ascii brian@worldcontrol.com: |grabbed. |gmake'd. |run'ed. |bls2# ./fxtv ... Wow, this opened up a whole can of worms. Thanks for the stack trace! A patch is attached. Here are the worms: 1) Based on XFree86(1), the VidMode extension is by default enabled for local clients and disabled for remote clients (can be overriden with -disableVidMode and -allowNonLocalXvidtune). 2) XFree86 (all vers. AFAIK) has a bug where it advertises the VidMode extension being available -- even when its disabled to the client. This is the cause of the first X error on your stack. 3) When an X Error occurs, Fxtv 0.47 will end up making X calls in the X error handler (via exit->atexit calls), which is problem. This is very likely the reason for the double-fault (IOError on the stack) and core dump. 4) At the time the VidMode error occurs, Fxtv may have a DGA mouse grab open on the pointer (e.g. video mode switch for full-screen zoom), and XFree86 has another bug where it doesn't release the grab when the client owning the grab dies. This hangs the mouse pointer and makes it basically useless. So given this mess, here's what the attached patch does: 1) Just flat disables VidMode when the server is remote. This covers the default case where the server wasn't invoked with -allowNonLocalXvidtune and should fix your wagon. 2) Prevents fxtv from making X calls when its coming down due to an XError. Should prevent any double-faults and associated core dumps in the future. Note that you can still hang yourself if you run your X server -disableVidMode and then try to do a full-screen zoom. Fxtv has no clue that VidMode "really" isn't available (XFree86 lies to it, and I'm not going to go trapping XError handlers to find out), so it tries to switch modes. This fails with an XError and fxtv bails out. The kicker is fxtv has a DGA pointer grab active at that point, the server doesn't release it (the other XFree86 bug :-) so your mouse is useless and you have to kill the X server and restart it to get it back. I doubt anyone would normally see this though because most folks don't run -disableVidMode. When XFree86 provides a way to detect whether VidMode is really available, we can turn remote full-screen zooms back on. Hopefully they'll also fix the DGA-pointer-grab-not-released bug as well. I filed both of these with the XFree86 team a few mintes ago. Thanks again for the report, and let me know how it goes! Randall brian@worldcontrol.com: |On %M 0, Randall Hopper wrote: |> If you have time, I'd be interested in a stack trace. To generate one, |> grab: |> http://multiverse.com/~rhh/fxtv/fxtv-0.47.tgz | |grabbed. | |> Decompress, and run: |> |> gmake DEBUG=YES | |gmake'd. | |> Then run the generated "fxtv" binary. | |run'ed. | | |bls2# ./fxtv |Direct Video not supported by visual...using XImages |X Error of failed request: XF86VidModeExtensionDisabled | Major opcode of failed request: 142 (XFree86-VidModeExtension) | Minor opcode of failed request: 12 (XF86VidModeSetViewPort) | Serial number of failed request: 1568 | Current serial number in output stream: 1569 |XIO: fatal IO error 0 (Undefined error: 0) on X server "192.168.0.2:0.0" | after 1570 requests (1569 known processed) with 6 events remaining. |Failed to find current video mode in server mode list |Failed to find current video mode in server mode list |zsh: segmentation fault (core dumped) ./fxtv | |> When it dumps, run |> gdb fxtv fxtv.core |> (gdb) where | |It core dump'ed without me having to save any PPM pictures and exit. I |had just pressed the size change button a few times and poked around in |the menus. | |(gdb) where |#0 0x1ca33 in TVSCREENGetCurVidModeGeometry (s=0x683b0, width=0xefbfd33e, | height=0xefbfd33c) at tvscreen.c:216 |#1 0x3da0 in TVANNOTGetModeGeom (width=0xefbfd33e, height=0xefbfd33c) | at annot.c:286 |#2 0x3e3f in TVANNOTStationPropSetDrawableSize (a=0x68570, p=0x6859c, | display=0x75800, width=324, height=242) at annot.c:308 |#3 0x460c in TVANNOTSetDrawableSize (a=0x68570, width=324, height=242) | at annot.c:510 |#4 0x1f8bf in TVSCREENSetVideoWinGeom (videowin_geom={x = 107, y = 113, | w = 324, h = 242}) at tvscreen.c:1899 |#5 0x1ffc0 in TVSCREENSetZoomState (zoom_on=0, full_screen=0) | at tvscreen.c:2193 |#6 0x1cc3c in TVSCREENAtExit () at tvscreen.c:366 |#7 0x2023ac2e in exit () |#8 0x20144835 in _XDefaultIOError () |#9 0x20144fd5 in _XIOError () |#10 0x20143874 in _XReply () |#11 0x2ad14 in XF86VidModeGetModeLine () |#12 0x1c842 in TVSCREENGetCurVidMode (s=0x683b0) at tvscreen.c:151 |#13 0x1fd02 in TVSCREENSetZoomState (zoom_on=0, full_screen=0) | at tvscreen.c:2119 |#14 0x1cc3c in TVSCREENAtExit () at tvscreen.c:366 |#15 0x2023ac2e in exit () |#16 0x20144ecb in _XDefaultError () |#17 0x20144fa1 in _XError () |#18 0x2014395e in L310 () |#19 0x2014024f in XSync () |#20 0x201b5 in TVSCREENSetZoomState (zoom_on=0, full_screen=0) | at tvscreen.c:2240 |#21 0x1aa4c in ZoomCB (w=0x8d600, cl=0x0, cb=0x0) at tvmenu.c:296 |#22 0x200e7141 in XtCallCallbacks () |#23 0x200bd78e in Notify () |#24 0x201103bf in HandleActions () |#25 0x20110bea in HandleComplexState () |#26 0x20110cb2 in _XtTranslateEvent () |#27 0x200f150e in XtDispatchEventToWidget () |#28 0x200f1dbf in L403 () |#29 0x200f1fa8 in L458 () |#30 0x1508a in main (argc=1, argv=0xefbfd984) at tv.c:726 |(gdb) | |> The output would be useful. Also, if you don't mind, just mail me your |> "fxtv" and the "fxtv.core" core file. My inbox can take it :-) | |Attached. | | |-- |Brian Litzinger --82I3+IH0IqGh5yIs Content-Type: application/octet-stream Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="fxtv-0.47-remote_vmode.patch.gz" H4sICOelhTUAA2Z4dHYtMC40Ny1yZW1vdGVfdm1vZGUucGF0Y2gArVltc9pIEv58/hV9TiUB Iwhgm2C8ycaJsZctMDkgNne7WyohDaCN0HDSCOJL+b9f94wQkhAvzq4qZRRpptX9dPfTPTPF YhG6vdbtm4nDRyXzH4OAQcd4hMoFVKuNs2rjtI73F/WjQqEA4ZgOd+HXwIXKOVQrjdOzRvlc jfnwAYpnp1oNCvj3LXz4cARHMLjXb9vdjwC3Os2/PALbFSCvW91io2AC76B8eVTAgR+73TY9 tl39m848j3v47uaq3W9ekqg3J2reScYFbW4aDlhsbLvMh9SVGnvyZo+wG+4tDc9CcaZjeIaw uevvEFZMoDjdRPEsjeJ0N4qVtxJG+lE4Pq1wlECwb4J5bgTtCtnC+rlEMg6knPdCwYMDrlv9 z+2rf6+8UvpWsmx/7hiP8UH9T71m8w5ig3zTY8xd2ysWGA99tIKsPa1ApdwoY8ycra2VI3ba elEmU/FvtSxNXV193bcnLvr0HeAN6v+EJhTIbYP7YZNs+sVyPCjCJ8NxmAXLKXNhycBjJrMX DAwXhiBtLwG07a8MxJRRgBiBgwGIbiuoGAhHwdRwLYd5Ggp57TgIsi1K6UDacpEwX2CcmLDg tpXQMAfXClo4seaPGqg3zQXDNDjBL+tM3uaPCt+PCiSMtOoz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nBs2s8lDWoy4qQ5Y7+0hbmdMCV1VGvrkW4aJBb45n/DavuUl/M 4A9I9dIxmClE7rqDJlJ27U3l/M1FHe+ufOBj/DJ6t16D09JpqQK5V1CqRh1/XqPzH4+9lgd5 8RBSW/4uh6XxSC2DPGxZThkNl2dGGHyzZGNh+yC8AJcR4QKilCGwJfBThoVlRdg+OkiuL+TB RhEjkqatGpal4YM/Z6Y9tnEcVxtUmwLRQaSN6di0v48qeGzGhTqXKGK68OUdd+WyaIgai8BV kqmxzhYYfRM7JATQQIF+4Agt2sFRZ0wzhMWfc1cYLuOBj1ZTHc8SiN6eynO3Znjs9rwrLfCG e+pkBtcnPnfpYA7+DDDvQvwiPSWqXuC6dPylUEEtszREPGxs+KJlIIETLQJHgVDfM9EGX9jI QCMbAQ58wj4bQ/JI4MvVYKSBXBKicHLMNOHblOezwmZACuC/OZKAbQaOgVzoGr5AH9iuSWd9 KFMeiXXQGQwmnjECOknAZ9kmq3cG2YZ/5nRmI1VbZQupaCAQFO50HL+kNEGYsp0CYHEmV74e cxi1gwTBbK3LUh2oRYFq2cyPh8KGl1vDTrMRabMk2Kd8zsYB3oztbySLvrLkpJ3fiL5LG5rZ Gqa1iWmiSdPR/1RRYIZJzi1K+v/KorPN5BUbZDIBRqf0drR1kBnYsa1eyl4ttbWLvkUKz4X8 9x7MwMObPPwMFWhAsbI6DqtWy/I8rFo9PY8diEViiMQJOV1VOtkmbegz7BlISerQNUHLQxE+ tLBUThmKWU6EOp/a7DAIGqSbr3QeGgsCn6uEwCTCIKHjG6RmRV2D+9Imwn+DuGh/eQMKKv8T I1Uq85uDJSpqk/za9pgp7qnh2FKy9h5yZotU+YpY/h8ip59CdSMAAA== --82I3+IH0IqGh5yIs-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message