Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 202911 - sys-apps/portage traceback w/ sqlite cache on database lock
Summary: sys-apps/portage traceback w/ sqlite cache on database lock
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-21 06:53 UTC by Jakub Moc (RETIRED)
Modified: 2022-10-20 02:43 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
show the errno so that we know how to detect this error (errno.patch,615 bytes, patch)
2007-12-22 02:03 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Moc (RETIRED) gentoo-dev 2007-12-21 06:53:56 UTC
Trying to create a manifest for ebuild while portage is updating the cache after emerge --sync produces a traceback.

Traceback (most recent call last):
  File "/usr/bin/ebuild", line 29, in <module>
    import portage
  File "/usr/lib/portage/pym/portage.py", line 9821, in <module>
    init_legacy_globals()
  File "/usr/lib/portage/pym/portage.py", line 9780, in init_legacy_globals
    portdb = db["/"]["porttree"].dbapi
  File "/usr/lib/portage/pym/portage_util.py", line 913, in __getitem__
    return value_callable(*pargs, **kwargs)
  File "/usr/lib/portage/pym/portage_util.py", line 897, in __call__
    self._value = self._callable(*self._pargs, **self._kwargs)
  File "/usr/lib/portage/pym/portage.py", line 5653, in __init__
    settings["PORTDIR"], mysettings=settings)
  File "/usr/lib/portage/pym/portage.py", line 6707, in __init__
    self.depcachedir, x, filtered_auxdbkeys, gid=portage_gid)
  File "/usr/lib/portage/pym/cache/sqlite.py", line 44, in __init__
    self._db_init_connection(config)
  File "/usr/lib/portage/pym/cache/sqlite.py", line 68, in _db_init_connection
    raise cache_errors.InitializationError(self.__class__, e)
cache.cache_errors.InitializationError: Creation of instance <class 'cache.sqlite.database'> failed due to database is locked           [ !! ]
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-12-21 06:54:23 UTC
Portage 2.1.4_rc10 (default-linux/x86/2007.0/desktop, gcc-4.2.2, glibc-2.7-r1, 2.6.23-gentoo-r2 i686)
=================================================================
System uname: 2.6.23-gentoo-r2 i686 AMD Athlon(tm) XP 1600+
Timestamp of tree: Fri, 21 Dec 2007 06:30:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.3
dev-lang/python:     2.5.1-r4
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0_rc6
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17, 2.18, 2.18.50.0.2, 2.18.50.0.3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r2
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -fforce-addr"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/udev/rules.d /usr/share/X11/xkb"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -fforce-addr"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--alphabetical --with-bdeps=y"
FEATURES="ccache collision-protect distlocks metadata-transfer parallel-fetch sandbox sfperms splitdebug strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://gentoo.mirror.web4u.cz/ http://gentoo.tiscali.nl/distfiles/ http://gentoo.supp.name/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,--hash-style=gnu"
LINGUAS="cs en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--progress --prune-empty-dirs"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/overlays/beryl /usr/local/overlays/enlightenment /usr/local/overlays/php-overlay/testing /usr/local/overlays/php-overlay/experimental"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 7zip X X509 a52 aac aalib acl acpi alsa amr ao asf audiofile avahi bash-completion berkdb bluetooth branding bzip2 cairo caps cddb cdparanoia cdr chroot cli cpudetection cracklib crypt cscope css cups curl curlwrappers daap dbus dbx dga directfb dri dts dv dvb dvd dvdr dvdread encode exif expat fam fame fbcon ffmpeg fftw firefox flac flash flatfile foomaticdb ftp fuse gd gdbm geoip ggi gif gimp glitz glut gmp gphoto2 gpm graphviz gs gstreamer gtk hal ical iconv icq idn imagemagick imap imlib inifile ipv6 irda jack javascript jbig joystick jpeg jpeg2k kdeenablefinal kdehiddenvisibility kipi lame lcms libcaca libnotify libsamplerate lirc live lm_sensors logrotate lzo mad maildir matroska midi mikmod mime mjpeg mmap mmx mmxext mng modplug moznopango mp3 mp4 mpeg mplayer mudflap multiuser musepack musicbrainz ncurses network network-cron nfs nls nodrm nptl nptlonly nsplugin nvidia odbc offensive ogg openal opengl openmp pam pcre pdf perl php png portaudio ppds python qt3 qt3support qt4 quicktime rar readline real reflection rle ruby samba sdl sdl-image session skey sms sndfile speex spell spl sqlite sqlite3 sse ssl startup-notification subtitles svg symlink syslog tcpd theora threads threadsafe thumbnail tiff truetype unicode urandom usb v4l v4l2 vcd vim-syntax vim-with-x vorbis wavpack win32codecs wmf x264 x86 xattr xcomposite xine xinerama xinetd xml xmlrpc xorg xosd xpm xscreensaver xv xvid xvmc zeroconf zip zlib" ALSA_CARDS="emu10k1 bt87x" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev joystick keyboard mouse vmmouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="cs en" LIRC_DEVICES="cph06x devinput" USERLAND="GNU" VIDEO_CARDS="fbdev nv nvidia v4l vesa vmware"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 2 Zac Medico gentoo-dev 2007-12-22 02:03:11 UTC
Created attachment 139071 [details, diff]
show the errno so that we know how to detect this error

Pleanse patch /usr/lib/portage/pym/cache/cache_errors.py with this patch and reproduce the traceback. If we can see the errno in the new traceback then we can detect the error and handle it with a retry or something.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-12-22 08:34:48 UTC
Thanks, I'll try. The problem is that it's not easily reproducible (we already discussed this wrt Bug 159518, I'm still hitting that one sporadically).
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-12-22 08:43:59 UTC
Hmmm well, now I'm getting this, unfortunately no errno even with the patch:/

Traceback (most recent call last):
  File "/usr/bin/repoman", line 673, in <module>
    trees["/"]["porttree"].settings = repoman_settings
  File "/usr/lib/portage/pym/portage_util.py", line 913, in __getitem__
    return value_callable(*pargs, **kwargs)
  File "/usr/lib/portage/pym/portage_util.py", line 897, in __call__
    self._value = self._callable(*self._pargs, **self._kwargs)
  File "/usr/lib/portage/pym/portage.py", line 5739, in __init__
    settings["PORTDIR"], mysettings=settings)
  File "/usr/lib/portage/pym/portage.py", line 6807, in __init__
    self.depcachedir, x, filtered_auxdbkeys, gid=portage_gid)
  File "/usr/lib/portage/pym/cache/sqlite.py", line 44, in __init__
    self._db_init_connection(config)
  File "/usr/lib/portage/pym/cache/sqlite.py", line 68, in _db_init_connection
    raise cache_errors.InitializationError(self.__class__, e)
cache.cache_errors.InitializationError: Creation of instance <class 'cache.sqlite.database'> failed due to 'database is locked'         [ !! ]