Wednesday February 18, 2009
alanc @ sun.com
Alan Coopersmith’s blog
Random thoughts of a disorganized mind...
(and though it should be obvious, while Sun pays me to think about things, they disclaim any responsibility for these thoughts, nor do I claim what I say matches in any way what Sun thinks)
Xorg 1.5.3 known issues in OpenSolaris 2009.06 & Solaris Express build 107
As Phoronix recently noticed, we upgraded the Xorg server from 1.3 to 1.5.3 in Nevada build 107 (currently available via Solaris Express Community Edition (SXCE) Install ISO’s and OpenSolaris IPS package updates in the /dev repo).
When we integrated, I sent out a heads up message with information about the driver compatibility changes and issues we knew about at that time.
So far it’s gone mostly smooth, thanks to the help of the people who tested the pre-integration builds I posted both internally and on the X community on opensolaris.org, but there’s a few issues that have hit some people so far, most with workarounds you can use to get past them:
- 6801598 Xorg 1.5 ignores kernel keyboard layout setting, always uses "us"
Fixed in build 109. Xorg on Solaris has always shipped with a patch to query the kernel for the console keyboard layout (which in turn either gets set automatically by the keyboard if, like Sun keyboards, it provides the layout in the optional USB HID layout identifier, or gets set by querying the user on initial installation), but the code we apply this patch to moved from the Xorg binary to the kbd_drv.so binary in Xorg 1.5 and our patch didn’t get migrated correctly. We didn’t notice in testing since our testing was done with input devices provided by HAL, which was handling this for us, but when that didn’t integrate as expected, this bug was exposed.
Workaround: Create an /etc/X11/xorg.conf file with a keyboard section specifying your desired layout, such as this one for a British layout:
Section "InputDevice" Identifier "Keyboard0" Driver "kbd" Option "XkbRules" "xorg" Option "XkbModel" "pc105" Option "XkbLayout" "gb" EndSection
- 6791361 SUNWxorg-xkb should deliver "base" rules
If you do need to set a localized keyboard layout, you may notice the default XKB rules file upstream changed from "xorg" (which is currently shipped in our packages) to "base" (which isn’t yet, though we’ve asked the localization teams who build our XKB packages to add it).
Workaround: Include an XkbRules option line in your keyboard settings as shown in the example above, or make a symlink from /usr/X11/lib/X11/xkb/rules/base to the xorg file in that directory. The fix for the above bug in build 109 should also set the default used by our Xorg builds back to "xorg" for now.
- 6801386 Xorg core dumps on startup if hald not running in snv_107
Fixed in build 109. Yet another instance of our old friend 6724478 libc printf should not SEGV when passed NULL for %s format. This was a design decision made in SVR4 and Solaris 2.0 many years ago, to force programmers to catch NULL pointer misuse - but since Linux & the BSD’s allow it, today it’s mostly become a source of pain in porting code that while technically incorrect, works on those platforms, so the decision was made last year to change Solaris libc to match. Unfortunately, that change is still undergoing standards conformance testing, so hasn’t integrated yet, and we still have to check for NULL first.
Workaround: Make sure hald starts before Xorg does. This shouldn’t be a problem for gdm users (default in OpenSolaris), since the gdm SMF service lists the hal service as a dependency that needs to start first, but may cause problems for dtlogin, xinit or startx users.
- 6806763 Xorg 1.5 doesn’t start if xorg.conf contains RgbPath entry
Fixed in 109, and in upstream head. This entry in the Files section of xorg.conf was obsoleted upstream, but became a parse error instead of just being ignored, which breaks people who upgraded a system with a working xorg.conf that happened to have this line.
Workaround: Remove RgbPath lines from /etc/X11/xorg.conf.
- 6799573 Metacity not starting on TX Xorg 1.5
Fixed in 108. The XACE framework used by extensions such as Xtsol & Xselinux added new permission types to check in the upstream release, but Xtsol doesn’t handle all of them yet. In this case, Metacity’s constant checking of round-trip time by appending to an existing property failed because Xtsol was only handling the WriteAccess check and not the BlendAccess check.
I don’t know of a workaround for this other than not running the desktop in multi-level mode, so users of the labeled/multi-level security desktop in Trusted Extensions may want to wait to upgrade until then.
- 6798452 X Server will not start on x86 systems with multiple graphics devices
Not yet fixed, either in our builds or upstream, but has a simple workaround of creating an xorg.conf file listing the devices you want to use. This may affect people with a single card if your motherboard has on-board graphics as well.
- 6797940 Can’t do gui installs on x86 systems with Nevada 107/Nevada 108
We haven’t yet tracked down this issue, which only affects the SXCE installer on x86/x64 platforms. Workarounds include using the OpenSolaris LiveCD installer or the text only mode of the SXCE installer instead. After installation, the installed Xorg works fine (modulo the above issues).
- 6686 SUNWefb[w] should be part of slim_install
Fixed in 108. The SPARC drivers added in OpenSolaris build 107 for Xorg on XVR-50, XVR-100, and XVR-300 graphics cards aren’t included in the default install. You can add them after the install by doing pfexec pkg install SUNWefb SUNWefbw and then rebooting. (These drivers are only available in OpenSolaris installs, not SXCE ones, since they conflict with the Xsun drivers for these cards included in SXCE.)
Posted at 07:43PM Feb 18, 2009 by Alan Coopersmith in X11 | Comments[1]
June 11, 2008 X Server security advisories
On June 11, iDefense & the X.Org Foundation released security advisories for a set of issues in extension protocol parsing code in the open source X server common code base that iDefense discovered and X.Org fixed.
Their advisories/reports are at:
- X.Org Security Advisory June 2008 - Multiple vulnerabilities in X server extensions
- iDefense 718: Multiple Vendor X Server Render Extension AllocateGlyph() Integer Overflow Vulnerability
- iDefense 719: Multiple Vendor X Server Render Extension ProcRenderCreateCursor() Integer Overflow Vulnerability
- iDefense 720: Multiple Vendor X Server Render Extension Gradient Creation Integer Overflow Vulnerability
- iDefense 721: Multiple Vendor X Server Record and Security Extensions Multiple Memory Corruption Vulnerabilities
- iDefense 722: Multiple Vendor X Server MIT-SHM Extension Information Disclosure Vulnerability
Sun has released a Security Sun Alert for the X server versions in Solaris 8, 9, 10 and OpenSolaris 2008.05 at:
Preliminary T-patches are available for Solaris 8, 9, and 10 from the locations shown in the Sun Alert - these are not fully tested yet (hence the "T" in T-patch).
The fix for these issues has integrated into the X gate for Nevada in Nevada build 92, so users of SXCE or SXDE will get the fixes by upgrading to SXCE build 92 when it becomes available (probably in 3-4 weeks, though the first week of July is traditionally a holiday week in Sun's US offices, so may affect availability).
Fixes for OpenSolaris 2008.05 users following the development build trains will be available when the Nevada 92 packages are pushed to the pkg.opensolaris.org repo (also probably in about 3 weeks from now).
Fixes are planned for OpenSolaris 2008.05 users staying on the stable branch (i.e. nv_86 equivalent), but I do not have information yet on how or when those will be available.
Fixes for users building X from the OpenSolaris sources are currently available in the Mercurial repository of the FOX project in open-src/xserver/xorg/6683567.patch.
For users of all OS versions, the best defenses against this class of attacks is to never, ever, ever run “xhost +”, and if possible, to run X with incoming TCP connections disabled, since if the attacker can't connect to your X server in the first place, they can't cause the X server to parse the protocol stream incorrectly. This is not a complete defense, as anyone who can connect to the Xserver can still exploit it, so if you're in a situation where the X users don't have root access it won't protect you from them, but it is a strong first line of defense against attacks from other machines on the network.
Releases based on the Solaris Nevada train (including OpenSolaris & Solaris Express), default to “Secure by Default” mode, which disables incoming TCP connections to the X server. Current Solaris 10 releases offer to set the Secure by Default mode at install time. On both Solaris 10 & Nevada, the netservices command may be used to change the Secure by Default settings for all services, or the svccfg command may be used to disable listening for TCP connections for just X by running:
svccfg -s svc:/application/x11/x11-server setprop options/tcp_listen=false
and then restarting the X server (logout of your desktop session and log back in).
On older releases, the “-nolisten tcp” flag may be appended to the X server command line in /etc/dt/config/Xservers (copied from /usr/dt/config/Xservers if it doesn't exist) or in whatever other method is being used to start the X server.
See the Sun Alert for other prevention methods, such as disabling the vulnerable extensions if your applications can run effectively without them.
Posted at 09:30AM Jun 14, 2008 by Alan Coopersmith in X11 | Comments[2]
Too many dry eyes in the house
I've been falling further and further behind on blogging for a while - maybe I'll catch up someday with the cache of posts I have stored in my brain half written (there's a new issue of the X11 DTrace companion, a post on the recent X server security fixes and MIT-SHM regression they introduced, several posts for the OpenSolaris elections which are too late now, and a post or two on X in Indiana bouncing around in there).
This post on the other hand, may actually be early, since Sjögren's Syndrome Awareness Month isn't until April, but I'm posting now since the 2008 Salt Lake City Sjögren's Walkabout is this coming Saturday, March 29, 2008. My mother is one of the organizers, and my sister was going to be one of the walkers until she broke her leg last month. I'm still pledging money to the Sjögren's Syndrome Foundation for both of them though.
For those who haven't heard of Sjögren's — and that included me a few years ago — the About.com article What is Sjögren's Syndrome? and the Wikipedia page on Sjögren's Syndrome can tell you far more than I can. If you're a female who has been noticing problems with dry eyes or mouth, or you know one, you probably want to read more about it, as those can be early symptoms of something far more serious. The foundation estimates 4 million Americans suffer from the disease, and that women are approximately 90% of those.
Even as widespread as that is, it still sounds like one of the random auto-immune disorders they throw out every week on an episode of House and then rule out and you never hear of again. For my wife and I though, it became a permanent part of our lives several years ago when coincidentally both my mother and my wife's mother were diagnosed with it, and they became active in trying to raise awareness of the syndrome in their communities (as you can see in those two articles).
While they've had to adjust to the dryness in many little ways, such as always carrying a water bottle and really appreciating a gift of saliva-inducing Xylitol gum, the constant tiredness is what has really affected them most. They were both busy professionals (a pediatrician and a dental hygenist), active in professional organizations and volunteering in their communities, but have had to cut back as they just didn't have the energy to keep doing it all any more.
Our bodies are mostly water, so you can imagine the problems that happen when various parts start drying up, and that's where the real dangers of the syndrome come in, as the body's immune system starts attacking other systems. While there are treatments available for the effects on some parts of the body, there is no cure, and the Sjögren's Syndrome Foundation is devoted both to research and to spreading the word so that sufferrers can be diagnosed earlier and begin treatments sooner.
So what can you do? If you want to join me in donating, you can do so at either my mom's firstgiving.com page or directly on the foundation's web page. If not, just remember what you've read here the next time you hear a woman near you complain her eyes or mouth are always so much dryer than they used to be and pass it on.
Posted at 01:12PM Mar 26, 2008 by Alan Coopersmith in General |
Stupid nv_74 cursor tricks
For those who have already grabbed Nevada build 74 from the Solaris Express Community Edition downloads, you can try out the new cursor code available with the integration of libXcursor (which most XFree86 and Xorg platforms have had for a while).
If your graphics card supports the Render extension & 32-bit alpha cursors, (i.e. most x86 graphics, but not Sun Rays nor SPARC graphics yet - I've mainly used it on nvidia cards and my laptop with a ATI Radeon chipset), you can see them in action by doing:
% su - # mkdir -p /etc/dt/config/C/ # cat > /etc/dt/config/C/styleModern #include "/usr/dt/config/C/styleModern" Xcursor.theme: whiteglass ^D # exit % echo 'Xcursor.theme: whiteglass' >> ~/.Xresources
and then logout & log back in.
Change 'whiteglass' to 'redglass' in the above if you want something that stands out more.
Posted at 10:50PM Oct 11, 2007 by Alan Coopersmith in X11 |
X Font Server (xfs) Security Hole in Solaris
As noted in the ZDNet posting X Font Server flaw hits Sun Solaris hard, the recently announced X font server vulnerabilities not only affect Solaris, but are exposed to the network by default in some Solaris installs.
What the article fails to mention is that it's only older installs that are vulnerable by default - Solaris versions up through Solaris 10 6/06 run xfs by default from inetd listening to the network. Solaris 10 11/06 and later Solaris 10 releases ask you at install time if you want your network services to default to being open or closed. Solaris Nevada/Express just closes them all by default and requires you to turn back on the ones you want. (These changes came from the Solaris Secure by Default project, which has more information on its project pages.)
Our sustaining teams are producing patches and a Sun Alert covering this issue, but until then, if you don't need the X font server (on Solaris it's really only used for remote desktop sessions from computers without the standard Solaris fonts already installed - unlike some Linux'es, local sessions don't use it), you can easily turn it off in several ways:
- On all Solaris releases: “
/usr/openwin/bin/fsadmin -d”, which will either break the link that inetd uses (Solaris 2.6-Solaris 9) or use inetadm to disable thesvc:/application/x11/xfsservice (Solaris 10 & later). - On Solaris 10 and later, you can do the same thing explicitly with “
/usr/sbin/inetadm -d svc:/application/x11/xfs:default”. - On Solaris 2.6 through 9, you can do the traditional editing of
/etc/inetd.confto disable it, then “pkill -HUP inetd”. - If you'll never need it, and want to be sure it's gone, remove the xfs package with “
pkgrm SUNWxwfs”.
Update: Oops, had a typo in one of the instructions above - should have been “pkill -HUP inetd”, not kill. Also, as Paul noted in the comments
the Sun Alert is now published, with interim fixes soon to follow, at http://sunsolve.sun.com/search/document.do?assetkey=1-26-103114-1.
Posted at 10:54AM Oct 08, 2007 by Alan Coopersmith in Solaris | Comments[3]
Happy Belated Birthday X11!
Just noticed that according to Wikipedia's X Window System Release History, X11 was first released on September 15, 1987 - 20 years old and I didn't even remember to get a birthday card...
Posted at 09:59AM Sep 27, 2007 by Alan Coopersmith in X11 | Comments[3]
Silicon Valley OpenSolaris User's Group tonight: Solaris Desktop Update
Somehow our quick demo of compiz for the user group meeting tonight in San Jose turned into a full evening on X and the desktop in Solaris. Stuart and I whipped together some slides today, and have demos of both compiz and RandR 1.2 ready to go on a Toshiba Tecra M8 laptop with i945 graphics (which means it will indirectly be demoing DRI for i945 as well). For those who can't make it, the slides are here and call in numbers are on Alan Duboff's blog. For those who can make it, his blog also has the appropriate details on time and place.
Posted at 06:25PM Aug 23, 2007 by Alan Coopersmith in Solaris | Comments[2]
OpenSolaris and X: Year 2
I'm a bit late this year - it's now a year and a week since I posted One Year of OpenSolaris and X, and it's been a busy time.
Unfortunately, I can't say that we've released lots more code than in our first year - there's still many client applications and libraries that need to be migrated to the X.Org versions - but we have moved the source base for what we've released from the Imake-built X11R6.9 monolithic source tree to source modules from the X11R7.2 release. With the 7.2 move, we also grew the set of servers delivered from the current X.Org sources from just a 32-bit x86 Xorg by adding 64-bit Xorg servers on both SPARC and x64, as well as the Xephyr nested server and Xvfb virtual frame buffer on both platforms.
Sun's China team integrated DRI support for Intel i845 through i945 graphics, with i965 coming soon. We've also added libraries from X.Org that we hadn't shipped before, including libXcomposite and libXinerama.
Work continues on converting the rest, and may pick up with some community members joining in. The OpenSolaris X community has been discussing a proposal to create a common source repository merging the X efforts of the Solaris Express, Belenix, and marTux distributions. Martin Bochnig has been working for a while on marTux, an OpenSolaris distro for SPARC - and the only one with open source SPARC Xorg drivers he's put a lot of effort into making work well on OpenSolaris. And in April, Moinak Ghosh announced he'd taken our code drops and packaging and filled in the rest of the X11R7.2 sources. By merging these, we hope to keep all distributions better aligned and make it easier for us to work together on the missing pieces.
What else are we working on? Well, like last year, the OpenSolaris suspend-and-resume team is still hard at work making their code as rock-solid as they can, including the graphics support in Xorg. We're looking at the best way to integrate Xvnc into our code base in support of the OpenSolaris Xen work. And of course, we've been playing with the projects now known as “Compiz Fusion”, using the builds from Erwann in the Desktop group, so that maybe by the time I write next year's entry, you will have a Solaris desktop option that looks a bit like this.
Posted at 11:49PM Jun 22, 2007 by Alan Coopersmith in Solaris | Comments[2]
OpenSolaris Second Anniversary
Last year at the first anniversary of the OpenSolaris launch, they held a home page graphics contest to pick a graphic for the home page. Today is the second anniversary, and I didn't see a contest this year, but I have an entry anyway, suggested by conversation yesterday on the #opensolaris channel on freenode...it's hip, modern, Web 2.0, in sync with the stuff all over the Intertubes, fully overblown meme compliant:
(with apologies in advance to pretty much the entire Internet)
Posted at 04:32PM Jun 14, 2007 by Alan Coopersmith in Solaris | Comments[2]
Xorg 7.2 Solaris status update
It's been a while since I've given an update on our Xorg 7.2 state in Solaris and OpenSolaris, and I was reminded by a new patch release today. For a summary of the new features included, and some bugs in the initial Nevada builds, see the Heads Up: Xorg 7.2 in Nevada build 58 message I sent to the OpenSolaris xwin-discuss list in February.
Besides the original release in Solaris Express: Community Edition and the OpenSolaris sources, Xorg 7.2 is now also available in:
- Solaris 10 x86/x64 with Patch 125720-01 or later
- Solaris 10 7/07 Beta and later
- Solaris Express Developer Edition: 5/07 and later
For those on Solaris 10 with an older patch release, or the Solaris 10 7/07 Beta, patch 125720-08 was released today, which fixes several issues reported by early users, including:
- A number of problems with auto-configuration of screen resolution
- Xephyr's Caps Lock not being unlockable (bug 6539225)
- A memory leak every time an X client connection was closed (6533650)
- Crashes or failures using TrueType fonts in 64-bit Xorg servers (6535518)
- xorgconfig listing the wrong keyboard driver in generated xorg.conf files (6559079)
- Xorg -configure not including the bitstream TrueType font module in generated xorg.conf files (6546692)
Also included in the patch are:
- A new version 2.0.2 of the “nv” open source driver for nVidia cards which adds support for the first set of GeForce 8000 series cards, though you can also get the updated nvidia closed-source/accelerated driver to support them as well. (A slightly older version of the nVidia closed driver is included in Solaris 10 7/07 already.)
- Security fixes for two reported vulnerabilities: X Render Trapezoid divide-by-zero and XC-MISC memory corruption.
- An update to the Radeon driver to check if you've plugged in an external monitor on your laptop (at least on Ferrari 3400's) when you run xrandr, and if so, activate the external display port without having to restart X. (A small step towards the more general and complete solution coming with X Resize-and-Rotate 1.2.)
There's a few more fixes in progress still (the -09 rev of the Solaris 10 patch is in QA now, and there will of course be more revisions in the future), including:
- Fixing glxgears and glxinfo linking so they run (6560568)
- Allowing Xorg to start with an old xorg.conf listing the "Keyboard" driver (capitalized) (6560332 - if you have this problem now, just change the driver name to "kbd" in your xorg.conf)
- Adding the VMWare mouse driver, vmmouse_drv.so (6559114)
- Fixing Xorg -configure in the 64-bit Xorg (6556115)
- Making Xv playback work again in the ATI Radeon driver (6564910)
- Making xorgcfg work again ( 6563653)
but the current state should be fairly usable by most people as it is today.
For those using Solaris Express/Nevada releases, or OpenSolaris sources, you can see which build the above changes went in at the X ChangeLogs page. (Solaris Express Developer Edition 5/07 corresponds to build 64 in that list.)
Posted at 07:43PM Jun 13, 2007 by Alan Coopersmith in X11 |
Removing XInitThreads from Totem
Bastien, you're not alone. If the JDS team complained to even Sun's X11 team about bugs after they applied that Totem patch, we'd tell them they're on their own and we'd never support an application that called X from multiple threads without calling XInitThreads first.
The Solaris Xlib is thread safe (though probably with a few bugs in corner cases still) based on the same X11R6 multi-thread code as everyone else, though we're currently working to reconcile the fixes from our fork with the current X.Org code as part of our ongoing project to un-fork Solaris X11 and bring it back to the X.Org code base. We're also looking at XCB in the future for a cleaner thread-safety model as well.
Update: As noted by trisk in the comments, this seems to have been caused by known Solaris libXi bug 6551484 - the engineer who had removed XInitThreads() from totem tried the test binary produced by the engineer working on the libXi bug and found it solved the hang problem she was seeing.
Posted at 09:40AM Jun 13, 2007 by Alan Coopersmith in X11 | Comments[1]
The Irregular X11 DTrace Companion: Issue 2
In response to a Solaris 10 7/07 beta tester question last week, I updated the Xserver provider for DTrace web page to point out that besides the original method of patching the Xorg sources and rebuilding, pre-built binaries are now included directly in Solaris...
Getting an X server with DTrace probes built in
The Xserver dtrace providers are now included in the regular X server binaries (including Xorg, Xsun, Xvfb, Xephyr, Xnest, & Xprt) in recent Solaris releases, including:
- Solaris 10 with these patches:
- 119059-24 or later: Xsun, Xprt, Xvfb on SPARC
- 119060-23 or later: Xsun, Xprt, Xvfb on x86/x64
- 118966-26 or later: Xorg 6.9 on x86/x64
- 125720-01 or later: Xorg 7.2, Xephyr on x86/x64
- Solaris 10 7/07 Beta and later
- Solaris Express Community Edition: Nevada Build 53 and later
- Solaris Express Developer Edition: 2/07 and later
For those who still want to build from source, the provider is integrated into the X.Org git master repository for the Xserver 1.4 release, planned to be released in August 2007 with X11R7.3, and into the OpenSolaris X code base for Nevada builds 53 and later.
Posted at 07:12PM Jun 11, 2007 by Alan Coopersmith in X11 |
Kinda like microblogging meets slow-mo IRC...
I was trying to explain twitter to my wife and the best I could come up with is “kinda like microblogging meets slow-mo IRC,” which didn't make any sense to her. After a bit more trying, “like a web forum with short posts” made more sense to her, but my personal dislike of web forums kept me from thinking of them like that. Fortunately more prolific and more widely read bloggers than I have spent a lot of time describing twitter and it's impact, so you can go read them for a better description.
Twitter is starting to gain popularity at Sun too, both as a new communications method to explore, and as a Solaris-hosted Web 2.0 service. They even have recently been a example of using DTrace to improve the performance of their Ruby-on-Rails platform.
So now you can also find me at http://twitter.com/alanc
. I can't promise anything profound or in-depth in 140 characters, but it should get updated a bit more often than this long-form blog.
Posted at 10:23PM Jun 10, 2007 by Alan Coopersmith in General |
The Irregular X11 DTrace Companion: Issue 1
All the cool kids are doing unscheduled update newsletters now, and I had a collection of X11 Dtrace things to post about piling up, so I figured I'd give it a whirl. (BTW, Nouveau guys - I'd read yours more if you had an RSS feed - having to go check the wiki on an irregular basis doesn't work so well.)
Doing newsletters on a regular basis is hard, as Glynn has learned, so don't expect updates too often...
Sample script for tracing events
Jeremy asked recently for an example DTrace script using the event probes in the Xserver DTrace provider. I had lost the ones I wrote when developing/testing that probe, but dug one out of my e-mail that was written by DTrace Master Guru Bryan Cantrill and posted it as ButtonPress-events.d.
He wrote this script when he'd upgraded to Nevada build 58 and found shift-click was no longer working. Using the script he was able to show that the Xserver was sending ButtonPress events without the ShiftMask set. I wrote a corresponding script to decode the VUID events the X server was getting from the kernel mouse and keyboard drivers to determine the keyboard wasn't giving us the shift key pressed events until another key was pressed, which wasn't happening for shift-clicks with the mouse. That script can be seen in the bug report I filed with the kernel keyboard team as Solaris bug 6526932.
Using DTrace to win a race
A bug was filed with X.Org recently stating “iceauth can dump a core in auth_initialize() if a signal is caught before iceauth_filename has been malloced.” As I was fixing bugs in iceauth anyway, I figured I'd look at it to see if I could roll in a fix to the new iceauth release I'd be making for those. Fortunately, iceauth is a small program, and I could see where I thought the race condition lied between the main code and the signal handler. Testing any race condition has always been a pain in the past, since if you don't get the timing just right you don't know if you really fixed it, or just changed the timing enough to not hit it.
So I pulled up the DTrace manual and DTrace wiki and created a one-liner to force the race condition by sending the signal when I knew it was in the right spot:
# dtrace -w -c ./iceauth -n 'pid$target::IceLockAuthFile:return { raise(1); }'
For those who haven't memorized the DTrace manual, this can be broken down as:
- -w - allows “destructive” actions - i.e. those that change the running of the program, and don't just monitor it - in this case, allows sending a signal to the process
- -c ./iceauth - specifies the command to run with this script, and puts the process id of the command in $target in the script
- pid$target::IceLockAuthFile:return - sets the probe we're looking for to be the return from any call to the function IceLockAuthFile in the process matching the pid $target
- { raise(1); } - sets the action to be run when that probe is hit to send signal 1 (aka SIGHUP) to the target process
Ran that and a few seconds later had a nice core file to verify where the race was. Turned out I was right about where the signal had to come in for the race to cause a crash, but was slightly off about the point in the signal handler where it was crashing. The fix was easy, and thanks to DTrace, easy to verify, and is now in X.Org's git repository.
DTrace Wiki: Topics: X
After last month's Silicon Valley OpenSolaris User Group meeting, Brendan asked if I'd work on the “X” topic on the DTrace Wiki. I agreed to, and have put up a small placeholder while I figure out what to flesh it out with - if you have any suggestions or requests for what you'ld like to see in a short introductory article to using DTrace to probe X, especially using, but not limited to, the Xserver DTrace provider, send me e-mail or leave a comment here.
Posted at 11:36AM May 17, 2007 by Alan Coopersmith in X11 | Comments[2]
3 years and still blogging...
Other Sun bloggers have been posting since Friday about the third anniversary of blogs.sun.com. Dilbert even had a very timely series of comics.
Today is actually the third anniversary of my first public blog post (though as you can see, I later migrated some earlier posts from my now abandoned internal blog to it), as I was traveling to the first X.Org Developer's Conference on the day of the initial launch, but signed up once I was there (back when signing up was simply e-mailing Will Snow to ask for an account), and started posting from there.
In my first post, I worried I wouldn't be able to find enough things to blog about - now I know I have too much to blog about, and time to write it all up is the limit - I was posting the changes in each Solaris Express release for a while, and more recently, the X ChangeLogs for each Solaris Nevada build, but both fell behind after a few months. I've got a list of links to other blogs and interesting sites that I want to post that keeps growing longer and longer as I fail to take enough time to post them here. I wasn't sure I would even get this post done during the b.s.c birthday celebration.
As some of the other bloggers mentioned, the effect has gone beyond just providing a way for any employee to post - the company's culture has changed. No longer do we complain about hearing about new announcements first in the press - blogs are now considered a crucial part of many announcement plans, especially around OpenSolaris, and bloggers are briefed in advance. I joked with Ben Rockwood at the SVOSUG last week about how much he's been yanking Sun's chain lately - how long ago would it be unimaginable that the CEO, VP's and Chief Architect get personally involved when a sysadmin at a startup complained about issues with Sun?
So much change in 3 short years - who knows where the next years will lead us?
Posted at 11:50PM Apr 29, 2007 by Alan Coopersmith in Sun |


