Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 2007 - Portage: add support for multiple emerges/ld.so.preload
Summary: Portage: add support for multiple emerges/ld.so.preload
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Daniel Robbins (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-22 17:09 UTC by Sandy McArthur
Modified: 2003-02-04 19:42 UTC (History)
2 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 Sandy McArthur 2002-04-22 17:09:31 UTC
I was doing new install of gentoo and at the end of the openssl-0.9.6.c-r1
pacakge during an `emerge system` emerge barfed because something couldn't open
/etc/ld.so.preload . Running:
touch /etc/ld.so.preload
seems to have worked, at least enough that my emerge continue.

When my current install finishes I'll try emerging openssl-0.9.6.c-r1 again
after a `rm /etc/ld.so.preload` and see what happens.
Comment 1 Daniel Robbins (RETIRED) gentoo-dev 2002-04-24 10:56:59 UTC
odd.
Comment 2 Daniel Robbins (RETIRED) gentoo-dev 2002-04-25 01:26:55 UTC
Bangert: any ideas on this one?
Comment 3 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2002-04-25 14:15:03 UTC
 i had this once...   
   
the problem was, that i had two instances of emerge running (don't remember   
what they emerged)   
   
hhm, i don't know what ld.so.preload is for - but at that time it contained  
/lib/libsandbox.so  
  
right now it is empty...  
 
justed tested it - as soon as you emerge something (compiling) you have a 
/lib/libsandbox.so in /etc/ld.so.preload 
  
again, i don't know what the implications of that is 
Comment 4 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2002-05-07 09:58:08 UTC
hhm  check out: http://www.gentoouser.org/viewtopic.php?topic=1&forum=7 
Comment 5 Michael Twomey 2002-05-08 04:53:06 UTC
I don't know if this is related but doing an "emerge search ..." and hitting
ctrl+c causes it to unlink /etc/ld.so.preload. This then causes emerges which
want to fopen that file to fall over (for example mozilla, its very annoying to
have a long build like that fall over right at the end due to a fopen :)).

Running emerge search as a normal user and hitting ctrl + c :

mick@dhcp-edub03-232-16 mick $ emerge search splat
!!! Portage interrupted by SIGINT; exiting.
Traceback (most recent call last):
  File "/usr/bin/emerge", line 6, in ?
    import output
  File "/usr/lib/python2.2/site-packages/output.py", line 4, in ?
    import portage;
  File "/usr/lib/python2.2/site-packages/portage.py", line 3277, in ?
    db["/"]["porttree"]=portagetree("/",virts)
  File "/usr/lib/python2.2/site-packages/portage.py", line 2407, in __init__
    self.portroot=settings["PORTDIR"]
  File "/usr/lib/python2.2/site-packages/portage.py", line 633, in __getitem__
    self.populate()
  File "/usr/lib/python2.2/site-packages/portage.py", line 628, in populate
    self.use_regenerate()
  File "/usr/lib/python2.2/site-packages/portage.py", line 579, in use_regenerate
    self.configdict["auto"]["USE"]=autouse(db[root]["vartree"])
  File "/usr/lib/python2.2/site-packages/portage.py", line 559, in autouse
    myresult=myvartree.depcheck(mydep,lookatuse=0)
  File "/usr/lib/python2.2/site-packages/portage.py", line 1900, in depcheck
    mysplit2=self.dep_wordreduce(mysplit2)
  File "/usr/lib/python2.2/site-packages/portage.py", line 1925, in dep_wordreduce
    mydep=self.dep_depreduce(deplist[mypos])
  File "/usr/lib/python2.2/site-packages/portage.py", line 1995, in dep_depreduce
    if self.hasnode(mypkgdep):
  File "/usr/lib/python2.2/site-packages/portage.py", line 1851, in hasnode
    myreskey=self.resolve_key(mykey)
  File "/usr/lib/python2.2/site-packages/portage.py", line 1800, in resolve_key
    self.load(mykey)
  File "/usr/lib/python2.2/site-packages/portage.py", line 2313, in load
    if x[0:len(mypkg)]!=mypkg:
  File "/usr/lib/python2.2/site-packages/portage.py", line 98, in exithandler
    os.unlink("/etc/ld.so.preload")
OSError: [Errno 13] Permission denied: '/etc/ld.so.preload'

Looking at the offending code:

#handle ^C interrupts correctly:
def exithandler(signum,frame):
	print "!!! Portage interrupted by SIGINT; exiting."
	#disable sandboxing to prevent problems
	if os.path.exists("/etc/ld.so.preload"):
		os.unlink("/etc/ld.so.preload")
	# 0=send to *everybody* in process group
	os.kill(0,signal.SIGKILL)
	sys.exit(1)
signal.signal(signal.SIGINT,exithandler)

My current workaround is to "touch /etc/ld.so.preload" and not hit ctrl+c during
an emerge search as root during an emerge :)

(AFAIK /etc/ld.so.preload is used for pre loading shared objects before any
program runs, so its very important this file is either empty or only contains
critical pre loads or else the system could fall over).
Comment 6 Dan Armak (RETIRED) gentoo-dev 2002-05-14 13:43:56 UTC
I confirm - happened to me twice. Different packages, and emerging again ws ok in both cases. I was emerging two packages both times, but didn't notice that as the cause at first because I do it all the time and nothing happens. It happened to me with kdetoys and PDL. Nothing to connect the two cases afaics or to single them out from among my other parallel emerges. 
Comment 7 Dan Armak (RETIRED) gentoo-dev 2002-05-23 13:03:13 UTC
Happened to me several more times. I vote this one up the priority list :-) 
 
I guess it's as repoducible as it gets on my machine, so I'm on cc: and am 
ready to test any proposed fix or reproduction/debug attempt. 
Comment 8 Daniel Robbins (RETIRED) gentoo-dev 2002-06-24 12:14:25 UTC
This should be working now.  Let me know if it isn't.