Saturday, January 12, 2008

lucreate can screw your libc

I bet there are plenty of people using Solaris Live Upgrade facility. So am I for more than 5 years. I thought the procedure is well tested and bullet proof. Nonetheless, I recently trip over quite an amusing bug in lucreate/lumake. Well, actually it is in /usr/lib/lu/lucopy, which is called internally during Boot Environment (BE) population.

Let's see the problem:


zero:/root# uname -a
SunOS zero 5.11 snv_78 i86pc i386 i86pc



zero:/root# lucreate -n busted_libc -m /:c1d0s5:ufs
Discovering physical storage devices
Discovering logical storage devices
Cross referencing storage devices with boot environment configurations
Determining types of file systems supported
Validating file system requests
The device name expands to device path

...

Creating compare databases for boot environment .
Creating compare database for file system .
Updating compare databases on boot environment .
Updating compare databases on boot environment .
Updating compare databases on boot environment .
Making boot environment bootable.
Updating bootenv.rc on ABE .
Population of boot environment successful.
Creation of boot environment successful.
zero:/root#



Ok, after fresh copy is created one would expect all the files to be the same, right ? Wrong !



zero:/root# lucompare -i /tmp/aa busted_libc
Determining the configuration of busted_libc ...

< snv_78
> busted_libc


Processing Global Zone
Comparing / ...

...

Links, Sizes differ
01 < /usr/lib/libc/libc_hwcap1.so.1:root:bin:1:33261:REGFIL:1662276:
02 > /usr/lib/libc/libc_hwcap1.so.1:root:bin:2:33261:REGFIL:1653812:

...

zero:/root#


What ? /usr/lib/libc/libc_hwcap1.so.1 is different ??? How can that be ?

At first glance it seems to be absurd. One would understand if /lib/libc.so.1 would be different, if during copy they forget to umount it. (/libc/libc.so.1 is mounted during boot on one of the hardware specific versions from /usr/lib/libc). Something must be really wrong here. Where are the Live Upgrade sources ?

Unfortunately Live Upgrade suite is not open source and, probably, never will be. However, clever observer may notice that most of the LU files are, in fact, shell scripts. Fortunately for us the problematic file is script as well.

Looking at /usr/lib/lu/lucopy near line 1266 one can notice that there seems to be correct handling of the mounted /lib/libc.so.1. The caveat here is that at this moment both /lib/libc.so.1 and /usr/lib/libc/libc_hwcapX.so.1 are linked to each other !!!

It turns out that cpio that copied over all the content of the original BE to the new BE was smart enought to notice that both files have same inode number and re-created that on new BE. Now, when lucopy thinks that it only copies generic libc.so.1 it also inadvertently overwrites the hardware specific one !

Ok, we see the problem, but is there any workaround ? One simple way to avoid trashing libc_hwcapX.so.1 would be to unlink the new /lib/libc.so.1 right before copying. That way we will never harm any other file that could be linked to it.



--- lucopy Thu Nov 15 23:44:28 2007
+++ lucopy.new Fri Jan 11 22:01:13 2008
@@ -1273,6 +1273,7 @@
# inside a shared file system. In that case, we needn't update
# anything and we thus ignore errors.
/usr/sbin/umount $mountpoint && (
+ /bin/rm -f "$dest$mountpoint" > /dev/null 2>&1
$CP_CMD $mountpoint "$dest$mountpoint" 2>/dev/null
/usr/sbin/mount -OF $fstype $special $mountpoint
)


Another lucreate/lucompare cycle and now /usr/lib/libc/libc_hwcap1.so.1 looks perfectly fine.

Wednesday, November 21, 2007

Solaris Express b77 is out !

SXCE b77, aka Nevada build 77, aka snv_77 was just released to the download servers

It brings quite a few long-awaited goodies


system SUNWcpr.i Suspend, Resume package
system SUNWisns Solaris iSNS Server
system SUNWisnsadm Solaris iSNS Server CLI
system SUNWisnsr Solaris iSNS Server (Root)
system SUNWmgts Trusted Extensions, SMC
system SUNWsmbskr SMB Server (Kernel)
system SUNWsmbsr SMB Server (Root)
system SUNWsmbsu SMB Server (Usr)
system SUNWsquidr Squid Web Proxy Cache (root)
system SUNWsquidu Squid Web Proxy Cache (usr)
application SUNWtsmc Trusted Extensions SMC Server


