New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 760660 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Last visit > 30 days ago
Closed: Sep 6
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

cros_sdk fails with "OSError: [Errno 28] No space left on device"

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36

Steps to reproduce the problem:
1. repo init -u https://chromium.googlesource.com/chromiumos/manifest.git
2. repo sync
3. cros_sdk

What is the expected behavior?
cros_sdk command should create chroot successfully.

What went wrong?
 * Generating locale-archive: forcing # of jobs to 1
17:57:38: INFO: Determining required toolchain updates...
17:57:39: INFO: Nothing to update!
17:57:39: INFO: Nothing to clean!
INFO    cros_sdk:make_chroot: Running emerge curl sudo gentoolkit ...
 * Generating locale-archive: forcing # of jobs to 1
Traceback (most recent call last):
  File "/mnt/host/source/chromite/bin/parallel_emerge", line 168, in <module>
    DoMain()
  File "/mnt/host/source/chromite/bin/parallel_emerge", line 164, in DoMain
    commandline.ScriptWrapperMain(FindTarget)
  File "/mnt/host/source/chromite/lib/commandline.py", line 889, in ScriptWrapperMain
    target = find_target_func(target)
  File "/mnt/host/source/chromite/bin/parallel_emerge", line 139, in FindTarget
    module = cros_import.ImportModule(target)
  File "/mnt/host/source/chromite/lib/cros_import.py", line 43, in ImportModule
    module = __import__(target)
  File "/mnt/host/source/chromite/scripts/parallel_emerge.py", line 122, in <module>
    KILLED = multiprocessing.Event()
  File "/usr/lib64/python2.7/multiprocessing/__init__.py", line 211, in Event
    return Event()
  File "/usr/lib64/python2.7/multiprocessing/synchronize.py", line 302, in __init__
    self._cond = Condition(Lock())
  File "/usr/lib64/python2.7/multiprocessing/synchronize.py", line 147, in __init__
    SemLock.__init__(self, SEMAPHORE, 1, 1)
  File "/usr/lib64/python2.7/multiprocessing/synchronize.py", line 75, in __init__
    sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue)
OSError: [Errno 28] No space left on device

Did this work before? N/A 

Chrome version:   Channel: n/a
OS Version: 
Flash Version: 

 Filesystem                                           Size  Used Avail Use% 
> Mounted on 
> tmpfs                                                 16G  133M   16G   1% 
> /dev/shm 

Also i have 20Gb+ disk space in each partition.
 
Cc: adurbin@chromium.org
Owner: bmgordon@chromium.org
What is the distro and version of your host OS?
Ubuntu 16.04 LTS
I set up a fresh Ubuntu 16.04.3 LTS install this morning, but I wasn't able to reproduce this.  Here are a couple of things you could try to narrow this down more:

"ipcs -s" will show if something is using up all your semaphores (unlikely)

To see if python multiprocessing is working in general, try running

python -c "import multiprocessing; e = multiprocessing.Event(); e.set()"

If that fails with a similar error then the problem isn't related to the chroot.  If that succeeds, please run "cros_sdk --replace --debug" and paste the output to this bug.

Components: Internals
OK, i got the root cause now. ( hopefully)

first of all, to answer your questions...

"ipcs -s" --> shows nothing.
python -c "import multiprocessing; e = multiprocessing.Event(); e.set()" --> worked fine outside of my chroot.
cros_sdk --replace --debug --> gives same error.

But after i get the error, i was able to enter chroot with cros_sdk command.
Inside chroot "python -c "import multiprocessing; e = multiprocessing.Event(); e.set()"" failed with same error.

So i checked my mount points and found /dev/shm was not mounted in my chroot.
I edited /etc/fstab and added "none      /dev/shm        tmpfs   defaults,size=5G        0 0" and "sudo mount -a" that mounted the /dev/shm. Now i can execute "python -c "import multiprocessing; e = multiprocessing.Event(); e.set()"" without error inside chroot and also setup any board.

So looks like with latest cros_sdk, /etc/fstab is missing to add entry for /dev/shm.

Thanks for the additional details.  I'm also seeing that /dev/shm isn't mounted into the chroot, but it isn't causing the failures you're seeing for me.  If I don't find an underlying reason for that difference, your suggestion of copying the /dev/shm mount into the chroot seems like a plausible fix.
Project Member

Comment 8 by sheriffbot@chromium.org, Sep 6

Status: Archived (was: Unconfirmed)
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment