Opened 9 years ago

Closed 8 years ago

#33023 closed defect (fixed)

xorg-server: X11.app crashes on launch

Reported by: ryandesign (Ryan Schmidt) Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: Cc: kurtjaeke@…
Port: xorg-server

Description

I know xorg-server's X11.app used to work for me, but today, it just crashes on launch.

Attachments (2)

X11.bin_2012-01-26-034424_808.crash (28.9 KB) - added by ryandesign (Ryan Schmidt) 9 years ago.
Crash log
x11-crash.txt (30.5 KB) - added by mf2k (Frank Schima) 9 years ago.

Download all attachments as: .zip

Change History (21)

Changed 9 years ago by ryandesign (Ryan Schmidt)

Crash log

comment:1 Changed 9 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Status: newassigned
16	Application Specific Information:
17	abort() called
18	Failed to activate core devices.
19	X.Org X Server 1.11.3 Build Date: 20120104

That comes from:

oid
InitCoreDevices(void)
{
    if (AllocDevicePair(serverClient, "Virtual core",
                        &inputInfo.pointer, &inputInfo.keyboard,
                        CorePointerProc, CoreKeyboardProc,
                        TRUE) != Success)
        FatalError("Failed to allocate core devices");

    if (ActivateDevice(inputInfo.pointer, TRUE) != Success ||
        ActivateDevice(inputInfo.keyboard, TRUE) != Success)
        FatalError("Failed to activate core devices.");
    if (!EnableDevice(inputInfo.pointer, TRUE) ||
        !EnableDevice(inputInfo.keyboard, TRUE))
        FatalError("Failed to enable core devices.");

    InitXTestDevices();
}

Which is quite odd. Is there anything in /var/log/system.log which can provide more insight? Can you find out what is actually failing there by adding some debug spew to ActivateDevice() in dix/devices.c?

comment:2 Changed 9 years ago by ryandesign (Ryan Schmidt)

The system.log just says:

Jan 26 15:03:43 808 defaults[98802]: \nThe domain/default pair of (org.macports.X11, dpi) does not exist
Jan 26 15:03:48 808 org.macports.X11.stub[98832]: launch_msg("CheckIn") IPC failure: Operation not permitted
Jan 26 15:03:50 808 SIMBL Agent[254]: warning: failed to get scripting definition from /opt/local/Applications/X11.app; it may not be scriptable.
Jan 26 15:04:09 808 org.macports.X11.stub[98832]: Xquartz: start_x11_server: (ipc/mig) server died
Jan 26 15:04:09 808 com.apple.launchd.peruser.502[227] ([0x0-0x1cd5cd4].org.macports.X11[98771]): Job appears to have crashed: Abort trap
Jan 26 15:04:10 808 ReportCrash[98951]: Saved crash report for X11.bin[98771] version 2.7.0 (2.7.0) to /Users/rschmidt/Library/Logs/DiagnosticReports/X11.bin_2012-01-26-150410_808.crash

Changed 9 years ago by mf2k (Frank Schima)

Attachment: x11-crash.txt added

comment:3 Changed 9 years ago by mf2k (Frank Schima)

Not sure this is related, but it crashes for me all the time when quitting. I have attached my crash log.

comment:4 Changed 9 years ago by jeremyhu (Jeremy Huddleston Sequoia)

That crash at quit is unrelated. It's fixed in git, but I hadn't updated the port yet (I didn't realize the version in the port was affected by that bug).

Ok, then can you please use gdb to figure out what is failing within ActivateDevice() or add printfs to do some better logging in there?

comment:5 Changed 9 years ago by mf2k (Frank Schima)

r89395 appears to fix my crash on quit problem.

comment:6 Changed 9 years ago by kurtjaeke@…

Cc: kurtjaeke@… added

Cc Me!

comment:7 Changed 9 years ago by kurtjaeke@…

Happens on xorg-server v1.12.0:

Application Specific Information:
Failed to activate core devices.
X.Org X Server 1.12.0 Build Date: 20120309
objc[33603]: garbage collection is OFF
abort() called

comment:8 Changed 9 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Yeah, but I can't reproduce it, so I can't fix it without more information. Please see comment:2. I need more detailed information about what is failing in InitCoreDevices

comment:9 Changed 9 years ago by kurtjaeke@…

Magically disappears after re-installing xkeyboard-config, i.e.,

port -f uninstall xkeyboard-config
port clean xkeyboard-config
port install xkeyboard-config

, as per

http://old.nabble.com/failed-to-activate-core-devices-errors-td30851514.html

comment:10 Changed 8 years ago by gallafent

I experience this crash today with current macports xquartz (xorg-server 1.13.0) …

… the fix suggested in comment:9 worked for me.

comment:11 Changed 8 years ago by mf2k (Frank Schima)

FYI. I just had this problem on a fresh install of macports on Mac OS X 10.8.2 and Xcode 4.5.2. I was seeing a message "Failed to enable core services.". comment:9 did NOT work for me. But I modified it to work by forcing a source code install. Here are my modified steps.

sudo port -f uninstall xkeyboard-config
sudo port -s install xkeyboard-config

This suddenly required some more dependencies to install including some perl5.12 ports. So maybe there is a dependency issue with xkeyboard-config? It does not have any library dependencies and that seems wrong to me.

@jeremyhu: Can you look at this please?

comment:12 Changed 8 years ago by jeremyhu (Jeremy Huddleston Sequoia)

I'm not seeing this. If you can tell me how to reproduce, then maybe I can help. See comment #2 for the point of failure. If you can debug that on your system, it would help...

comment:13 Changed 8 years ago by mf2k (Frank Schima)

If you can find a machine and completely wipe Macports, reboot and just install xorg-server and xeyes from scratch, that is your path to reproduce. Of course I ran the appropriate load command from xinit and logged out/in first. I think it might be a strange issue with binary installers from the ML buildbot or maybe xkeyboard-config needs its dependencies updated that the source build properly pulls in.

comment:14 Changed 8 years ago by mf2k (Frank Schima)

@jeremyhu: Here's some more information. On a different machine with xorg-server installed from scratch it fails as I said in comment:11. Here is my solution.

$ sudo port -f uninstall xkeyboard-config
Password:
--->  Unable to uninstall xkeyboard-config @2.4.1_0, the following ports depend on it:
--->  	xorg-server @1.13.0_1
Warning: Uninstall forced.  Proceeding despite dependencies.
--->  Deactivating xkeyboard-config @2.4.1_0
--->  Unable to deactivate xkeyboard-config @2.4.1_0, the following ports depend on it:
--->  	xorg-server @1.13.0_1
Warning: Deactivate forced.  Proceeding despite dependencies.
--->  Cleaning xkeyboard-config
--->  Uninstalling xkeyboard-config @2.4.1_0
--->  Cleaning xkeyboard-config
686bmf-ws2:~ bmfadmin$ sudo port -s install xkeyboard-config
--->  Computing dependencies for xkeyboard-config
--->  Dependencies to be installed: intltool gnome-common p5.12-getopt-long perl5.12 gdbm p5.12-pathtools p5.12-scalar-list-utils p5.12-xml-parser xkbcomp

Note the extra ports that get installed with the source install. One of those probably should be a library dependency that does not get installed when the binary is downloaded.

comment:15 Changed 8 years ago by rbubley

I too had this problem. comment:11 fixed it for me, but unlike in comment:14, for me the only additional port installed was xkbcomp @1.2.4_0.

comment:16 Changed 8 years ago by vallon (Justin)

xkbcomp is listed in "leaves" (unrequested and not a dependent). Uninstalling it breaks the server, and gives the "Failed to activate core devices.".

I replaced xkbcomp with a shell script that pauses, and it shows X11.app calling the following (as reported by ps, might have been truncated):

/bin/sh /opt/local/bin/xkbcomp -w 1 -R/opt/local/share/X11/xkb -xkm - -em1 The XKEYBOARD keymap compiler (xkbcomp) reports: -emp > -eml Errors from xkbcomp are not fatal to the X server /tmp/server-4.xkm

Replacing xkbcomp with a script "exit 1" causes the server to fail with the indicated message.

Let me know if you want more info.

comment:17 Changed 8 years ago by mf2k (Frank Schima)

@JustinVallon: Confirmed. Thanks for narrowing it down to that port. I have adjusted the dependency on it to a library dependency in r100674.

@ryandesign: Can you please confirm this is no longer a problem for you so we can close this ticket?

comment:18 Changed 8 years ago by gallafent

I updated today, and the problem has gone away for me at least, X11.app starts fine now.

comment:19 Changed 8 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: assignedclosed

Calling this fixed.

Note: See TracTickets for help on using tickets.