Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
IOError: [Errno 22] Invalid argument [SOLVED, sort of]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6281

PostPosted: Tue Jan 20, 2015 1:07 pm    Post subject: IOError: [Errno 22] Invalid argument [SOLVED, sort of] Reply with quote

I am currently trying to install gentoo from stage3, but every attempt to emerge something fails with the same error:
emerge -1O portage wrote:
>>> Emerging (1 of 1) sys-apps/portage-2.2.15
[Errno 22] Invalid argument:
/bin/bash -c /var/tmp/portage/._portage_reinstall_.IEaBQh/bin/ebuild.sh clean
Traceback (most recent call last):
File "/usr/lib64/portage/pym/portage/process.py", line 316, in spawn
unshare_net, unshare_ipc, cgroup)
File "/usr/lib64/portage/pym/portage/process.py", line 458, in _exec
f.write('%d\n' % os.getpid())
IOError: [Errno 22] Invalid argument

Usually, this error seems to be related with selinux, I am in a chroot from within a (rather old) rescue CD.

Of course, I can try to use a newer rescue CD or make other random experiments, but maybe somebody can give a hint what might be the cause or how I can find it.


Last edited by mv on Tue Jan 20, 2015 2:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Tue Jan 20, 2015 1:24 pm    Post subject: Reply with quote

Code:
cat process.py | grep -B6 -A2 '\%d\\n' -n
453-
454-   # Add to cgroup
455-   # it's better to do it from the child since we can guarantee
456-   # it is done before we start forking children
457-   if cgroup:
458-      with open(os.path.join(cgroup, 'cgroup.procs'), 'a') as f:
459:         f.write('%d\n' % os.getpid())
460-
461-   # Unshare (while still uid==0)

cgroup related, better build your kernel and boot it to upgrade from there. Or use a more recent cd, or fight with portage and cgroup handling ;)
(i'm unsure of your choice but for me last one look scary)
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6281

PostPosted: Tue Jan 20, 2015 1:41 pm    Post subject: Reply with quote

Thanks. I had copied the portage configuration from my working system which contains FEATURES=cgroups
Adding FEATURES=-cgroups alone did not fix it, but playing with FETCHCOMMAND additionally, miraculously makes it work, sometimes...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum