Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 115297 - dev-lang/swi-prolog-lite: emerge of 5.5.39 fails - sandbox access violation
Summary: dev-lang/swi-prolog-lite: emerge of 5.5.39 fails - sandbox access violation
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Prolog project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-12 05:36 UTC by Hugo
Modified: 2006-10-22 14:09 UTC (History)
2 users (show)

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


Attachments
Output of the emerge as requested (log,339.07 KB, text/plain)
2006-01-19 23:41 UTC, Hugo
Details
swi-prolog-lite-5.5.39-sandbox.patch (swi-prolog-lite-5.5.39-sandbox.patch,267 bytes, patch)
2006-02-16 01:34 UTC, Keri Harris
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hugo 2005-12-12 05:36:59 UTC
After emerging 5.1.13 I required a full (not lite) install of swi-prolog. 
I proceeded by unmasking the application and emerged it. The process ended with an
access violation error.


Reproducible: Always
Steps to Reproduce:
1.
2.
3.

Actual Results:  
.....
man:
gzipping man page: pl.1
gzipping man page: xpce-client.1
gzipping man page: plld.1
gzipping man page: plrc.1
gzipping man page: xpce.1
prepallstrip:
strip: i686-pc-linux-gnu-strip --strip-unneeded
strip: i686-pc-linux-gnu-strip --strip-unneeded
   usr/bin/xpce-client
   usr/lib/latex2html/lib/i686-linux-gnu/tex.so
        usr/lib/latex2html/lib/i686-linux-gnu/tex.so will contain runtime text
relocations
Text relocations require a lot of extra work to be preformed by the
dynamic linker which will cause serious performance impact on IA-32
and might not function properly on other architectures hppa for example.
If you are a programmer please take a closer look at this package and
consider writing a patch which addresses this problem.
   usr/lib/pl-5.5.39/bin/i686-linux-gnu/pl
   usr/lib/pl-5.5.39/bin/i686-linux-gnu/plld
   usr/lib/pl-5.5.39/bin/i686-linux-gnu/plrc
   usr/lib/pl-5.5.39/lib/i686-linux-gnu/porter_stem.so
   usr/lib/pl-5.5.39/lib/i686-linux-gnu/rdf_db.so
   usr/lib/pl-5.5.39/lib/i686-linux-gnu/libjpl.so
   usr/lib/pl-5.5.39/lib/i686-linux-gnu/mp.so
   usr/lib/pl-5.5.39/lib/i686-linux-gnu/files.so
   usr/lib/pl-5.5.39/lib/i686-linux-gnu/mime.so
   usr/lib/pl-5.5.39/lib/i686-linux-gnu/rlimit.so
   usr/lib/pl-5.5.39/lib/i686-linux-gnu/readutil.so
   usr/lib/pl-5.5.39/lib/i686-linux-gnu/time.so
   usr/lib/pl-5.5.39/lib/i686-linux-gnu/cgi.so
   usr/lib/pl-5.5.39/lib/i686-linux-gnu/double_metaphone.so
   usr/lib/pl-5.5.39/lib/i686-linux-gnu/sgml2pl.so
   usr/lib/pl-5.5.39/lib/i686-linux-gnu/table.so
   usr/lib/pl-5.5.39/lib/i686-linux-gnu/memfile.so
   usr/lib/pl-5.5.39/lib/i686-linux-gnu/unix.so
   usr/lib/pl-5.5.39/lib/i686-linux-gnu/libpl.so.5.5.39
   usr/lib/pl-5.5.39/lib/i686-linux-gnu/odbc4pl.so
   usr/lib/pl-5.5.39/lib/i686-linux-gnu/socket.so
   usr/lib/pl-5.5.39/lib/i686-linux-gnu/ssl4pl.so
   usr/lib/pl-5.5.39/xpce-6.5.39/bin/i686-linux-gnu/xpce-client
   usr/lib/pl-5.5.39/xpce-6.5.39/lib/i686-linux-gnu/pl2xpce.so
>>> Completed installing swi-prolog-lite-5.5.39 into
/var/tmp/portage/swi-prolog-lite-5.5.39/image/

--------------------------- ACCESS VIOLATION SUMMARY
---------------------------LOG FILE =
"/var/log/sandbox/sandbox-dev-lang_-_swi-prolog-lite-5.5.39-25624.log"

access_wr: /usr/lib/pl-5.1.13/library/INDEX.pl
--------------------------------------------------------------------------------morfina
hugof #
Comment 1 Hugo 2005-12-12 06:12:24 UTC
Hi, 

Additional information: to circumvent the problem I did an "emerge -C". I then
repeated the emerge with success. I think this "access vilotation" is due to a 
failed delete of the old previously installed files.

HTHs.
Comment 2 SpanKY gentoo-dev 2006-01-19 17:42:24 UTC
none of the INDEX.pl references look suspect so if you could run run:
MAKEOPTS=-j1 emerge swi-prolog-lite >& log
and post the log file as an attachment when the build failed

also, you neglected to post `emerge info`
Comment 3 Hugo 2006-01-19 23:41:22 UTC
Created attachment 77620 [details]
Output of the emerge as requested

I have upgraded the compiler and system and consequently don't know if this is of any use. As I said after the unemerge the instalation executed flawlessly.
Comment 4 Hugo 2006-01-19 23:43:07 UTC
(In reply to comment #2)
> none of the INDEX.pl references look suspect so if you could run run:
> MAKEOPTS=-j1 emerge swi-prolog-lite >& log
> and post the log file as an attachment when the build failed
> 
> also, you neglected to post `emerge info`
> 
Sorry. Here it is:


Portage 2.0.53 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r2, 2.6.14-gentoo-r2 i686)
=================================================================
System uname: 2.6.14-gentoo-r2 i686 Intel(R) Pentium(R) 4 CPU 2.53GHz
Gentoo Base System version 1.6.14
ccache version 2.3 [disabled]
dev-lang/python:     2.3.5, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-pipe -O2 -march=i686"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-pipe -O2 -march=i686"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_GB.iso885915"
LINGUAS="en"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X acpi alsa arts audiofile avi berkdb bitmap-fonts bzip2 cdparanoia cdr crypt cups curl doc dts dv dvd dvdr dvdread eds emboss encode esd exif expat fam ffmpeg flac foomaticdb fortran gd gdbm gif glut gmp gnome gpm gstreamer gtk gtk2 gtkhtml hal howl idn ieee1394 imagemagick imlib ipv6 java jpeg kde latex lcms libg++ libwww lzo mad matroska mikmod mmap mmx mmxext mng motif mozcalendar mozilla mp3 mpeg mysql ncurses nls nsplugin odbc ogg oggvorbis opengl oss pam pcre pdflib perl png python qt quicktime readline samba sdl spell sse sse2 ssl svga tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts udev v4l v4l2 vcd vidix vorbis win32codecs xine xml xml2 xmms xv xvid zlib linguas_en userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, MAKEOPTS, PORTDIR_OVERLAY

Comment 5 Keri Harris gentoo-dev 2006-02-16 01:34:24 UTC
Created attachment 79914 [details, diff]
swi-prolog-lite-5.5.39-sandbox.patch

This bug was caused by upgrading over any version of swi-prolog <5.4.0 that contains an unreconciled set of library directives. Each time the (make_library_index)[1,2] and (make)/0. predicates are called in these earlier versions of swi-prolog, the INDEX files are regenerated without absolute filepaths. Thus calling any of the 5.1.13 prolog binaries from within the sandbox (when the 5.1.13 environment contains an unreconciled index) will cause the top-level 5.1.13 INDEX.pl to be regenerated.

The Makefile at fault is in packages/mp. Rather than calling pl.sh that in turn runs pl from within the sandbox, the Makefile is directly calling /usr/bin/pl from pl-5.1.13:

gmake[1]: Entering directory `/var/tmp/portage/swi-prolog-lite-5.5.39/work/pl-5.5.39/packages/mp'
<snip>
pl -f none -g make -t halt		<= INDEX.pl will be regenerated here.

Find attached a very small patch to address this very rare (and very old) bug.
Comment 6 Keri Harris gentoo-dev 2006-10-22 14:09:26 UTC
dev-lang/swi-prolog-lite has now been masked pending removal from the tree.
Anyone still using swi-prolog-lite is encouraged to upgrade to dev-lang/swi-prolog.