[MacPorts] #24858: Simultaneous install of same port ends in error

MacPorts noreply at macports.org
Tue May 11 09:33:17 PDT 2010


#24858: Simultaneous install of same port ends in error
-------------------------------------+--------------------------------------
 Reporter:  ryandesign@…             |       Owner:  macports-tickets@…                   
     Type:  defect                   |      Status:  new                                  
 Priority:  Normal                   |   Milestone:                                       
Component:  base                     |     Version:  1.8.99                               
 Keywords:                           |        Port:                                       
-------------------------------------+--------------------------------------
 Using MacPorts 1.9.0 beta 1 on Snow Leopard with Xcode 3.2.2, things go
 wrong when you try to install the same port at the same time in multiple
 terminal windows. Doing so is obviously not terribly useful, but sometimes
 it happens by accident -- I may be installing one port in one window, and
 installing what I thought was a totally unrelated port in another window,
 and I didn't realize they shared some dependency that wasn't installed
 yet.

 In this case, it ended up wanting to install autoconf in two different
 terminal windows. In one window, the install completed successfully, after
 playing tag with the other window's lockfile for a few phases:

 {{{
 Waiting for lock on
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_autoconf/work/.macports.autoconf.state
 Waiting for lock on
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_autoconf/work/.macports.autoconf.state
 Waiting for lock on
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_autoconf/work/.macports.autoconf.state
 --->  Installing autoconf @2.65_1
 --->  Activating autoconf @2.65_1
 --->  Cleaning autoconf
 }}}

 Meanwhile the other terminal window, where the install began, eventually
 failed:

 {{{
 --->  Fetching autoconf
 --->  Attempting to fetch autoconf-2.65.tar.bz2 from
 http://808.local/distfiles/autoconf
 --->  Verifying checksum(s) for autoconf
 --->  Extracting autoconf
 --->  Applying patches to autoconf
 --->  Configuring autoconf
 --->  Building autoconf
 Waiting for lock on
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_autoconf/work/.macports.autoconf.state
 --->  Staging autoconf into destroot
 Waiting for lock on
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_autoconf/work/.macports.autoconf.state
 --->  Installing autoconf @2.65_1
 Error: Target org.macports.install returned: sqlite error: SQL logic error
 or missing database (1) while executing query: INSERT INTO registry.ports
 (name, version, revision, variants, epoch) VALUES (?, ?, ?, ?, ?)
 Log for autoconf is at:
 /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_autoconf/main.log
 }}}

 MacPorts 1.8.2 doesn't fare much better in these situations. It doesn't
 use SQLite for its registry of course, but an error is still displayed.

 Desirable is that multiple simultaneous attempts to install the same port
 somehow manage to block each other long enough that all such involved
 processes end up completing without error. We obviously already have
 lockfiles in place with the intention to prevent this problem, but during
 the installation phase, this protection is apparently not working.

-- 
Ticket URL: <http://trac.macports.org/ticket/24858>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list