Browsing Posts in Astronomy

Patch Blog

No comments

Recently my Manager started blogging. Despite my initial cynicism it’s actually turning out to be a pretty good blog, and the comments are great.

Communication about patches is an area that Sun could improve in. What they are, how they are created, how they can be installed, when they can be installed, and when and what you should patch are all areas that I’ve received customer queries about.

Patch Automation Tools is Gerry’s most commented post to date. And I’m not surprised. And to be honest I agree with most of the comments – pca is damn good. Hopefully Sun Connection Satellite will be a big improvement on previous offerings.

Live Upgrade is a feature of Solaris that lets you create alternate boot environments. This makes it easy to switch between OS builds at boot time, but also make upgrading much easier, less risky, and quicker. This extends to patching too.  

I recently received a query from a customer asking how we ensure that patches installed via live upgrade do not interfere with the running system. As well as ensuring that the patch applies correctly to your alternative boot environment you need to be sure that the patch is not changing any files or killing processes on tour running system.

 In Solaris 8 and 9 we use an interposition library to check this. We check all the open*, creat*,*link* calls to ensure that they are dealing with files on the correct boot environment; we allow changes in /tmp etc. and commands also need to load libraries from the running environment so we make exceptions for these. We also check the kill calls to ensure that processes are not being killed on the running system. An interposition library is one that is usually preloaded using LD_PRELOAD so that when a call is searched for the call as defined in our library will be matched rather than the system call. Heres a snippit of how we check for creat calls:

 int

creat(char *path, mode_t mode)

{        char *cwd;        char *cmdname="creat";        typedef (*realcreat_t)(char *p, mode_t m);        static realcreat_t prealcreat;        if (prealcreat == NULL){                prealcreat=  (realcreat_t)dlsym(RTLD_NEXT, "creat");                if (prealcreat== NULL){                        (void) printf("dlopen: %s\n", dlerror());                        return (0);                }        }        parsepstname(path,cmdname);        return ((*prealcreat)(path, mode));}   

 

Our creat() call takes the same arguments as the system call. The first thing we do is look for the real system call by calling dlsym(3C) and we store it. We then write out the file thats being created to a log file and call the real creat() call. The parsepstname() function works out the full path to the file and then filters out our exceptions (/tmp etc).

Similar functions need to be written for any calls that we want to examine.

One issue we came up against when designing this was that shell script often call /sbin/sh when they need to run other scripts. /sbin/sh is statically linked so our interposition library will not work. In the case of pkgadd the environment was also being cleared. We get around these problems by catching the call to execute /sbin/sh, reloading our environment variables from a file and then execing /bin/sh instead. It works but it’s a bit invasive. Also if we need to make changes to the test we need to recompile the library and reinstall it on the test machines. If only there was some way to dynamically trace what was happening on the system…

Well in s10 we can use dtrace for this. The procedure is basically the same; we check for certain system calls, filter out exceptions and flag an error if something is happening that should not be. Heres the dtrace script 

#!/usr/sbin/dtrace -qs

int x;BEGIN{/* set it to something that wont match a pid for   the syscall prov. below */x=-1;}

/* The process that we are interested in */proc:::create/execname == "patchadd" || execname == "patchrm"/{        x=pid;        self->called_proc_create = 1;}

syscall::open*:entry,syscall::creat*:entry,syscall::unlink*:entry,syscall::link:entry,syscall::symlink:entry/progenyof(x)/{     self->path = copyinstr(arg0);     printf("%s:%s:%s:%s\n", probefunc, self->path, cwd, execname);}

We check for patchadd and patchrm processes being started and note the pid. Although you use the luupgrade command to do the patching it ultimately calls patchadd and patchrm to do the work. Then when we examine a system call we check that it is from the patchadd process tree with the progenyof() test. If it is we log the function and arguments. Rather than having dtrace handle the parsing we have a perl script in our test harness that filters out the exceptions and warns us of any errors.

We also check for kill calls in Solaris 10, but if a patch needs to start or stop a process it should really do so by svcadm. So we check expecially for any calls to that:

proc:::exit/execname == "svcadm"/{   printf("%s:%d:%s:%s\n", probefunc, arg0, execname,execname);}

The dtrace is much more straightforward and easier to implement. It’s also tracing everything so we don’t have to worry about someone clearing the environment or calling statically linked commands.

This test has caught quite a few problems in patches. The majority of these are down to errors in the patch and package scripts where patch creators are allowed to write their own scripts; sometimes these are written by product teams that have not considered patching in a live upgrade scenario.  We rarely see any issues with this test anymore. It seems that once we introduce a test we get an initial peak in test fails, the issues are fed back upstream and corrected and we then see a steady tailoff in failures.

James A. Van Allen died yesterday age 91.

Van Allen made the first great discovery of the space age, with his instruments on the very first american spacecraft, Explorer 1. The largest Earthly “object”, the Van Allen radiation belt, is named after him.

http://history.nasa.gov/sputnik/vanallen.html

It sad to see one of the last great space age pioneers passing on.

According to eclipse chasers you can count seeing a solar eclipse, just by being in the path of totality. So technically my trip to Cornwall, UK in 1999 for the Solar Eclipse there counts. Despite it being raining for the morning of the eclipse.

The next total Solar Eclipse that I managed to get to was on March 28th. The trip was organised under the Irish Federation of Astronomical Societies, and unberella group of all the astronomy societies in Ireland. We stayed in a 5 star hotel in Antalya, Turkey. The hotel was white; the lighting was red. IFAS base for the week became known as the Big Brother House. We had a nice pool and sea view during the day.

And an even better view some nights.

For the eclipse we went to Manavgat. We had slected this site months in advance as the best place to view the eclipse from, and thankfully on the day the weather reports for Manavgat looked good. Some other groups decided to venture up into the mountains to view the eclipse – a bad idea. The mountains to the west of antalya were in cloud every day we were there.

Heres some eclipse shots:


A total solar eclipse is something that no photo can capture. Words dont do a good job either. So go see one yourself. The next easy eclipse to see will be in Shanghai in 2009.

For you amusement I have a little audio that I recorded during the eclipse. This is for the SDAS and IFAS podcasts. It features me pestering^Winterviewing various people before and after totality and also captures the post totality cheering.

See you in Shanghai in 2009? Or perhaps even Novosibirsk in 2008?

Dave McDonald sent a post to the Irish Astronomy forum the other day announcing that he had confirmed a supernova. As with many sciences once you make a discovery, it needs to be verified before you are taken seriously, and Dave was asked to verify the discovery and did so with rather modest equipment. The image below was recorded with an 8″ telescope, and a $300 ccd camera; granted the mount he uses is large and expensive, but such an observation should be within the grasp of many amateurs.

Dave and a few other Irish Astronomers, yours truly included!, will be discussing this observation and the possibility of a more organised group of Irish Supernova watchers at the Whirlpool Star Party in Birr, Co. Offaly, Ireland this weekend.

I dont usually put up non computing topics, but since this talk is well worth attending…

We are delighted to announce that we have got the well known and eminent Guy Consolmagno to give us our talk next Thursday in Gonzaga.

Guy is speaking at Whirlpool in Birr which begins on the Friday after our meeting and with the help and influence of Gonzaga he has kindly consented to come a day early and give us a talk.

The title of the talk is “Why does the Pope have an Astronomer”.

The co-author of “Turn Left at Orion” with Dan Davis, there is an excellent interview with both himself and Dan Davis in this month’s Arcturus.

We would expect that there will be great demand for places and they are limited. We are offering the opportunity to members of the club in the first instance a place to attend before offering it to the general public.

I would be obliged therefore if you could confirm if you can attend on the night. In order to regulate the numbers we will reserve your place once you confirm you can attend. Confirmations to info@southdublinastronomy.org