Suspend-to-RAM, native in-kernel CIFS server and Squid are among them

Technorati Tags: ,

Thursday, July 12, 2007

SXCE b68 is out

Solaris Express Community Edition b68 just hit the download servers. It brings a number of previously unbundled software packages into Solaris.


system SUNWiir Sun StorageTek Availability Suite Point-In-Time Copy (root)
system SUNWiiu Sun StorageTek Availability Suite Point-In-Time Copy (usr)
application SUNWjavadb-client Java DB client
application SUNWjavadb-common Java DB common files
application SUNWjavadb-core Java DB core
application SUNWjavadb-demo Java DB demo
application SUNWjavadb-docs Java DB documentation
application SUNWjavadb-javadoc Java DB javadoc
system SUNWlocalecreator Locale Creator Tool
system SUNWrdcr Sun StorageTek Availability Suite Remote Mirror (root)
system SUNWrdcu Sun StorageTek Availability Suite Remote Mirror (usr)
system SUNWscmr Sun StorageTek Availability Suite Cache Management (root)
system SUNWscmu Sun StorageTek Availability Suite Cache Management (usr)
system SUNWspsvr Sun StorageTek Availability Suite Volume Driver (root)
system SUNWspsvu Sun StorageTek Availability Suite Volume Driver (usr)



Technorati Tags: ,

Thursday, December 28, 2006

The era of DTrace

The kernel debug printf thread discussed recently on opensolaris-code forum raised interesting things. Inspired by Mike Shapiro mail I started to rework all my DEBUG cmn_err() in the Bluetooth prototype into DTRACE_PROBEn() calls. At some point I realized that there is no need for DTRACE_PROBEn() calls at all. Exactly like Mike suggested - all the necessary data processing can and should be done externally in the accompanying D-script. I have to admit it was quite a revelation for me. I think only now I start to comprehend the real power of DTrace and I am sure there will be more plesant surprises on the way.

So, good bye cmn_err() - you served me well, but it is a new era of DTrace !


Technorati Tags: , ,

Monday, December 18, 2006

Which repositories are there ?

opensolaris.org lets [OpenSolaris] projects host their repository there. However, there is no easy way to find out which repositories are there. Unless, ofcourse, project leaders announce the repo to some mailing list or so. There is, nonetheless, another way to find all of them - visit root of the OpenSolaris source browser site - it will show you what they've got there in all gory details.



Technorati Tags:



powered by performancing firefox

Sunday, November 19, 2006

SXCR b52 seems to be available

Solaris Nevada (aka SXCR) build 52 seems to be available for download.

Thursday, November 09, 2006

Interesting (and addictive) brain exersize

Got this stuff from a friend. Solving it was a funny experience!

Tuesday, November 07, 2006

SXCR b51 is out

And it brings a bunch of new packages:


system SUNWdrmr DRM Kernel Drivers, (Root)
system SUNWhal Hardware Abstraction Layer
system SUNWhalr Hardware Abstraction Layer (Root)
system SUNWhwdata Hardware data files
system SUNWpolkit PolicyKit
system SUNWpostgr-l10n-jaS Japanese localization source files for PostgreSQL
system SUNWrmvolmgr Removable volume manager
system SUNWrmvolmgrr Removable volume manager (Root)
system SUNWsmedia Storage media management library
system SUNWsmediar Storage media management library (Root)
Go fetch it

Thursday, October 19, 2006

Live ON Mercurial Repository

Great work ! The ON consolidation made another step towards migrating to Mercurial SCM. The live Mercurial mirror of the Internal TeamWare gate is available for [RO] anonymous access at ssh://anon@hg.opensolaris.org/hg/onnv/onnv-gate. Kudos to stevel, dduvall and all the others involved in creating the infrastructure and making it happen !

Wednesday, June 14, 2006

365 days of OpenSolaris uptime

