Upgrading ports while processes are running.

Danny Carroll fbsd at dannysplace.net
Tue Aug 17 22:05:36 UTC 2010

 On 17/08/2010 12:13 PM, Mark Shroyer wrote:
> On Tue, 17 Aug 2010 03:23:27 +0200, Polytropon <freebsd at edvax.de> wrote:
>> At least, the step that wants to write will fail, and this will
>> mostly be (finally) signaled by a make error.
> That isn't to say you won't see any negative consequences from
> overwriting a running port with a newer version.  Hypothetically, you
> might install a new Python including a new standard library, and if your
> running (old) Python process tries to load one of its deleted modules
> from disk something could break.  Or not; I'm no expert on the ports
> system, they might have some way of working around this.  But as for a
> pragmatic answer to your question, I err on the side of caution with
> this stuff :)

Thanks for the info...

I guess I can take this to read:
The way install works, the binary files can be updated even though they
are in use.   Restart of the port (or it's deps in the case of libs) is
If nothing is restarted, then the old process code happily resides in
memory until it's no longer referenced.   This can cause a problem with
a dynamically loaded lib that is not the same version as expected.

I wonder what happens when you upgrade a port, don't restart, then the
following week upgrade it again....  hmmm.

In any case I like the "restart the whole server" option after a major
upgrade because if it works then I can essentially rule out the upgrade
if I have to troubleshoot a problem at a later date.


More information about the freebsd-questions mailing list