Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 615328 - Portage crashes on unimplemented os.nice syscall under WSL
Summary: Portage crashes on unimplemented os.nice syscall under WSL
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-12 06:44 UTC by Peter Foley
Modified: 2017-06-21 07:49 UTC (History)
1 user (show)

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


Attachments
Properly handle os.nice failure (0001-Prevent-crash-if-os.nice-fails.patch,998 bytes, patch)
2017-04-12 15:20 UTC, Peter Foley
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Foley 2017-04-12 06:44:40 UTC
With prefix-portage-2.3.5 under WSL (Ubuntu 16.04 / Windows 10.0.15063)

When running bootstrap-prefix.sh, calling os.nice fails, and since PORTAGE_NICENESS is not defined, portage crashes instead of printing an error and continuing.

Changing settings["PORTAGE_NICENESS"] to settings.get("PORTAGE_NICENESS", "0") allows installation to continue.


Traceback (most recent call last):
  File "/home/peter/gentoo/tmp/usr/bin/emerge", line 50, in <module>
    retval = emerge_main()
  File "/home/peter/gentoo/tmp/usr/lib/portage/pym/_emerge/main.py", line 1229, in emerge_main
    return run_action(emerge_config)
  File "/home/peter/gentoo/tmp/usr/lib/portage/pym/_emerge/actions.py", line 2885, in run_action
    apply_priorities(emerge_config.target_config.settings)
  File "/home/peter/gentoo/tmp/usr/lib/portage/pym/_emerge/actions.py", line 2570, in apply_priorities
    nice(settings)
  File "/home/peter/gentoo/tmp/usr/lib/portage/pym/_emerge/actions.py", line 2578, in nice
    settings["PORTAGE_NICENESS"])
  File "/home/peter/gentoo/tmp/usr/lib/portage/pym/portage/package/ebuild/config.py", line 2589, in __getitem__
    return self._getitem(key)
  File "/home/peter/gentoo/tmp/usr/lib/portage/pym/portage/package/ebuild/config.py", line 2642, in _getitem
    raise KeyError(mykey)
KeyError: u'PORTAGE_NICENESS'
Comment 1 Fabian Groffen gentoo-dev 2017-04-12 07:08:16 UTC
I haven't checked yet, but I don't think this is prefix specific, so portage team might be interested in fixing this as well.
Comment 2 Peter Foley 2017-04-12 07:13:10 UTC
It doesn't seem to be, so I sent a patch to gentoo-portage-dev@.
Comment 3 Peter Foley 2017-04-12 07:17:38 UTC
Also relevant: https://github.com/Microsoft/BashOnWindows/issues/1838
Comment 4 Mike Gilbert gentoo-dev 2017-04-12 14:58:15 UTC
(In reply to Peter Foley from comment #2)
> It doesn't seem to be, so I sent a patch to gentoo-portage-dev@.

I have not seen any patch on the list. Are you sure you sent it? Perhaps it bounced or you used the wrong email.
Comment 5 Peter Foley 2017-04-12 15:20:22 UTC
Created attachment 469814 [details, diff]
Properly handle os.nice failure
Comment 6 Peter Foley 2017-04-12 15:21:02 UTC
I sent it to gentoo-portage-dev@lists.gentoo.org, and didn't get any bounce message...
Added as an attachment anyway.
Comment 7 Zac Medico gentoo-dev 2017-04-12 16:47:36 UTC
Thanks, this is in the master branch:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=e9cd44dbd0366267b8b6beb011d91a9f99fed3cd
Comment 8 Fabian Groffen gentoo-dev 2017-06-21 07:49:51 UTC
The fix is in a released Portage version now, thanks!