The talk is at Gonzaga College, Sandford Road, Ranelagh, Dublin 6 at 8.00 pm on Thursday the 6th October next. As with all SDAS talks this will be a FREE talk.

GuyConsolmagno.jpg
The following taken from his website http://homepage.mac.com/brother_guy is a short Biography.

Brother Guy Consolmagno SJ was born in Detroit, Michigan. He earned undergraduate and masters’ degrees from MIT, and a Ph. D. in Planetary Science from the University of Arizona, worked at Harvard and MIT, served in the US Peace Corps (Kenya), and taught university physics at Lafayette College before entering the Jesuits in 1989.

At the Vatican Observatory since 1993, his research explores connections between meteorites, asteroids, and the evolution of small solar system bodies, observing uiper Belt comets with the Vatican’s 1.8 meter telescope in Arizona, and curating the Vatican meteorite collection.

Along with more than 100 scientific publications, he is the author of a number of books including Turn Left at Orion (with Dan Davis) and Brother Astronomer.

Dr. Consolmagno’s work has taken him, literally, around the world. In 1996, he spent six weeks collecting meteorites with a team on the blue ice regions of East Antarctica. He has served on the governing boards of the American Astronomical Society Division for Planetary Sciences, and the Meteoritical Society, and in 2003 he was elected president of IAU Commission 16 (Planets and Satellites). In 2000, the small bodies nomenclature committee of the IAU named an asteroid, 4597 Consolmagno, in recognition of his work.

Dublin played host to the 17th International Conference on General Relativity and Gravitation. Up until a few days before the event only the professionals and amateur astronomers were aware of the event. What was organised well in advance were the public lectures, on the opening day of the conference, Kip Thorne, best known publicly for his book on black holes and the conference ended with a talk from Roger Penrose, probably best known for his book, `The emperors new mind.

Kips lecture predictably enough dealt with gravity, in particular gravity waves and detectors. I took two things from this talk. Firstly that in order to detect gravity waves, from for example binary black holes, we need very precise detectors, they need to detect something about 10^-16 of a centimeter. Secondly, this technology is available. LIGO the
Laser Interferometer Gravitational Wave Observatory, is the least impressive of the two main projects. The crudest explanation would be to say it is an L shaped tunnel, with each arm being 4km long, within these arms lasers are fired and if there is no `strange` gravitational interaction both beams will arrive back at the detector at the same time. If however a gravity wave happens to pass by, it will stretch one of the arms more than the other, and the slight difference in the time the lasers return will be evidence of a gravity wave, though the same result would need to be recorded in other remote locations to confirm the result. The second project is LISA This operates in a similar fashon to LIGO but is situated in space, on three satellites. This is cool because it needs to measure the distance between proof masses, separated by five million kilometers, with an accuracy of 10 picometers (10 millionths of a micron or half a billionth of an inch)!

On Friday, Roger Penrose decided to upset several members of the audience! His style, of using transparencies instead of a computer presentation, his compulsive need to wander about the stage, and his apparent clumsy organisation of the talk all led to an enjoyable lecture. He spoke about fashion, faith and fantasy in modern physics theories. Superstrings, got the label of fashionable, citing the current large numbers of papers being published as one piece of evidence. Faith, was the dubious title give to quantum mechanics, at times giving the listener that prayer was all that held it together. And inflation theory, for its impossible attempts to trace backwards through time got the fantasy label, citing brownian motion and entropy in its fairytale. It was an amusing lecture, which the crowd enjoyed, if not all of the delegates.

Oh yes and on Wednesday Morning, Stephen Hawking, turned up to admit he was wrong, and hand over an encyclopedia. No one understood his talk (Thorne and Preskill have said they didn’t understand it so god help the media who were there!). This is slightly problematic, since even those who have been arguing that he was wrong for years, didn’t expect him to prove it in this manner so now they are dubious, and those who have agreed with him up to now are equally as dubious of his achievement. It seems best to wait for the full paper to be published and digested by the experts rather than believing what some self proclaimed experts will be spouting in the coming weeks.