Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 610482 - [abrt] crash in policycoreutils-python-2.0.82-31.fc13: sandbox:97:copyfile:IndexError: list index out of range
[abrt] crash in policycoreutils-python-2.0.82-31.fc13: sandbox:97:copyfile:In...
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: policycoreutils (Show other bugs)
13
i686 Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
abrt_hash:d25a9550
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-02 04:21 EDT by cyrushmh
Modified: 2010-09-22 08:06 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-09-22 08:06:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: backtrace (1.21 KB, text/plain)
2010-07-02 04:21 EDT, cyrushmh
no flags Details

  None (edit)
Description cyrushmh 2010-07-02 04:21:41 EDT
abrt 1.1.1 detected a crash.

architecture: i686
cmdline: /usr/bin/python -E /usr/bin/sandbox -X -W metacity -i /bin -i /dev -i /etc -i /etc/alsa -i /etc/fonts -i /etc/miredo -i /etc/opt -i /home/CyrusHMH/.bash_profile -i /home/CyrusHMH/.bashrc -i /home/CyrusHMH/.config -i /home/CyrusHMH/.dmrc -i /home/CyrusHMH/.ems.cfg -i /home/CyrusHMH/.gconfd -i /home/CyrusHMH/.gnupg -i /home/CyrusHMH/.gtk-bookmarks -i /home/CyrusHMH/.gvfs -i /home/CyrusHMH/.jap.conf -i /home/CyrusHMH/.local -i /home/CyrusHMH/.mission-control -i /home/CyrusHMH/.mozilla -i /home/CyrusHMH/.opera -i /home/CyrusHMH/.pki -i /home/CyrusHMH/.vidalia -i /lib -i /opt -i /proc -i /sbin -i /selinux -i /srv -i /sys -i /usr -i /usr/lib -i /usr/bin -i /usr/share -i /usr/include -i /usr/src/kernels -i /usr/sbin -i /usr/share/fonts -i /usr/kerberos -i /usr/libexec -i /usr/lib/flash-plugin -i /usr/lib/jvm -i /usr/lib/mozilla -i /usr/lib/codecs -i /usr/lib/win32 -t sandbox_net_t gnome-terminal
component: policycoreutils
executable: /usr/bin/sandbox
kernel: 2.6.33.5-124.fc13.i686.PAE
package: policycoreutils-python-2.0.82-31.fc13
reason: sandbox:97:copyfile:IndexError: list index out of range
release: Fedora release 13 (Goddard)

backtrace
-----
sandbox:97:copyfile:IndexError: list index out of range

Traceback (most recent call last):
  File "/usr/bin/sandbox", line 422, in <module>
    rc = sandbox.main()
  File "/usr/bin/sandbox", line 409, in main
    self.__setup_dir()
  File "/usr/bin/sandbox", line 365, in __setup_dir
    self.__copyfiles()
  File "/usr/bin/sandbox", line 214, in __copyfiles
    copyfile(f, homedir, self.__homedir)
  File "/usr/bin/sandbox", line 97, in copyfile
    sys.stderr.write(e[1])
IndexError: list index out of range

Local variables in innermost frame:
e: [('/home/CyrusHMH/.config/google-chrome/SingletonSocket', '/home/CyrusHMH/.sandbox/.sandboxYusc3a/.config/google-chrome/SingletonSocket', "[Errno 6] No such device or address: '/home/CyrusHMH/.config/google-chrome/SingletonSocket'")]
re: <module 're' from '/usr/lib/python2.6/re.pyc'>
elist: Error([('/home/CyrusHMH/.config/google-chrome/SingletonSocket', '/home/CyrusHMH/.sandbox/.sandboxYusc3a/.config/google-chrome/SingletonSocket', "[Errno 6] No such device or address: '/home/CyrusHMH/.config/google-chrome/SingletonSocket'")],)
dest: '/home/CyrusHMH/.sandbox/.sandboxYusc3a/.config'
dname: '/home/CyrusHMH'
bname: '.config'
file: '/home/CyrusHMH/.config'
dir: '/home/CyrusHMH'

How to reproduce
-----
问题是,这样很麻烦
解决方法
1.rm -fr /home/CyrusHMH/.config/google-chrome/SingletonSocket
2.rm -fr /home/CyrusHMH/.sandbox/.sandboxYusc3a/.config/google-chrome/SingletonSocket
3.OK
Comment 1 cyrushmh 2010-07-02 04:21:44 EDT
Created attachment 428762 [details]
File: backtrace
Comment 2 Christoph A. 2010-08-13 13:39:06 EDT
Package: policycoreutils-python-2.0.82-31.fc13
Architecture: x86_64
OS Release: Fedora release 13 (Goddard)


How to reproduce
-----
1. start firefox (not in a sandbox) and make sure the lock file is there
2. start firefox within a sandbox with '-i ~/.mozilla' as parameter



Comment
-----
Somehow it is expected that firefox is not able to run twice (lock file), 
but I guess the sandbox should not crash.
Comment 3 Daniel Walsh 2010-08-13 15:08:06 EDT
If you edit /usr/bin/sandbox and change

  File "/usr/bin/sandbox", line 97, in copyfile
    sys.stderr.write(e[1])


to 

sys.stderr.write(str(e[1])

It will fix the code.

Fixed in policycoreutils-2.0.83-18
Comment 4 Christoph A. 2010-09-10 06:15:27 EDT
rpm -qa policycoreutils
policycoreutils-2.0.83-25.fc13.x86_64

sandbox X -t sandbox_web_t -H tmp -T tmp1  firefox
Traceback (most recent call last):
  File "/usr/bin/sandbox", line 431, in <module>
    rc = sandbox.main()
  File "/usr/bin/sandbox", line 418, in main
    self.__setup_dir()
  File "/usr/bin/sandbox", line 374, in __setup_dir
    self.__copyfiles()
  File "/usr/bin/sandbox", line 216, in __copyfiles
    copyfile(f, homedir, self.__homedir)
  File "/usr/bin/sandbox", line 90, in copyfile
    sys.stderr.write(str(e[1]))
IndexError: list index out of range
Comment 5 Christoph A. 2010-09-10 06:21:37 EDT
There is a missing '-' before the X, but I guess it shouldn't produce a traceback in all circumstances.
Comment 6 Daniel Walsh 2010-09-10 11:07:19 EDT
I can't get this error to happen.  I get a message 

sandbox X -t sandbox_web_t -H tmp -T tmp1  firefox
Unrecognized option: -H
use: X [:<display>] [option]
-a #                   default pointer acceleration (factor)
-ac                    disable access control restrictions
-audit int             set audit trail level
-auth file             select authorization file
-br                    create root window with black background
+bs                    enable any backing store support
-bs                    disable any backing store support
-c                     turns off key-click
c #                    key-click volume (0-100)
-cc int                default color visual class
-nocursor              disable the cursor
-core                  generate core dump on fatal error
-dpi int               screen resolution in dots per inch
-dpms                  disables VESA DPMS monitor control
...

Which indicates it is trying to start X with -H qualifier
Comment 7 Christoph A. 2010-09-10 13:16:03 EDT
It took me some time but I hope I got the trigger now: 
tempdir must contain a socket file

ll foo/
total 0
srwxrwxr-x. 1 user user 0 Sep 10 13:14 bar

sandbox echo -T foo/
Traceback (most recent call last):
  File "/usr/bin/sandbox", line 431, in <module>
    rc = sandbox.main()
  File "/usr/bin/sandbox", line 418, in main
    self.__setup_dir()
  File "/usr/bin/sandbox", line 374, in __setup_dir
    self.__copyfiles()
  File "/usr/bin/sandbox", line 216, in __copyfiles
    copyfile(f, homedir, self.__homedir)
  File "/usr/bin/sandbox", line 90, in copyfile
    sys.stderr.write(str(e[1]))
IndexError: list index out of range
Comment 8 Daniel Walsh 2010-09-13 11:43:19 EDT
Fixed in policycoreutils-2.0.83-26

Note You need to log in before you can comment on or make changes to this bug.