# Upgrade error



## xy16644 (Dec 29, 2012)

Today I wanted to upgrade my system from 9.0-RELEASE-p3 (i386) to 9.1. 

I ran the following successfully:

```
# mv /usr/src /usr/src.old
# svn checkout svn://svn.freebsd.org/base/releng/9.1 /usr/src
# mergemaster -p
# cd /usr/src
# make buildworld
```

After running [CMD="make buildworld"][/CMD] I got this:

```
>>> World build completed on Sat Dec 29 13:38:38 GMT 2012
```

But then when I ran:

```
make buildkernel KERNCONF=ALPHA (my custom kernel name)
```

I got this:

```
ERROR: Missing kernel configuration file(s) (ALPHA).
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
```

Can someone help please? I've never had this error before when upgrading and using a custom kernel. Thanks!


----------



## kpa (Dec 29, 2012)

You're missing the kernel config file in /usr/src/sys/i386/conf.


----------



## xy16644 (Dec 29, 2012)

Thank you, I just realised that now! I forgot I had moved my old source directory.


----------



## xy16644 (Dec 29, 2012)

I've just completed the upgrade from FreeBSD 9.0 to 9.1 and it went quite smoothly.

When I do a:

```
uname -a
```

I get:

```
FreeBSD alpha.xxxxxx.com 9.1-RELEASE FreeBSD 9.1-RELEASE #1 r244812:
```

I assume "r244812" is some kind of build number, is this correct? I've never used svn to download the source files when doing an upgrade...what is the best way to check from now on to see if there are any patches/updates/fixes/etc?

Do I just run:

```
svn checkout svn://svn.freebsd.org/base/releng/9.1 /usr/src
```

again?

Thanks!


----------



## wblock@ (Dec 29, 2012)

Once the source has been checked out, just update it:
`# svn up /usr/src`

Files that have been changed will be listed as they are updated.


----------



## kpa (Dec 29, 2012)

It's an SVN revision number. In Subversion a repository has a global revision number that identifies the state of the repository after a certain commit, like in this case  commit number 244812.

This book explains all of what you need to know about subversion:

http://svnbook.red-bean.com/en/1.7/svn-book.pdf


----------



## xy16644 (Dec 29, 2012)

Thanks for the explanation.

I just ran:

```
svn up /usr/src
```

and it said:

```
Updating 'src':
At revision 244824.
```

Does that mean there have been some changes since I checked out the files this morning since the revision number is higher? It didn't show any new files though as I ran the command.

When there *are* changes and new files are checked out does that mean I need to run through all of this everytime:

```
# mergemaster -p
# cd /usr/src
# make buildworld
# make buildkernel KERNCONF=ALPHA
# make installkernel KERNCONF=ALPHA

# reboot
# cd /usr/src
# make installworld
# mergemaster -iU
# reboot
```

or is there a more efficient way of applying patches/small updates/etc?


----------



## kpa (Dec 29, 2012)

The revision number of the repository is increased after every single commit regardless of what part of the repository the commit touched. That means the commit that didn't touch the releng/9.1 branch will still increment the global revision number.

That is the standard routine for updating the system and it should be followed to the letter to avoid missing something critical during the updates and ending up with a non bootable (the worst case) system.


----------



## xy16644 (Dec 29, 2012)

So how does one know when there are patches/updates/etc that I need to apply for the version of FreeBSD I have installed?


----------



## kpa (Dec 29, 2012)

The security advisories and errata notices at http://security.freebsd.org. If you look at the past advisories and notices there are SVN revisions listed that have the particular patches and updates included. You can use those revisions to check your own copy of the sources and your installed system to see if it needs updating.

The security advisories and errata notices are also posted on the mailing lists and here on the News&Announcements forum.


----------



## xy16644 (Dec 29, 2012)

kpa said:
			
		

> The security advisories and errata notices at http://security.freebsd.org. If you look at the past advisories and notices there are SVN revisions listed that have the particular patches and updates included. You can use those revisions to check your own copy of the sources and your installed system to see if it needs updating.
> 
> The security advisories and errata notices are also posted on the mailing lists and here on the News&Announcements forum.



Many thanks for the explanation.

So if my revision number is higher than what is quoted in the security advisory then my system is patched, up to date and protected from the vulnerability in the notice?


----------



## jb_fvwm2 (Dec 29, 2012)

I'd check each advisory to see how specific it is to what you are using your FreeBSD system for, some of them may be skipped easily... howsoever the svn revision is not applied to your running system until a full installworld... (sometimes just installkernel... procedure after the svn command updates the source tree in /usr/src. (Most of which you probably already know, upon rereading all the the posts in this thread...)