Well, 365 days full of interesting discussions, heated debates, creating a mindshare, forming a community - building OpenSolaris to what it is today. I am very proud to be part of it.

From my part these 365 days were filled (with no particular order) with:

1. Contributing a very first non-Sun bug fix to ON consolidation.

2. Contributing to Polaris project - some may remember a burst of posts this winter in the press on OpenSolaris/PPC kernel being built. While the meaning of this was quite exaggerated by the press it was a big step none the less.

3. Taking care of OpenSolaris Subversion repository.

svn:/export/home/imp> uptime
1:50am up 365 day(s), 3 users, load average: 0.00, 0.00, 0.00
svn:/export/home/imp>


which is breaking a 365 days uptime barrier today together with OpenSolaris !

4. Trying to find time to put more life into Israel OpenSolaris User Group.

Yesterday evening I found that I even was nominated for OpenSolaris Contributor Award!

So, happy birthday OpenSolaris, congratulations to all the community members - everyone of us put something into what we have today, so let's celebrate!

Tuesday, February 14, 2006

After a long wait SXCR b33 is out

After a long wait and very heated discussion on opensolaris-discuss mailing list SXCR b33 is, finally, out.

Update:
Build 33 adds a load of new packages:

application SUNWbregr SCN Basic Registration Application, Root (/)
system SUNWfmdr Fault Management Daemon and Utilities (Root)
EVO146 SUNWgnome-pilot PalmPilot Link Utilities
EVO146 SUNWgnome-pilot-devel PalmPilot Link Utilities - developer files
EVO146 SUNWgnome-pilot-devel-share PalmPilot Link Utilities - developer files - platform independent, /usr/share
EVO146 SUNWgnome-pilot-root PalmPilot Link Utilities - platform independent, / filesystem
EVO146 SUNWgnome-pilot-share PalmPilot Link Utilities - platform independent, /usr/share
system SUNWmv88sx Marvell 88sx sata driver
system SUNWpoold Dynamic Resource Pools
system SUNWqlcu Qlogic Fibre Channel Adapter Utilities (usr)
MOZ17 SUNWrealplayer RealPlayer media application
application SUNWsam Sun Connection Network Solaris Asset Module
application SUNWsamr Sun Connection Network Solaris Asset Module, Root (/)
system SUNWscn-base Sun Connection Network Base Package
system SUNWscn-base-r Sun Connection Network Base Package, Root (/)
application SUNWscnprm Sun Connection Product Registration Offering Package
application SUNWscnprmr SCN Product Registration Offering Package,Root(/)
system SUNWscnsom SCN Software Update Registration Offering Package
system SUNWscnsomr SCN Software Update Registration Offering Package,Root(/)
application SUNWsensor Basic Registration Sensor Package
application SUNWsensorr Basic Registration Sensor Package,Root(/)
system SUNWsi3124 SiliconImage 3124 sata driver
system SUNWukspfw USA49WLC firmware for USB Keyspan serial driver
system SUNWzfskr ZFS Kernel (Root)

Technorati:

Sunday, February 05, 2006

Polaris community site has arrived

Polaris Community site if finally up and running. It took some time to figure out which software to run there and where to host it and after a month of preparation it is now operational. Kudos to Craig and Dennis for making it happen.
The software we run there allows us to have a wiki, a ticket management, a simple project management, etc - I feel very much impressed with the overall quality of it. Good stuff! I am surprised I never heard about Trac before...

Sunday, January 29, 2006

ASCII Art Forever !

James Dickens just posted a funny "vi" upgrade picture and I remembered that many years ago I came across a Star Wars Episode IV in ASCII. Yes, the movie in ASCII Art ! You were to telnet to some host and it was then played on your terminal. So I google for it "ASCII Star Wars" and it immediately showed me a modern (aka Java, aka Web-friendly) version of this masterpiece.
So, here it comes - http://www.asciimation.co.nz/

Technorati:

Friday, January 27, 2006

Storage Community went live !

Woo-hoo, opensolaris.org Storage Community just went live as well the sources of NWS consolidation !


Technorati:

Rainy evening at Murphy's

