public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* cygwin 1.7 startxwin failing due to "winMultiWindowXMsgProc - another window manager is running.  Exiting."
@ 2010-11-29  5:44 Oly
  2010-12-14 15:14 ` Jon TURNEY
  2010-12-16 17:25 ` jwzumwalt
  0 siblings, 2 replies; 3+ messages in thread
From: Oly @ 2010-11-29  5:44 UTC (permalink / raw)
  To: cygwin-xfree

[-- Attachment #1: Type: text/plain, Size: 2277 bytes --]

Not sure when this started happening ... but sometime recently, starting 
the xserver became a hit/miss proposition (mostly miss). I'm running 
Windows XP Pro Service Pack 3 with the cygwin 1.7.7-1 and xorg-server 
1.9.2-1 (as reported by the setup wizard). I am using the installed x 
server start shortcut which executes the following command:

C:\cygwin17\bin\run.exe /usr/bin/bash.exe -l -c /usr/bin/startxwin.exe

The failure to start seems always to coincide with a log like the 
attached. The interesting symptom is (from the bottom of the log):

[214595.953] winMultiWindowXMsgProc - XOpenDisplay () returned and 
successfully opened the display.
[214595.953] winMultiWindowXMsgProc - another window manager is running. 
  Exiting.
[214595.953] winClipboardProc - winClipboardFlushWindowsMessageQueue 
trapped WM_QUIT message, exiting main loop.
[214595.953] winClipboardProc - XDestroyWindow succeeded.
[214595.953] winClipboardProc - Clipboard disabled  - Exit from server
[214596.015] winDeinitMultiWindowWM - Noting shutdown in progress

I've seen a nearly identical report on the forum about a year ago ... 
back in the startxwin.bat days. The closest thing I found to a possible 
resolution was the suggestion of inserting a sleep in the batch file. 
Not sure what might be the trick now.

For what it is worth, I notice consistent failure when I create an empty 
.startxwinrc (to avoid the xterm opening - which I'd really like but 
could live with closing it if the server started every single time). 
When I don't have an empty .startxwinrc in my home directory ... failure 
is frequent, but doesn't occur on every single start attempt. Failed 1 
out of 2 tries tonight. I deleted the log after stopping the server 
(right clicked the task tray icon and chose exit) and the second start 
attempt failed. But sometimes it is the first try.

How could I figure out what is making the startup think some other 
window manager is running? I don't think this is true - the failure 
occurs after a clean reboot (and I don't have any auto-start stuff) ... 
but I also saw in that previous thread something about a restart attempt 
(which may be borne out by what I see in the attached log) ... maybe 
there *are* two managers due to some race condition or something?

[-- Attachment #2: XWin.0.log --]
[-- Type: text/plain, Size: 10576 bytes --]

Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: 1.9.2.0 (10902000)
Build Date: 2010-11-03

XWin was started with the following command line:

X :0 -multiwindow 

ddxProcessArgument - Initializing default screens
winInitializeScreenDefaults - primary monitor w 1280 h 768
winInitializeDefaultScreens - native DPI x 96 y 96
_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
_XSERVTransOpen: transport open failed for inet6/unknown:0
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6
[214588.671] winInitializeScreens - 1
[214588.671] winInitializeScreen - 0
[214588.671] (II) xorg.conf is not supported
[214588.671] (II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more information
[214588.671] LoadPreferences: /home/stephen/.XWinrc not found
[214588.671] LoadPreferences: Loading /etc/X11/system.XWinrc
[214588.671] LoadPreferences: Done parsing the configuration file...
[214588.671] winGetDisplay: DISPLAY=:0.0
[214588.671] winDetectSupportedEngines - Windows NT/2000/XP
[214588.671] winDetectSupportedEngines - DirectDraw installed
[214588.671] winDetectSupportedEngines - Allowing PrimaryDD
[214588.671] winDetectSupportedEngines - DirectDraw4 installed
[214588.671] winDetectSupportedEngines - Returning, supported engines 0000001f
[214588.671] winSetEngine - Multi Window or Rootless => ShadowGDI
[214588.671] winScreenInit - Using Windows display depth of 32 bits per pixel
[214588.703] winAllocateFBShadowGDI - Creating DIB with width: 1280 height: 768 depth: 32
[214588.703] winFinishScreenInitFB - Masks: 00ff0000 0000ff00 000000ff
[214588.703] winInitVisualsShadowGDI - Masks 00ff0000 0000ff00 000000ff BPRGB 8 d 24 bpp 32
[214588.703] null screen fn ReparentWindow
[214588.703] null screen fn RestackWindow
[214588.703] InitQueue - Calling pthread_mutex_init
[214588.703] InitQueue - pthread_mutex_init returned
[214588.703] InitQueue - Calling pthread_cond_init
[214588.703] InitQueue - pthread_cond_init returned
[214588.703] winInitMultiWindowWM - Hello
[214588.703] winInitMultiWindowWM - Calling pthread_mutex_lock ()
[214588.703] winMultiWindowXMsgProc - Hello
[214588.703] Screen 0 added at virtual desktop coordinate (0,0).
[214588.703] winMultiWindowXMsgProc - Calling pthread_mutex_lock ()
[214588.703] MIT-SHM extension disabled due to lack of kernel support
[214588.718] XFree86-Bigfont extension local-client optimization disabled due to lack of shared memory support in the kernel
[214589.140] (II) AIGLX: Loaded and initialized /usr/lib/dri/swrast_dri.so
[214589.140] (II) GLX: Initialized DRISWRAST GL provider for screen 0
[214589.156] [dix] Could not init font path element /usr/share/fonts/TTF/, removing from list!
[214589.156] [dix] Could not init font path element /usr/share/fonts/OTF/, removing from list!
[214589.156] [dix] Could not init font path element /usr/share/fonts/Type1/, removing from list!
[214590.421] winPointerWarpCursor - Discarding first warp: 640 384
[214590.421] (--) 5 mouse buttons found
[214590.421] (--) Setting autorepeat to delay=500, rate=31
[214590.421] (--) Windows keyboard layout: "00000409" (00000409) "US", type 4
[214590.421] (--) Found matching XKB configuration "English (USA)"
[214590.437] (--) Model = "pc105" Layout = "us" Variant = "none" Options = "none"
[214590.437] Rules = "base" Model = "pc105" Layout = "us" Variant = "none" Options = "none"
[214590.437] winInitMultiWindowWM - pthread_mutex_lock () returned.
[214590.453] winMultiWindowXMsgProc - pthread_mutex_lock () returned.
[214590.453] winInitMultiWindowWM - pthread_mutex_unlock () returned.
[214590.453] winMultiWindowXMsgProc - pthread_mutex_unlock () returned.
[214590.468] winGetDisplay: DISPLAY=:0.0
[214590.468] winGetDisplay: DISPLAY=:0.0
[214590.468] winInitMultiWindowWM - DISPLAY=:0.0
[214590.468] winMultiWindowXMsgProc - DISPLAY=:0.0
[214590.531] winProcEstablishConnection - Hello
[214590.531] winInitClipboard ()
[214590.531] winProcEstablishConnection - winInitClipboard returned.
[214590.531] winClipboardProc - Hello
[214590.531] DetectUnicodeSupport - Windows NT/2000/XP
[214590.859] 5 XSELINUXs still allocated at reset
[214590.859] SCREEN: 0 objects of 72 bytes = 0 total bytes 0 private allocs
[214590.859] DEVICE: 4 objects of 16 bytes = 64 total bytes 0 private allocs
[214590.859] CLIENT: 0 objects of 140 bytes = 0 total bytes 0 private allocs
[214590.859] WINDOW: 0 objects of 64 bytes = 0 total bytes 0 private allocs
[214590.859] PIXMAP: 1 objects of 28 bytes = 28 total bytes 0 private allocs
[214590.859] GC: 0 objects of 52 bytes = 0 total bytes 0 private allocs
[214590.859] CURSOR: 0 objects of 4 bytes = 0 total bytes 0 private allocs
[214590.859] CURSOR_BITS: 0 objects of 4 bytes = 0 total bytes 0 private allocs
[214590.859] DBE_WINDOW: 0 objects of 12 bytes = 0 total bytes 0 private allocs
[214590.859] TOTAL: 5 objects, 92 bytes, 0 allocs
[214590.859] 4 DEVICEs still allocated at reset
[214590.859] DEVICE: 4 objects of 16 bytes = 64 total bytes 0 private allocs
[214590.859] CLIENT: 0 objects of 140 bytes = 0 total bytes 0 private allocs
[214590.859] WINDOW: 0 objects of 64 bytes = 0 total bytes 0 private allocs
[214590.859] PIXMAP: 1 objects of 28 bytes = 28 total bytes 0 private allocs
[214590.859] GC: 0 objects of 52 bytes = 0 total bytes 0 private allocs
[214590.859] CURSOR: 0 objects of 4 bytes = 0 total bytes 0 private allocs
[214590.859] CURSOR_BITS: 0 objects of 4 bytes = 0 total bytes 0 private allocs
[214590.859] DBE_WINDOW: 0 objects of 12 bytes = 0 total bytes 0 private allocs
[214590.859] TOTAL: 5 objects, 92 bytes, 0 allocs
[214590.859] 1 PIXMAPs still allocated at reset
[214590.859] PIXMAP: 1 objects of 28 bytes = 28 total bytes 0 private allocs
[214590.859] GC: 0 objects of 52 bytes = 0 total bytes 0 private allocs
[214590.859] CURSOR: 0 objects of 4 bytes = 0 total bytes 0 private allocs
[214590.859] CURSOR_BITS: 0 objects of 4 bytes = 0 total bytes 0 private allocs
[214590.859] DBE_WINDOW: 0 objects of 12 bytes = 0 total bytes 0 private allocs
[214590.859] TOTAL: 1 objects, 28 bytes, 0 allocs
[214590.875] (II) xorg.conf is not supported
[214590.875] (II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more information
[214590.875] LoadPreferences: /home/stephen/.XWinrc not found
[214590.875] LoadPreferences: Loading /etc/X11/system.XWinrc
[214590.875] LoadPreferences: Done parsing the configuration file...
[214590.875] winGetDisplay: DISPLAY=:0.0
[214590.875] winDetectSupportedEngines - Windows NT/2000/XP
[214590.875] winDetectSupportedEngines - DirectDraw installed
[214590.875] winDetectSupportedEngines - Allowing PrimaryDD
[214590.875] winDetectSupportedEngines - DirectDraw4 installed
[214590.875] winDetectSupportedEngines - Returning, supported engines 0000001f
[214590.875] winSetEngine - Multi Window or Rootless => ShadowGDI
[214590.875] winScreenInit - Using command line depth of 32 bpp
[214590.890] winAllocateFBShadowGDI - Creating DIB with width: 1280 height: 768 depth: 32
[214590.890] winFinishScreenInitFB - Masks: 00ff0000 0000ff00 000000ff
[214590.890] winInitVisualsShadowGDI - Masks 00ff0000 0000ff00 000000ff BPRGB 8 d 24 bpp 32
[214590.890] null screen fn ReparentWindow
[214590.890] null screen fn RestackWindow
[214590.890] InitQueue - Calling pthread_mutex_init
[214590.890] InitQueue - pthread_mutex_init returned
[214590.890] InitQueue - Calling pthread_cond_init
[214590.890] InitQueue - pthread_cond_init returned
[214590.906] winInitMultiWindowWM - Hello
[214590.906] winInitMultiWindowWM - Calling pthread_mutex_lock ()
[214590.906] winMultiWindowXMsgProc - Hello
[214590.906] winMultiWindowXMsgProc - Calling pthread_mutex_lock ()
[214590.906] Screen 0 added at virtual desktop coordinate (0,0).
[214590.921] winInitMultiWindowWM - Could not open display, try: 1, sleeping: 5
[214590.921] MIT-SHM extension disabled due to lack of kernel support
[214590.937] XFree86-Bigfont extension local-client optimization disabled due to lack of shared memory support in the kernel
[214590.937] winMultiWindowXMsgProc - Could not open display, try: 1, sleeping: 5
[214591.406] (II) AIGLX: Loaded and initialized /usr/lib/dri/swrast_dri.so
[214591.406] (II) GLX: Initialized DRISWRAST GL provider for screen 0
[214591.421] [dix] Could not init font path element /usr/share/fonts/TTF/, removing from list!
[214591.437] [dix] Could not init font path element /usr/share/fonts/OTF/, removing from list!
[214591.437] [dix] Could not init font path element /usr/share/fonts/Type1/, removing from list!
[214592.593] (--) 5 mouse buttons found
[214592.593] (--) Setting autorepeat to delay=500, rate=31
[214592.593] (--) Windows keyboard layout: "00000409" (00000409) "US", type 4
[214592.593] (--) Found matching XKB configuration "English (USA)"
[214592.593] (--) Model = "pc105" Layout = "us" Variant = "none" Options = "none"
[214592.593] Rules = "base" Model = "pc105" Layout = "us" Variant = "none" Options = "none"
[214592.593] winInitMultiWindowWM - pthread_mutex_lock () returned.
[214592.593] winMultiWindowXMsgProc - pthread_mutex_lock () returned.
[214592.593] winMultiWindowXMsgProc - pthread_mutex_unlock () returned.
[214592.593] winInitMultiWindowWM - pthread_mutex_unlock () returned.
[214592.609] _XSERVTransSocketUNIXAccept: accept() failed
[214592.609] _XSERVTransSocketUNIXAccept: accept() failed
[214592.609] winProcEstablishConnection - Clipboard client already launched, returning.
[214592.625] winGetDisplay: DISPLAY=:0.0
[214592.625] winGetDisplay: DISPLAY=:0.0
[214592.625] winGetDisplay: DISPLAY=:0.0
[214592.625] winClipboardProc - DISPLAY=:0.0
[214592.625] winMultiWindowXMsgProc - DISPLAY=:0.0
[214592.625] winInitMultiWindowWM - DISPLAY=:0.0
[214592.640] winInitMultiWindowWM - XOpenDisplay () returned and successfully opened the display.
[214592.640] winClipboardProc - XOpenDisplay () returned and successfully opened the display.
[214592.687] winMultiWindowXMsgProc - XOpenDisplay () returned and successfully opened the display.
[214592.703] winInitMultiWindowWM - XOpenDisplay () returned and successfully opened the display.
[214595.953] winMultiWindowXMsgProc - XOpenDisplay () returned and successfully opened the display.
[214595.953] winMultiWindowXMsgProc - another window manager is running.  Exiting.
[214595.953] winClipboardProc - winClipboardFlushWindowsMessageQueue trapped WM_QUIT message, exiting main loop.
[214595.953] winClipboardProc - XDestroyWindow succeeded.
[214595.953] winClipboardProc - Clipboard disabled  - Exit from server 
[214596.015] winDeinitMultiWindowWM - Noting shutdown in progress


[-- Attachment #3: Type: text/plain, Size: 223 bytes --]

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: cygwin 1.7 startxwin failing due to "winMultiWindowXMsgProc - another window manager is running.  Exiting."
  2010-11-29  5:44 cygwin 1.7 startxwin failing due to "winMultiWindowXMsgProc - another window manager is running. Exiting." Oly
@ 2010-12-14 15:14 ` Jon TURNEY
  2010-12-16 17:25 ` jwzumwalt
  1 sibling, 0 replies; 3+ messages in thread
From: Jon TURNEY @ 2010-12-14 15:14 UTC (permalink / raw)
  To: cygwin-xfree; +Cc: ofrijole

On 29/11/2010 05:44, Oly wrote:
> Not sure when this started happening ... but sometime recently, starting the
> xserver became a hit/miss proposition (mostly miss). I'm running Windows XP
> Pro Service Pack 3 with the cygwin 1.7.7-1 and xorg-server 1.9.2-1 (as
> reported by the setup wizard). I am using the installed x server start
> shortcut which executes the following command:
> 
> C:\cygwin17\bin\run.exe /usr/bin/bash.exe -l -c /usr/bin/startxwin.exe
> 
> The failure to start seems always to coincide with a log like the attached.
> The interesting symptom is (from the bottom of the log):
> 
> [214595.953] winMultiWindowXMsgProc - XOpenDisplay () returned and
> successfully opened the display.
> [214595.953] winMultiWindowXMsgProc - another window manager is running.
>  Exiting.
> [214595.953] winClipboardProc - winClipboardFlushWindowsMessageQueue trapped
> WM_QUIT message, exiting main loop.
> [214595.953] winClipboardProc - XDestroyWindow succeeded.
> [214595.953] winClipboardProc - Clipboard disabled  - Exit from server
> [214596.015] winDeinitMultiWindowWM - Noting shutdown in progress
> 
> I've seen a nearly identical report on the forum about a year ago ... back in
> the startxwin.bat days. The closest thing I found to a possible resolution was
> the suggestion of inserting a sleep in the batch file. Not sure what might be
> the trick now.
> 
> For what it is worth, I notice consistent failure when I create an empty
> .startxwinrc (to avoid the xterm opening - which I'd really like but could
> live with closing it if the server started every single time). When I don't
> have an empty .startxwinrc in my home directory ... failure is frequent, but
> doesn't occur on every single start attempt. Failed 1 out of 2 tries tonight.
> I deleted the log after stopping the server (right clicked the task tray icon
> and chose exit) and the second start attempt failed. But sometimes it is the
> first try.
> 
> How could I figure out what is making the startup think some other window
> manager is running? I don't think this is true - the failure occurs after a
> clean reboot (and I don't have any auto-start stuff) ... but I also saw in
> that previous thread something about a restart attempt (which may be borne out
> by what I see in the attached log) ... maybe there *are* two managers due to
> some race condition or something?

Thanks for the problem report.

Yes, this is a race condition we haven't quite managed to stamp out.

If you examine your log in detail, you'll see that around [214590.875] the X
server is restarting, so there are duplicate calls to winInitMultiWindowWM()
(which starts the internal WM) starting at [214590.437] and [214592.593]

I imagine the sequence of events is something like:

1) startxwin starts
2) startxwin starts the X server
3) X server starts internal WM thread
4) startxwin tries to connect to X server and succeeds
5) startxwin runs commands from ~/.startxwin (empty)
6) startxwin disconnects from X server and exits
7) X server restarts at it has 0 clients connected
8) X server starts another internal WM thread
9) internal WM thread started in 3) connects
10) internal WM thread started in 8) connects, discovers a WM is already
running and stops the whole server

