Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 245370 - sys-libs/ncurses-5.7 DB->get: method not permitted before handle's open method
Summary: sys-libs/ncurses-5.7 DB->get: method not permitted before handle's open method
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 245378 (view as bug list)
Depends on:
Blocks: 245374
  Show dependency tree
 
Reported: 2008-11-03 09:13 UTC by Graham Murray
Modified: 2021-11-03 10:54 UTC (History)
20 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Murray 2008-11-03 09:13:04 UTC
After installing sys-libs/ncurses-5.7, the message "DB->get: method not permitted before handle's open method" is frequently displayed on the terminal when invoking a command.


emerge --info
Portage 2.2_rc13 (default/linux/x86/2008.0/desktop, gcc-4.3.2, glibc-2.8_p20080602-r0, 2.6.27-gentoo-r2-ext4-2 i686)
=================================================================
System uname: Linux-2.6.27-gentoo-r2-ext4-2-i686-Intel-R-_Core-TM-2_Duo_CPU_E8200_@_2.66GHz-with-glibc2.0
Timestamp of tree: Mon, 03 Nov 2008 07:35:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.5.2-r8
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake:      2.6.2
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.3.0-r1
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.19
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=native -mtune=native -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /var/bind /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=native -mtune=native -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="buildsyspkg distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://de-mirror.org/distro/gentoo/ http://gentoo.tiscali.nl/ http://mirror.ovh.net/gentoo-distfiles/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://ftp.snt.utwente.nl/pub/os/linux/gentoo"
LANG="en_GB.UTF-8"
LC_ALL="en_GB.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en_GB en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa apache2 bash-completion berkdb bluetooth branding bzip2 cairo caps cdr cli cracklib crypt cups curl cvs cxx dbus doc dri dvd dvdr dvdread eds emacs emboss encode esd evo examples expat fam ffmpeg flac fortran gd gdbm gif gnome gnome-keyring gnutls gpm gstreamer gtk gtkhtml hal iconv idn imagemagick imlib ipv6 isdnlog java jpeg kde kdehiddenvisibility kerberos ldap libnotify libsamplerate logrotate mad midi mikmod mmap mmx mng mono mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pcre pdf perl png postgres ppds pppd pulseaudio python qt3 qt3support qt4 quicktime readline reflection samba sdl session speex spell spl sqlite sqlite3 sse sse2 ssl startup-notification subversion svg sysfs tcl tcpd theora threads tiff tk truetype unicode usb vim-syntax vorbis win32codecs x264 x86 xattr xcb xcomposite xml xorg xulrunner xv zlib" ALSA_CARDS="intel-hda" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul 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" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB en" USERLAND="GNU" VIDEO_CARDS="vesa fbdev nv"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 octoploid 2008-11-03 09:18:52 UTC
+1 on amd64
We should mask sys-libs/ncurses-5.7 until the problem is resolved.
Comment 2 Michelangelo Scopelliti 2008-11-03 10:23:34 UTC
(In reply to comment #1)
> +1 on amd64
> We should mask sys-libs/ncurses-5.7 until the problem is resolved.
> 

anoyher reason to mask ncurses-5.7: see bug 245374
Comment 3 Marcus Hähnel 2008-11-03 10:32:47 UTC
this might be caused by the berkdb useflag .... im just now recompiling it without this flag ... will report back soo.
Comment 4 Marcus Hähnel 2008-11-03 10:50:08 UTC
this fixed it. Please just recompile ncurses without the berkdb useflag (that is .. unless you need it).

Works on amd64 like a charm now.
Comment 5 Christos Stamatopoulos 2008-11-03 13:23:22 UTC
I restarted my pc and while restarting i saw HEPS of this messages ...

Now after the kernel is loaded i get :
"/sbin/rc error while loading shared libaries libdb-4.6.so cannot open shared object file.No such file or directory"

BUt the real problem is that i cant login to my box at all cause it says:
"unable to determine your tty name"

Any solution is more than welcome ...cause if i cant login i cant downgrade !
Comment 6 Michelangelo Scopelliti 2008-11-03 13:26:12 UTC
(In reply to comment #4)
> this fixed it. Please just recompile ncurses without the berkdb useflag (that
> is .. unless you need it).
> 
> Works on amd64 like a charm now.
> 

shouldn't it be masked in portage, then?
Comment 7 Christos Stamatopoulos 2008-11-03 14:34:06 UTC
Solved with chrooting :P was silly me i thought i did not made it into the shell cause of DB->get: method not permitted before handle's open method but i was :D so i just emerging without berkdb use flag sorted it out
Comment 8 MATSUU Takuto (RETIRED) gentoo-dev 2008-11-03 14:45:52 UTC
*** Bug 245378 has been marked as a duplicate of this bug. ***
Comment 9 Jim Ramsay (lack) (RETIRED) gentoo-dev 2008-11-03 15:35:37 UTC
Furthermore, ncurses-5.7 now collides with rxvt-unicode (Probably you should look at Bug #192083)
Comment 10 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-11-03 16:02:46 UTC
%% cvs diff
Index: package.mask
===================================================================
RCS file: /var/cvsroot/gentoo-x86/profiles/package.mask,v
retrieving revision 1.9131
diff -u -r1.9131 package.mask
--- package.mask        3 Nov 2008 13:05:34 -0000       1.9131
+++ package.mask        3 Nov 2008 16:00:37 -0000
@@ -29,6 +29,11 @@

 #--- END OF EXAMPLES ---

+# Jeremy Olexa <darkside@gentoo.org> (3 Nov 2008)
+# Proxy commit for Cardoe, ncurses-5.7 seems broke with USE=berkdb and is
+# causing issues for users, see bug #245370
+=sys-libs/ncurses-5.7
+
 # Daniel Gryniewicz <dang@gentoo.org> (2 Nov 2008)
 # Feed counts and updates seem to be broken
 =net-news/liferea-1.4.21b
Comment 11 Gregg Casillo 2008-11-03 17:49:16 UTC
Compiling with berkdb USE flag worked for me.
Comment 12 Marcus Hähnel 2008-11-03 22:00:29 UTC
seeing that just the berkdb useflag seems to be disabled (-berkdb%) on older versions i think to mask the whole package might be overkill. 
Comment 13 Christophe Saout 2008-11-03 23:26:46 UTC
Only happens with bdb-4.6, works up to bdb-4.5.
Comment 14 David Voge 2008-11-04 07:58:50 UTC
(In reply to comment #5)
> ...
> Now after the kernel is loaded i get :
> "/sbin/rc error while loading shared libaries libdb-4.6.so cannot open shared
> object file.No such file or directory"
> ...

(In reply to comment #0)
> After installing sys-libs/ncurses-5.7, the message "DB->get: method not
> permitted before handle's open method" is frequently displayed on the terminal
> when invoking a command.
> 

The same here and the solution was to emerge ncurse-5.6-r2.
Comment 15 octoploid 2008-11-04 08:07:45 UTC
ncurses-5.7 also breaks mc (GNU Midnight Commander). The up- and down-arrow keys don't work and mc is displayed in black&white...
Comment 16 Paul de Vrieze (RETIRED) gentoo-dev 2008-11-05 15:51:03 UTC
Please note, that the berkdb issues go further than displaying anoying error messages. What happens is that ncurses will fail to find terminal information for your particular terminal and falls back to some very dumb kind of terminal type. Apps like mc need terminal info (but even less needs it), and will function degraded or not at all when it isn't present.

(In reply to comment #5) You can try to override the login sequence altogether by appending the following to your kernel command line: "init=/bin/bash" (or "init=/bin/sash" when your library loading is really broken). Don't forget in this case to manually mount your disk read/write (and to mount other essential partitions). The above action skips the entire init system and as such also login and the creation of pseudo-terminals. Please when finishing, also remount your partitions as read-only again, or initiate a normal boot by issuing: "exec /sbin/init"
Comment 17 Johannes Truschnigg 2008-11-05 20:25:05 UTC
If someone manages to shoot him/herself in the foot by downgrading ncurses from 5.7 to 5.6 due to this bug, here are two tarballs which MIGHT help getting problems on your box fixed:

> http://coloss.us.to/ncurses-5.6-r2.tbz2 (~amd64 USE="unicode")
> http://coloss.us.to/ncurses-5.6-r2_32BIT_MARCH-NOCONA.tbz2 (x86 USE="unicode")

Just untar to / (`tar xzpf /path/to/downloaded/ncurses-5.6-r2*.tbz2 -C /`) and bash should start to work again.

Hth.
Comment 18 Conway S. Smith 2008-11-10 10:29:09 UTC
(In reply to comment #13)
> Only happens with bdb-4.6, works up to bdb-4.5.
> 

sys-libs/db is slotted, and I've got both 4.5 and 4.6.  How would I get ncurses to use 4.5 (other than unmerging 4.6)?
Comment 19 Thomas Dickey 2008-12-13 20:14:31 UTC
hmm - there are several comments.  Aside from that about db4.6, they
seem to lack detail.  For db4.6, I just did a build (on Debian/testing)
using db4.6, and ensured (both at configure time and run time by unsetting
TERMINFO, TERMINFO_DIRS and installing into a separate location) that
it's using the hashed-database (checked with strace).

Version:
ii  libdb4.6-dev                                            4.6.21-11

> ldd xmas
        linux-gate.so.1 =>  (0xb7f78000)
        libncursesw.so.5 => /usr/build/ncurses/ncurses-5.7-20081213/lib/libncursesw.so.5 (0xb7f11000)
        libdb-4.6.so => /usr/lib/libdb-4.6.so (0xb7dde000)
        libutil.so.1 => /lib/i686/cmov/libutil.so.1 (0xb7dc2000)
        libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7d9c000)
        libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7c41000)
        libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb7c3d000)
        libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb7c24000)
        /lib/ld-linux.so.2 (0xb7f79000)

That (and the other test-programs) have color, etc.  I'm not seeing a
"DB->get:" message - perhaps it's only from certain programs.

I checked that ncurses' examples of termcap programs (demo_termcap,
railroad) work.

Likewise - for me - the keyboard works (shifted up/down arrows).
I see from some comments that removing the termcap library is said to
break slang (which is a little surprising, since slang's had its own
implementation of the termcap/terminfo libraries for a long time.
Probably what was meant is that the ebuild removed the file-system
terminfo database.  slang's unable to read the hashed-database (no
surprise - it doesn't read ncurses extended data which is from 2000).

I'll look a little further, to see if I can make bash break it.
Comment 20 Thomas Dickey 2008-12-13 20:52:53 UTC
Bug 245378 had additional information - the problem is that the code
(since ncurses 5.6 - 20080819) did not have a check for the open()
call of db.  will fix...
Comment 21 Thomas Dickey 2009-02-21 12:38:17 UTC
fixed here -

20081213
        + add check for failure to open hashed-database needed for db4.6
          (GenToo #245370).
Comment 22 SpanKY gentoo-dev 2009-10-11 07:30:26 UTC
ive added the fix from upstream to 5.7-r2