X

Solaris 11.3: Optimized Shared Memory (OSM)

One of the new features in Solaris 11.3 is Optimized Shared Memory (OSM), which is a new mode for System V shared memory designed to marry the best parts of Intimate Shared Memory (ISM) and Dynamic Intimate Shared Memory (DISM). OSM has been a private feature in Solaris since Solaris 11 and Solaris 10 update 11, but the interfaces were not documented outside of Oracle. The only consumer has been the Oracle Database, which uses OSM instead of DISM from Oracle 12c onwards.[1] In...

Tuesday, July 7, 2015 | Solaris | Read More

::stacks

Over a decade ago in 2000, David Powell used his intimate knowledge of sed(1) to write a shell script called munges, which entered the muscle memory of most of the Solaris Kernel Development staff. Short for munge stacks, it takes the output of ::walk thread | ::findstack, and groups the stacks by stack trace: > ::walk thread | ::findstack !/home/dep/bin/munges743 ################################## tp: 2a100007c80 taskq_thread_wait+0x38() ...

Monday, March 14, 2011 | Solaris | Read More

Debugging with libumem and MDB

In celebration of OpenSolaris's birthday, I thought I would do some more blogging about libumem, one of my favorite parts of it. In particular, I'll cover some of its debugging features, which borrow heavily from the kmem dcmds and walkers written by href="/bmc">Bryan, Dan, and others. Much of the debugging power of libumem comes from its mdb(1M) debugger module. Anyone familiar with the kmem dcmds used for kernel debugging will see alot of similarities (modulo some 'u's where...

Wednesday, June 14, 2006 | Solaris | Read More

Some block comments about libumem

One of the projects I've been working on recently is a wad covering the following bugs: 4720206 ::findleaks shouldn't cache results across state changes4743353 libumem's module fails to load on idle targets 6304072 libumem seems to use more heap than it needs6336202 d4fc7824::typegraph made mdb crash As part of it, I made some ASCII-art comments describing the layout of a umem buffer and slab, which I thought might be of interest more generally. Here are the block comments: /...

Tuesday, February 21, 2006 | Solaris | Read More

Coverage testing

A couple years back, I wrote up a description of how to use the Sun Studio compiler's coverage testing features to test userland code. Now that OpenSolaris is here, I thought it might come in handy for a larger audience. Here's goes: How do I do coverage analysis on my user-level code? The Sun Workshop compilers we use have some pretty good profiling and test analysis tools built in to them. One of the more useful foruser-space code is Coverage Analysis, which gives you a...

Wednesday, November 23, 2005 | Solaris | Read More

An initial encounter with ZFS

After ZFS became available in onnv_27, I immediately upgraded my desktop system to the newly minted bits. After some initial setup, I've been happily using ZFS for all of my non-root, non-NFSed data. I'm getting about 1.7x my storage due to ZFS's compression, and have new-found safety, since my data is now mirrored. During the initial setup, my intent was to use only the slices I'd already set up to do the transfer. What I did not plan for was the fact that ZFSdoes not...

Wednesday, November 16, 2005 | Solaris | Read More

Brokenness Hides Itself

When engineers get together and talk, one of the things they like to bring out and share is war stories; tales of debugging daring-do and the amazing brokenness that can be found in the process. I recently went through an experience that makes good war story material, and I thought I'd share it. A couple weeks ago, there were multiple reports of svc.configd(1M) failing repeatedly with one of:svc.configd: Fatal error: invalid integer "10" in field "id"svc.configd: Fatal error:...

Wednesday, September 28, 2005 | Solaris | Read More

The FBT provider, opensolaris source, and fun with the environment

The FBT provider, opensolaris source, and fun with the environment Now that opensolaris is out there, it's quite a bit easier for folks to use DTrace's FBT provider. FBT provides "function boundary tracing", i.e. it has probes for the entry and exit for almost every function in the kernel. This is amazingly powerful and flexible, but it leads to it being hard to use: with over 20,000 functions on a typical Solaris box, it's very hardto know where to start, especially without...

Thursday, June 30, 2005 | Solaris | Read More

macros and powers of two

Unlike many userland applications, there are large portions of the kernel that need to do bit-level manipulations. These generally fall into a few distinct areas: Drivers communicating with hardware Hash functions, bitmasks, and other high-performance algorithms Memory allocators, page manipulators, etc. In this note, I'm going to peek into the last group, which typically needs to do a lot of power-of-2 based alignment work, and lookat a set of macros used to abstract away some...

Wednesday, June 15, 2005 | Solaris | Read More

The implementation of ::findleaks

Now that OpenSolaris is available, it's time to explain how it all works. I thought I'd start with some of the mdb(1) dcmds I've worked on, since they are relatively self-contained, and have very strong interface boundaries. I'll start with my favorite dcmd, ::findleaks, a memory leak detector originally written by Bryan Cantrill, which I re-factored substantially late in Solaris 10. There were a few reasons the refactoring was necessary: When I'd done the original ::findleaks ...

Tuesday, June 14, 2005 | Solaris | Read More

Debugging smf(5)-managed processes

Recently, I've seen a couple questions (internally and externally) about the best way to debug something controlled by smf(5); since the process isn't started up directly, the usual ways of running things under a debugger aren't effective. If you don't need to debug the initialization process, it's also easy; just attach the debugger after the daemon is running. If you need to debug the initialization, however, you need some way to stop the process before it does so. The...

Thursday, May 19, 2005 | Solaris | Read More

mdb(1) background, intro, and cheatsheet

In the Solaris kernel group, we take our crash dumps seriously. Historically, the two main tools for analyzing crash dumps on UNIX wereadb(1) andcrash(1M). More recently,mdb(1) has replaced them both as the debugger of choice in Solaris. adb(1) adb(1) is a venerable tool in the UNIX tool chest -- 7th Edition UNIX (from 1979) had a version of it. It's syntax is quite quirky (as you'd expect from such an old tool), and one thing to keep in mind is that adb(1) is an assembly-lev...

Thursday, October 7, 2004 | Solaris | Read More