Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ionice: ioprio_set failed: Invalid argument #498

Closed
MrObvious opened this issue Jun 9, 2016 · 44 comments
Closed

ionice: ioprio_set failed: Invalid argument #498

MrObvious opened this issue Jun 9, 2016 · 44 comments
Assignees
Labels

Comments

@MrObvious
Copy link

Doing an Android compile, I cannot go much further on the brunch stage. Let me know if this is enough detail, or you need more.

For reference: http://stackoverflow.com/questions/37444998/error-ionice-ioprio-set-failed-invalid-argument-while-trying-to-build-custom

@MrObvious
Copy link
Author

Hi any updates?

@sunilmut
Copy link
Member

Sorry for the delay. Without an strace it is difficult to say what exactly (what's unimplemented) you are running into. Could you collect one and share it out?

@MrObvious
Copy link
Author

Certainly. Do you have instructions?

@sunilmut
Copy link
Member

strace -o strace_file_name -ff failing_command

And then share out the strace file.

@MrObvious
Copy link
Author

MrObvious commented Jun 15, 2016

user@PC:~/cm12$ strace -o strace_file_name -ff "schedtool -B -n 1 -e ionice -n 1 make -C $T -j$(cat /proc/c
puinfo | grep "^processor" | wc -l) "$@""
strace: Test for PTRACE_O_TRACESYSGOOD failed, giving up using this feature.
strace: Can't stat 'schedtool -B -n 1 -e ionice -n 1 make -C -j4 ': No such file or directory

@benhillis
Copy link
Member

Sorry I believe the "-ff" argument must come before "-o". After you run the below please share strace_file_name.* with us.

strace -ff -o strace_file_name failing_command

@MrObvious
Copy link
Author

execve("/usr/bin/schedtool", ["schedtool", "-B", "-n", "1", "-e", "ionice", "-n", "1", "make", "-C", "-j4"], [/* 17 vars /]) = 0
brk(0) = 0x15fe000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f301ac60000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=57039, ...}) = 0
mmap(NULL, 57039, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f301ac52000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P \2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1840928, ...}) = 0
mmap(NULL, 3949248, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f301a630000
mprotect(0x7f301a7ea000, 2097152, PROT_NONE) = 0
mmap(0x7f301a9ea000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1ba000) = 0x7f301a9ea000
mmap(0x7f301a9f0000, 17088, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f301a9f0000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f301ac50000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f301ac40000
arch_prctl(ARCH_SET_FS, 0x7f301ac40740) = 0
mprotect(0x7f301a9ea000, 16384, PROT_READ) = 0
mprotect(0x602000, 4096, PROT_READ) = 0
mprotect(0x7f301ac22000, 4096, PROT_READ) = 0
munmap(0x7f301ac52000, 57039) = 0
getpid() = 1113
sched_setscheduler(1113, 0x3 /
SCHED_??? /, { 0 }) = 0
setpriority(PRIO_PROCESS, 1113, 1) = 0
execve("/usr/local/sbin/ionice", ["ionice", "-n", "1", "make", "-C", "-j4"], [/
17 vars /]) = -1 ENOENT (No such file or directory)
execve("/usr/local/bin/ionice", ["ionice", "-n", "1", "make", "-C", "-j4"], [/
17 vars /]) = -1 ENOENT (No such file or directory)
execve("/usr/sbin/ionice", ["ionice", "-n", "1", "make", "-C", "-j4"], [/
17 vars /]) = -1 ENOENT (No such file or directory)
execve("/usr/bin/ionice", ["ionice", "-n", "1", "make", "-C", "-j4"], [/
17 vars */]) = 0
brk(0) = 0x2539000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7faa2a250000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=57039, ...}) = 0
mmap(NULL, 57039, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7faa2a242000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P \2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1840928, ...}) = 0
mmap(NULL, 3949248, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7faa29c30000
mprotect(0x7faa29dea000, 2097152, PROT_NONE) = 0
mmap(0x7faa29fea000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1ba000) = 0x7faa29fea000
mmap(0x7faa29ff0000, 17088, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7faa29ff0000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7faa2a240000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7faa2a230000
arch_prctl(ARCH_SET_FS, 0x7faa2a230740) = 0
mprotect(0x7faa29fea000, 16384, PROT_READ) = 0
mprotect(0x603000, 4096, PROT_READ) = 0
mprotect(0x7faa2a222000, 4096, PROT_READ) = 0
munmap(0x7faa2a242000, 57039) = 0
brk(0) = 0x2539000
brk(0x255a000) = 0x255a000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1607664, ...}) = 0
mmap(NULL, 1607664, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7faa2a099000
close(3) = 0
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2570, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7faa2a090000
read(3, "# Locale name alias data base.\n#"..., 512) = 512
read(3, "PURPOSE. See the\n# GNU General "..., 512) = 512
read(3, " entries are case independent.\n\n"..., 512) = 512
read(3, "859-1\nfinnish fi_FI.ISO-"..., 512) = 512
read(3, "R\nko_KR\t\tko_KR.eucKR\nlithuanian "..., 512) = 512
read(3, "SO-8859-9\n", 512) = 10
read(3, "", 512) = 0
close(3) = 0
munmap(0x7faa2a090000, 4096) = 0
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US.UTF-8/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US.utf8/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en.UTF-8/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en.utf8/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
ioprio_set(0x1, 0, 0x4001) = -1 EINVAL (Invalid argument)
write(2, "ionice: ", 8) = 8
write(2, "ioprio_set failed", 17) = 17
write(2, ": ", 2) = 2
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "Invalid argument\n", 17) = 17
exit_group(1) = ?
+++ exited with 1 +++

@benhillis
Copy link
Member

Thanks, this looks like it's failing due to the ioprio_set system call not being implemented.

@MrObvious
Copy link
Author

Hopefully is it an easy fix?

@sunilmut
Copy link
Member

@MrObvious - I have opened a bug to track this, but unfortunately it won't make the cut for the Anniversary update. But, as far as Insider ring is considered, it shouldn't matter much because they should (hopefully) start flighting post RS1 bits soon.

@thanhphat11
Copy link

This error is extremely important to fix. If bash on Windows 10 can not build rom android os, this is a very bad thing

@MrObvious
Copy link
Author

Any updates on when this will be pushed out to the fast ring?

@thanhphat11
Copy link

I have not noticed any updates to fix this error. @MrObvious

@benhillis
Copy link
Member

Unfortunately this syscall isn't going to make the Windows 10 Anniversary Update. However, this is on our backlog and we'll definitely be looking into it.

@thanhphat11
Copy link

I hope to have this fix update coming soon. @benhillis

@akhilnarang
Copy link

Use make instead of mka

@aseering
Copy link
Contributor

As a workaround: ionice is almost certainly not actually required to build Android; it just causes the compile process to not slow down the rest of the machine so much while it's running.

Here's a replacement 'ionice' that's a no-op. It'd be interesting if someone could give it a try:
https://gist.github.com/aseering/87cbb5e8fd8cbaef2eef2a39f64b3528

@thanhphat11
Copy link

If without ionce is not build rom android @aseering how do you feel ??

@aseering
Copy link
Contributor

@thanhphat11 -- Unfortunately, I don't understand your question... Could you re-phrase it?

@thanhphat11
Copy link

Currently ionce error and I can not make it brunch rom android build tool can not check when I rom android brunch. Does your ionce can solve this problem ?? @aseering

@akhilnarang
Copy link

Brunch isn't needed to build an android ROM
You can use lunch and make
Brunch uses mka which uses schedtool and ionice with make, and ionice
dosent seem to want to work

On Aug 11, 2016 5:53 AM, "Tsần Thành Phát" notifications@github.com wrote:

Currently ionce error and I can not make it brunch rom android build tool
can not check when I rom android brunch. Does your ionce can solve this
problem ?? @aseering https://github.com/aseering


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#498 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJpnfSmfUppOtoSO0rrd6ohTdagq43kUks5qemucgaJpZM4IyXGn
.

@aseering
Copy link
Contributor

Ah, thanks for re-phrasing. I hope my ionice will solve that problem. Could you try it and see if it works?

ionice doesn't work in WSL; I can't fix that. But I think the Android ROM build doesn't really need ionice. I think it just uses ionice for better performance. So my script just hides the error and disables ionice. I think that will work. But the only way to know for sure is to try it.

@SGCMarkus
Copy link

Hi, i tried your ionice workaround, and also the lunch/breakfast and then make combo, but either way i just get the output of what it builds (Platform, Target and so on) and afterwards nothing, CPU usage is at ~15% on all cores but no output anymore on the bash, if i cancel, i get loads of python errors:

File "build/tools/findleaves.py", line 100, in

main(sys.argv)

File "build/tools/findleaves.py", line 94, in main
results = list(set(perform_find(mindepth, prune, dirlist, filename)))
markus@DESKTOP-5E405NL:~/cm13$ File "build/tools/findleaves.py", line 33, in perform_find
for root, dirs, files in os.walk(rootdir, followlinks=True):
File "/usr/lib/python2.7/os.py", line 294, in walk
for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib/python2.7/os.py", line 294, in walk
for x in walk(new_path, topdown, onerror, followlinks):
.
.
.
File "/usr/lib/python2.7/os.py", line 294, in walk
for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib/python2.7/os.py", line 294, in walk
for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib/python2.7/os.py", line 294, in walk
for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib/python2.7/os.py", line 294, in walk
for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib/python2.7/os.py", line 294, in walk
for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib/python2.7/os.py", line 294, in walk
for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib/python2.7/os.py", line 294, in walk
for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib/python2.7/os.py", line 294, in walk
for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib/python2.7/os.py", line 294, in walk
for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib/python2.7/os.py", line 294, in walk
for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib/python2.7/os.py", line 294, in walk
for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib/python2.7/os.py", line 284, in walk
if isdir(join(top, name)):
File "/usr/lib/python2.7/genericpath.py", line 41, in isdir
st = os.stat(s)

@fmckeogh
Copy link

I have the exact same issue as @SGCMarkus when compiling CyanogenMod 13 for Oneplus 3

@MrObvious
Copy link
Author

The issue is still occurring on the latest build 14901.

@azam426
Copy link

azam426 commented Sep 16, 2016

Update : This issue is still NOT solved in build 14926

@rgatkinson
Copy link

rgatkinson commented Sep 29, 2016

I think this is failing in findleaves.py because of some circular structure of symbolic links. findleaves is called from build/core/main.mk. It just might instead be a MAX_PATH issue.

@thanhphat11
Copy link

I thought no one cared to fix this problem

@thanhphat11
Copy link

This issue has been forgotten @ALL

@benhillis
Copy link
Member

I've opened an internal bug to track this.

@benhillis benhillis added the bug label Nov 29, 2016
@ghost
Copy link

ghost commented Dec 31, 2016

it's work for me with make command on cm-12.1 but get same error when run brunch
untitled

@Vikanen
Copy link

Vikanen commented Jan 25, 2017

Anyone managed fix to this?

@matyasf
Copy link

matyasf commented Feb 4, 2017

Any update on this? I've heard that the creators update will include updates to the Linux subsystem, will it have this syscall?

@bitcrazed
Copy link
Contributor

@matyasf Please read thread above: We won't have time to implement the ioprio_set system call for Creators Update, but we have an internal bug tracking this issue and it's on the backlog for a future release.

@snickler
Copy link

snickler commented Feb 5, 2017

@bitcrazed - Thanks for the update!

@bm0x
Copy link

bm0x commented May 1, 2017

image
´´´
No matter how hard I try ... I do not know how to fix the ionic error ... I hope the Creators Update has been fixed.
´´´

@ghost
Copy link

ghost commented May 1, 2017

This issue is still occurring on build # 16184 (latest build in fast ring).

@acrilique
Copy link

It seems to work perfectly using
$ lunch device
And then
$ make -j8 (I'm using -j8 cause 8 is the name of threads in my CPU).

But still getting error with brunch.

@bm0x
Copy link

bm0x commented May 3, 2017

image

No matter how much he has done the command, he does not advance at all...

@aseering
Copy link
Contributor

aseering commented May 3, 2017

Is your CPU in use when you're in this state? If so, what process is using CPU? If not, could you try running strace -ff make? And, assuming that hangs, post its output.

@StoneToken
Copy link

Hi there! Is there any ETA on this issue? It's still up on build 16232.

@benhillis benhillis self-assigned this Jul 20, 2017
@benhillis
Copy link
Member

Taking a look at this now.

@benhillis
Copy link
Member

Some basic support for this system call is making its way to an Insider build.

@sunilmut
Copy link
Member

This is fixed in Fall Creators Update and any build > 16273.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests