Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 5766 - vim-6.1-r9 creates an access violation
Summary: vim-6.1-r9 creates an access violation
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Michael M Nazaroff (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-30 05:13 UTC by jochem prins
Modified: 2003-02-04 19:42 UTC (History)
1 user (show)

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


Attachments
vim-access violation log (sandbox-vim-6.1-r9-8643.log,46 bytes, application/octet-stream)
2002-07-30 05:14 UTC, jochem prins
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jochem prins 2002-07-30 05:13:08 UTC
I tried to update vim to 6.1-r9 but got an access violation.

gcc-compiler 2.95.3-r7
portage 2.0.13
Comment 1 jochem prins 2002-07-30 05:14:18 UTC
Created attachment 2683 [details]
vim-access violation log
Comment 2 jochem prins 2002-07-31 05:00:37 UTC
When I'm in the console I can emerge vim-6.1-r9 successfully. So there's
something messed up when people try to emerge vim-6.1-r9 when they've su'ed to
root in a xterm.

Note: with console I mean the none-graphical environment not some x11-term.
Comment 3 Martin Holzer (RETIRED) gentoo-dev 2002-08-02 02:56:50 UTC
its like bug #4642 
Comment 4 Roy Thompson 2002-09-12 05:46:22 UTC
4642 is marked as closed, but I still get this error with vim-6.1-r10
I am running emerge from an ssh session (no local console on the pc).
I have had this error with all vims r8 to r10.

I current have r7 installed, but I have a feeling I installed that
from a local console to work around this error, but plugging in a monitor
and keyboard. (I normally have this gentoo box on a shelf with no keyboard
or monitor).

I have managed to emerge vim by disabling the sandbox before installing...
export SANDBOX_DISABLED=1 ; emerge -u vim

Roy
Comment 5 Michael M Nazaroff (RETIRED) gentoo-dev 2002-09-12 12:50:00 UTC
OK thanx for letting me know whats going on.. I'm very disabled at the moment...
no internet connection at home, so I will be slow take a look at this and fix
it.  What verion of portage are you using?  Updating to the newest seems to have
helped  alot of people with the old sandbox violations, is the error log the
same for you? can you send me yours if it is.

Naz
Comment 6 Roy Thompson 2002-09-14 05:00:34 UTC
portage = 2.0.36
I've unmerged vim and emerged again (now on r11)
(this is all still within an ssh session, logged in as root).

These are the packages that I would merge, in order.

Calculating dependencies ...done!
[ebuild  N   ] app-editors/vim-core-6.1 to /
[ebuild  N   ] app-editors/vim-6.1-r11 to /

vim-core-6.1 failed with same error as vim-6.1-r10 did.

end of emerge output...

gzipping man page: /var/tmp/portage/vim-core-6.1/image//usr/share/man/man1/vim.1
gzipping man page: /var/tmp/portage/vim-core-6.1/image//usr/share/man/man1/vimdiff.1
gzipping man page:
/var/tmp/portage/vim-core-6.1/image//usr/share/man/man1/vimtutor.1
gzipping man page: /var/tmp/portage/vim-core-6.1/image//usr/share/man/man1/xxd.1
strip:
/var/tmp/portage/vim-core-6.1/image/usr/bin/xxd
>>> Completed installing into /var/tmp/portage/vim-core-6.1/image/

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-vim-core-6.1-18042.log"

chmod:     /dev/pty/s0
--------------------------------------------------------------------------------

root # cat /tmp/sandbox-vim-core-6.1-18042.log
chmod:     /dev/pty/s0

root # ls -l /dev/pty/s0
crw--w----    1 root     tty        3,   0 Sep 14 11:12 /dev/pty/s0

enough info?

Roy
Comment 7 Roy Thompson 2002-09-20 11:01:44 UTC
I've found the problem I think.
basically, the ebuild script is doing "addwrite /dev/pty/*", but
this does not work, you need to name the specific device file in
/dev/pty/ that is being used.  In my case this is s0.

I tested out this theory by using the sandbox command directly on the
command line... (addwrite sets the SANDBOX_WRITE environment variable)

fillerbunny vim-core # /usr/lib/portage/bin/sandbox
========================== Gentoo linux path sandbox ===========================
Detection of the support files.
Verification of the required files.
Setting up the required environment variables.
The protected environment has been started.
--------------------------------------------------------------------------------
Shell being started in forked process.
fillerbunny vim-core # echo $SANDBOX_WRITE
/dev/zero:/dev/fd/:/dev/null:/dev/pts/:/dev/vc/:/dev/tty:/tmp/:
/var/log/scrollkeeper.log:/root/.gconfd/lock:/root/.bash_history:
/usr/tmp/conftest:/usr/lib/conftest:/usr/tmp/cf:/usr/lib/cf::/tmp:
/var/tmp:/tmp/:/var/tmp/
fillerbunny vim-core # export SANDBOX_WRITE=$SANDBOX_WRITE:/dev/pty/*
fillerbunny vim-core # echo $SANDBOX_WRITE
/dev/zero:/dev/fd/:/dev/null:/dev/pts/:/dev/vc/:/dev/tty:/tmp/:
/var/log/scrollkeeper.log:/root/.gconfd/lock:/root/.bash_history:
/usr/tmp/conftest:/usr/lib/conftest:/usr/tmp/cf:/usr/lib/cf::/tmp:
/var/tmp:/tmp/:/var/tmp/:/dev/pty/*
fillerbunny vim-core # chmod +w /dev/pty/s0
ACCESS DENIED  chmod:     /dev/pty/s0
chmod: changing permissions of `/dev/pty/s0': Permission denied
fillerbunny vim-core # export SANDBOX_WRITE=$SANDBOX_WRITE:/dev/pty/s0
fillerbunny vim-core # chmod +w /dev/pty/s0
fillerbunny vim-core # exit
exit
Cleaning up sandbox process
Cleaning up pids file.
========================== Gentoo linux path sandbox ===========================
The protected environment has been shut down.
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-17447.log"

chmod:     /dev/pty/s0
--------------------------------------------------------------------------------
fillerbunny vim-core #

I'm not sure if there is one way to find out which device is going
to be chmod'd.  In my example, since I'm using ssh, I think it would
be safe to do addwrite "${SSH_TTY}", but I don't know about people not
using ssh.

I've change this line in my copy of the vim ebuild file...
addwrite /dev/pty/*
to
addwrite "${SSH_TTY}"

and I can emerge vim without getting the error.

(note I've had to do this in the vim-core ebuild file as well
as the vim one now it has been split out).

actually, I'm thinking addwrite `tty` would be more generic.

that seems to work for me too.

thoughts anyone?

roy
Comment 8 Michael M Nazaroff (RETIRED) gentoo-dev 2002-09-21 16:24:00 UTC
Roy thanx for help.. I'm without a internet connection but I'm trying get on something so I 
can fix this stuff.. think SSH_TTY is the way to go, I'm on friends powerbook and was 
going to use is hopefully soon gentoo box or bring over my machine so I can actually do 
something :o)

Naz
Comment 9 Michael M Nazaroff (RETIRED) gentoo-dev 2002-09-21 18:56:58 UTC
Ok commited the fixes to vim so all the sandbox violation should be fixed now

Naz