To properly fix this, we either need to introduce a mechanism which prevents
external clients connecting before internal ones (which would be somewhat
awkward to implement), or not create a internal WM thread every time the X
server restarts (either properly checking for a still running one, or
converting the existing thread into a long lived one which retries when it
gets disconnected)

As a workaround, I would suggest rather than an empty ~/.startxwinrc, simply
create one which contains 'sleep 1', should hopefully avoid this problem for
the time being.

-- 
Jon TURNEY
Volunteer Cygwin/X X Server maintainer

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: cygwin 1.7 startxwin failing due to "winMultiWindowXMsgProc - another window manager is running.  Exiting."
  2010-11-29  5:44 cygwin 1.7 startxwin failing due to "winMultiWindowXMsgProc - another window manager is running. Exiting." Oly
  2010-12-14 15:14 ` Jon TURNEY
@ 2010-12-16 17:25 ` jwzumwalt
  1 sibling, 0 replies; 3+ messages in thread
From: jwzumwalt @ 2010-12-16 17:25 UTC (permalink / raw)
  To: cygwin-xfree


I had this happening too. For some reason teh xwindows manager does not
completely shut down and an attempt to restart xwindows gives this errror.

1) from bash shell do a ps and "kill -9 xxxx" any orphaned job.
2) From Windows task manager do the same. 
-- 
View this message in context: http://old.nabble.com/cygwin-1.7-startxwin-failing-due-to-%22winMultiWindowXMsgProc---another-window-manager-is-running.--Exiting.%22-tp30327883p30474646.html
Sent from the cygwin-xfree mailing list archive at Nabble.com.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-12-16 17:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-29  5:44 cygwin 1.7 startxwin failing due to "winMultiWindowXMsgProc - another window manager is running. Exiting." Oly
2010-12-14 15:14 ` Jon TURNEY
2010-12-16 17:25 ` jwzumwalt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).