----------



## xy16644 (Dec 30, 2012)

Thanks to all for the explanations. I'm pretty pleased with the upgrade to 9.1 so far.

Since I was upgrading from 9.0 to 9.1 I didn't recomplile all my ports. This normally takes about a day on my machine. All my ports are working fine but is it bad to *not* recompile all your ports after a (minor) upgrade?


----------



## kpa (Dec 30, 2012)

No need to recompile ports unless the ports are using the kernel sources, sysutils/lsof and emulators/virtualbox-ose-kmod are two common examples of such ports.


----------



## xy16644 (Dec 31, 2012)

One of the things I have noticed since upgrading my server to FreeBSD 9.1 is that the load has increased quite a bit. I use Munin to monitor things like load, CPU, memory etc and if I look at the load average by week I can see that it has spiked since the upgrade:







I had a look in [CMD=""]top[/CMD] but nothing jumped out at me that could be causing the load:


```
last pid: 56600;  load averages:  0.79,  0.69,  0.67    up 1+21:02:51  13:48:55
151 processes: 1 running, 150 sleeping
CPU:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt,  100% idle
Mem: 518M Active, 59M Inact, 458M Wired, 2443M Free
Swap: 4096M Total, 4096M Free


  PID USERNAME   THR PRI NICE   SIZE    RES STATE   C   TIME   WCPU COMMAND
34326 spamd        1  20    0 89660K 82144K select  1   0:30  0.00% perl
34325 root         1  20    0 44972K 37040K select  0   0:08  0.00% perl
 1316 root         1  20    0 11464K 11488K select  0   0:06  0.00% ntpd
56379 clamav       2  20    0   158M   131M select  0   0:05  0.00% clamd
 2093 root         1  20    0 59136K 20184K select  0   0:04  0.00% httpd
 1250 root         3  20    0 26976K  1996K select  0   0:03  0.00% apcupsd
 2036 www          1  20    0 20808K  6880K nanslp  1   0:03  0.00% perl5.14.2
 1859 mrtg         1  20    0 19176K 11416K nanslp  0   0:02  0.00% perl
34289 root         1  20    0 23540K 15040K select  1   0:02  0.00% perl
  954 _pflogd      1  20    0  9624K  1244K bpf     0   0:02  0.00% pflogd
 2393 root         1  20    0 14324K  7644K select  1   0:02  0.00% perl5.16.2
56395 clamav       1  31    0 21024K  9928K pause   0   0:01  0.00% freshclam
 1094 root         1  20    0  9504K  1272K select  0   0:01  0.00% syslogd
34466 mrtg         1  20    0 19792K 12160K nanslp  1   0:01  0.00% perl
 1720 postfix      1  20    0 12084K  3636K kqread  1   0:01  0.00% qmgr
 1714 root         1  20    0 12084K  3604K kqread  1   0:01  0.00% master
```

Has anyone else experienced this increased load on their server since upgrading? Is there anything else I can do to troubleshoot it?


----------



## xy16644 (Jan 2, 2013)

I've been monitoring my server for a few days now and the load hasn't gone done at all. It seems to be averaging about 0.70 load.

Has anyone else experienced this since upgrading?


----------



## xy16644 (Jan 8, 2013)

After monitoring my server for a couple weeks now it is obvious something isn't right:






Is this normal after an upgrade? The load on my server has increased substantailly upgrading from FreeBSD 9.0 to 9.1. 

Has anyone else experienced this or have any ideas? I am baffled by this...is it a bug? :q


----------



## xy16644 (Jan 12, 2013)

One thing I have noticed when monitoring my system post upgrade is the following process:

```
20199 username         1  29    0 10900K  2364K zio->i  0   0:09 18.80% imapd
```

This process seems to stick around for ages using about 20% of the CPU on the server. 

So my questions is, what is *zio->i*  and why is this process hogging the CPU so much for so long?


----------



## xy16644 (Jan 15, 2013)

I finally managed to fix this load issue on my server since upgrading from 9.0 to 9.1. As mentioned in earlier posts the load on my server spiked from about 0.1 to 1.0 post upgrade.

After running:

```
sysctl kern.eventtimer.timer=LAPIC
```

This immediately dropped the servers load back down to 0.1 as it was before (and has always been).

I also added this command to /etc/sysctl.conf to make the change "stick" after a reboot.

I hope this helps someone who experiences the same issue after upgrading to 9.1.


----------

