Skip to content

patchadd: Not enough space in /var/run to copy overlay objects.

When pca wanted to install 144500-19, patchadd aborted with:
Running patchadd
Validating patches...
Loading patches installed on the system...
Loading patches requested to install.
Checking patches that you specified for installation.

Unable to install patch. Not enough space in /var/run to copy overlay objects.
 401MB needed, 220MB available.

Failed (exit code 1)
Well, this Sun Enterprise 250 only has 768 MB memory, not too much in these days. Let's add some virtual memory then:
# mkfile 1g /var/tmp/swap.tmp
# swap -a /var/tmp/swap.tmp
/var/tmp/swap.tmp: Invalid operation for this filesystem type
Oh, right - we're on ZFS already. Let's try again:
# rm /var/tmp/swap.tmp
# zfs create -V 1gb rpool/tmpswap
# swap -a /dev/zvol/dsk/rpool/tmpswap
# df -h /var/run
Filesystem             size   used  avail capacity  Mounted on
swap                   1.4G   107M   1.3G     8%    /var/run
Now we should be good to go :-)

Oh, and regarding those "overlay objects in /var/run" mentioned above: once patchadd(1M) is running, take a look:
# df -h | grep -c /var/run

VirtualBox & SysRq

Sometimes I need to send sysrq keys to a Linux virtual machine and I always forget how to do this, so here it is:
VBoxManage controlvm <VM> keyboardputscancode 1d 38 54 <PRESS> <RELEASE> d4 b8 9d
The PRESS and RELEASE values are derived from the scancodes: The PRESS value is the bare scancode, the RELEASE value is the PRESS value plus 0x80.

So, to send a "s" (to Sync the filesystems), the scancode would be 0x1F. And 0x1F + 0x80 equals 9F, this would be the scancode for releasing the key. Putting this all together, sending sysrq-s to the virtual machine goes like this:
VBoxManage controlvm <VM> keyboardputscancode 1D 38 54 1F 9F D4 B8 9D
Note: Be sure to set kernel.sysrq = 1 in your Linux guest machine, so that sysrq-keycodes are actually honored by the guest.

This can also be used to switch to a different terminal (if you have a VirtualBox console window open):
VBoxManage controlvm <VM> keyboardputscancode 1d 38 3b
This is the equivalent to Ctrl-Alt-F1 and would switch to the first terminal. Iterate 0x3b up to 0x42 to switch up to Ctrl-Alt-F8.

Update: I finally released the wrapper script to send sysrq keycodes to a VirtualBox VM.

Error: Protected multilib versions

Did I say that I don't like yum? I think I did and others did, too.

So this yum upgrade failed due to insufficient diskspace and yum exited with:
/usr/sbin/build-locale-archive: cannot add to locale archive: No such file or directory
could not write to ts_done file: [Errno 28] No space left on device
Error unpacking rpm package imsettings-libs-1.2.6-1.fc16.x86_64
error: gtk2-2.24.8-2.fc16.x86_64: install failed
error: unpacking of archive failed on file \
  /usr/lib64/;4ed44d97: cpio: write
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/yum/", line 444, in callback
    self._instCloseFile(  bytes, total, h )
  File "/usr/lib/python2.7/site-packages/yum/", line 507, in _instCloseFile
  File "/usr/lib/python2.7/site-packages/yum/", line 246, in _scriptout
    self.base.history.log_scriptlet_output(data, msgs)
  File "/usr/lib/python2.7/site-packages/yum/", line 871, in log_scriptlet_output
  File "/usr/lib/python2.7/site-packages/yum/", line 640, in _commit
    return self._conn.commit()
sqlite3.OperationalError: database or disk is full
error: python callback > failed, aborting!
OK, no big deal. Just resized the root partition so that enough space is available now and try again:
$ yum upgrade
There are unfinished transactions remaining. You might consider running \
yum-complete-transaction first to finish them.
Error: Protected multilib versions: glibc-2.14.90-19.x86_64 != glibc-2.14.90-14.i686
This didn't go so well. Let's try yum-complete-transaction then, as suggested:
$ yum-complete-transaction
Loaded plugins: langpacks, presto, refresh-packagekit
There are 1 outstanding transactions to complete. Finishing the most recent one
The remaining transaction had 87 elements left to run
Package glibc-common-2.14.90-19.x86_64 already installed and latest version
--> Processing Dependency: for package: elfutils-0.152-1.fc16.x86_64
--> Processing Dependency: /bin/sh for package: kernel-3.1.2-1.fc16.x86_64
This goes on for quite a while, hours even. I went to bed at this time, only to see the next morning that yum got killed by the out-of-memory killer:
Out of memory: Kill process 1457 (yum-complete-tr) score 782 or sacrifice child
Killed process 1457 (yum-complete-tr) total-vm:1643616kB, anon-rss:830884kB, file-rss:0kB
The VM has 1 GB RAM and 512 MB swap - not too much, but certainly enough for doing an upgrade, I assumed. OK, so how to go on from here? With yum-complete-transaction failing, I decided to cleanup any old transactions and start from scratch:
$ yum-complete-transaction --cleanup-only
Cleaning up unfinished transaction journals
$ yum-complete-transaction
No unfinished transactions left.
But now the upgrade would stop with:
$ yum upgrade
Error: Protected multilib versions: glibc-2.14.90-19.x86_64 != glibc-2.14.90-14.i686
Using --setopt=protected_multilib=false (and --skip-broken) brought us only little further:
$ yum upgrade --setopt=protected_multilib=false --skip-broken
Transaction Check Error:
  file /usr/share/doc/glibc-2.14.90/NEWS conflicts between attempted
  installs of glibc-2.14.90-14.i686 and glibc-2.14.90-19.x86_64
Moving /usr/share/doc/glibc-2.14.90/NEWS out of the way did not help in this case. What did help was to "remove" the conflicting package from the package database. Of course, we could not really delete glibc, since it's needed for pretty much everything:
$ rpm --erase --nodeps --noscripts --justdb glibc-2.14.90-14.x86_64
$ yum upgrade --setopt=protected_multilib=false --skip-broken
This went through successfully and the system is now properly updated and even survived a reboot. Just in case that it's still not clear from these notes: I find it unacceptable that yum is having such a hard time finding out how to do the Right ThingTM after a failed transaction. And yes, I've been using apt-get for years now - never had anything remotely similar to this mess. Incredible, I cannot understand how people can work with that. I mean, really work. I'm using Fedora only for playing around and while I really like some of the approaches Fedora is going for, this yum crap is a major show stopper for me to ever adopt any rpm-based distribution. I'd rather do ports :-\

Oh, apparently there's still one thing left to clean up:
$ yum check
Loaded plugins: changelog, langpacks, presto, refresh-packagekit
glibc-common-2.14.90-14.x86_64 has missing requires of glibc = ('0', '2.14.90', '14')
glibc-common-2.14.90-19.x86_64 is a duplicate with glibc-common-2.14.90-14.x86_64
In my case, "package-cleanup --cleandupes" solved this one. Sigh...