It was rainy yesterday evening, but it didn't stop us - John Plocher, Leon Koll and myself - from getting together at Murphy's pub in Herzelia marina. Place was quite crowded - people were gathering there to watch the basketball game later that evening on the big screens around the pub. So we had to wait some time while the staff were figuring out where to sit us. The good thing is that we've got the first round of beer on house for standing patiently :) Too bad Leon showed up a little later and missed that.

Anyway, if you ask me - pub is one of the best places to have good technical talk :)


Meeting at Murphy's (2)

Meeting at Murphy's (3)

Meeting at Murphy's (5)

Technorati:

Saturday, January 14, 2006

SXCR B30 is out finally

SXCR build 30 just hit the SDLC. It adds quite a number of new packages


system SUNWatheros Atheros 802.11b/g Wireless NIC Driver
application SUNWcacaort Cacao Component
system SUNWdvdrw DVD creation utilities
system SUNWdvdrwS DVD creation utilities (source)
JAI SUNWjai Java Advanced Imaging
JAI SUNWjai-imageio Java Advanced Imaging Image I/O Tools
application SUNWjdmk-base Java DMK 5.1 minimal subset
system SUNWlibusbS libusb (source)
system SUNWlibusbugenS libusbugen plugin (source)
system SUNWmpapi SNIA Multipath Management API Common Library
system SUNWmpapir SNIA Multipath Management API Common Library (Root)
system SUNWmpathadm Solaris Multipathing CLI
system SUNWmpathadmr Solaris Multipathing CLI (Root)
system SUNWmpsvplr Sun MP API library for the scsi_vhci driver (Root)
application SUNWsoagm GNOME Menu Integration for the StarSuite Office Productivity Suite
application SUNWsoam StarSuite Office Productivity Suite for Solaris
application SUNWsogm GNOME Menu Integration for the StarOffice Office Productivity Suite
application SUNWsom StarOffice Office Productivity Suite for Solaris
system SUNWwlanr wifi config tool
system SUNWwlanu wifi config tool

Friday, December 09, 2005

A380 Office


A380 Office
Originally uploaded by Naddsy.

Whenever Sam asks to show her some new photos I am looking for some group at Flickr we are going through slide show. Today she wanted to see some planes. And look what we found ! That's an A380 flight deck. Incredible ! The joyflightstick on the side and the keyboard in front of the pilot ! Can they run Solaris on it ? Anyone has an idea what kind of software do they run there ?

Wednesday, December 07, 2005

Good morning b28 !

It's a beautiful sunny morning here in Israel and SXCR b28 is out. The DVD version is out too.

Update: b28 adds these new packages

system SUNWdcaf DCA Crypto Accelerator (usr)
system SUNWdcar DCA Crypto Accelerator (Root)
system SUNWima Solaris IMA Software Initiator Plugin
system SUNWimac Solaris IMA Common Library
system SUNWimacr Solaris IMA Common Library (Root)
system SUNWimar Solaris IMA Software Initiator Plugin (Root)
system SUNWpd PCI Drivers
system SUNWuksp USB Keyspan serial driver
system SUNWuprl Prolific PL2303 USB-to-serial driver
application SUNWzfsg ZFS Administration for Sun Java(TM) Web Console

Technorati:

Saturday, December 03, 2005

1st IOSUG meeting

On Thursday, Dec 1, Israel OpenSolaris User Group got together for the first time. It was very good to see all the people that came. The gathering wasn't that big - 10 guys overall - but it is the quality that matters, not the quantity :) Sun Microsystems Israel hosted the meeting (great many thanks to Malcolm Kavalsky for taking care of the place and the pizza !).
We spent time talking about what's going on with OpenSolaris and discussing what can we do (bearing in mind specific local requirements - Hebrew support, etc) It needs to be mentioned that Israel computer market dominated quite seriously by the Evil Empire and the interoperability with their product is very essential when it comes to deploying a UNIX solution.
All in all we managed to create nice and family-style atmosphere as can be seen on the photos. Thanks for coming to all the people !

Technorati:

Thursday, December 01, 2005

OpenSolaris haiku*

It is December 1, 2005.
And gate is closed for b29.
b28, when will it see the light ?


*) I know it is not a real haiku, but it supposed to be funny :)

Technorati: