[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug 1926246] Re: chrome based apps can not be run under qemu user mode
From: |
Thomas Huth |
Subject: |
[Bug 1926246] Re: chrome based apps can not be run under qemu user mode |
Date: |
Sat, 15 May 2021 11:17:04 -0000 |
The QEMU project is currently moving its bug tracking to another system.
For this we need to know which bugs are still valid and which could be
closed already. Thus we are setting the bug state to "Incomplete" now.
If the bug has already been fixed in the latest upstream version of QEMU,
then please close this ticket as "Fix released".
If it is not fixed yet and you think that this bug report here is still
valid, then you have two options:
1) If you already have an account on gitlab.com, please open a new ticket
for this problem in our new tracker here:
https://gitlab.com/qemu-project/qemu/-/issues
and then close this ticket here on Launchpad (or let it expire auto-
matically after 60 days). Please mention the URL of this bug ticket on
Launchpad in the new ticket on GitLab.
2) If you don't have an account on gitlab.com and don't intend to get
one, but still would like to keep this ticket opened, then please switch
the state back to "New" or "Confirmed" within the next 60 days (other-
wise it will get closed as "Expired"). We will then eventually migrate
the ticket automatically to the new system (but you won't be the reporter
of the bug in the new system and thus you won't get notified on changes
anymore).
Thank you and sorry for the inconvenience.
** Changed in: qemu
Status: New => Incomplete
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1926246
Title:
chrome based apps can not be run under qemu user mode
Status in QEMU:
Incomplete
Bug description:
chrome uses /proc/self/exe to fork render process.
Here a simple code to reproduce the issue. It's output parent then child but
failed with qemu: unknown option 'type=renderer'.
Maybe we can modify exec syscall to replace /proc/self/exe to the real
path.
//gcc -o self self.c
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main(int argc, char** argv) {
if(argc==1){
printf ("parent\n");
if ( fork() == 0 )
{
return execl("/proc/self/exe","/proc/self/exe",
"--type=renderer",NULL);
}
} else {
printf ("child\n");
}
return 0;
}
similar reports:
https://github.com/AppImage/AppImageKit/issues/965
https://github.com/golang/go/issues/42080
Workardound:
compile chrome or your chrome based app with a patch to
content/common/child_process_host_impl.cc:GetChildPath, get the realpath of
/proc/self/exe:
diff --git a/content/common/child_process_host_impl.cc
b/content/common/child_process_host_impl.cc
index bc78aba80ac8..9fab74d3bae8 100644
--- a/content/common/child_process_host_impl.cc
+++ b/content/common/child_process_host_impl.cc
@@ -60,8 +60,12 @@ base::FilePath ChildProcessHost::GetChildPath(int flags) {
#if defined(OS_LINUX)
// Use /proc/self/exe rather than our known binary path so updates
// can't swap out the binary from underneath us.
- if (child_path.empty() && flags & CHILD_ALLOW_SELF)
- child_path = base::FilePath(base::kProcSelfExe);
+ if (child_path.empty() && flags & CHILD_ALLOW_SELF) {
+ if (!ReadSymbolicLink(base::FilePath(base::kProcSelfExe), &child_path)) {
+ NOTREACHED() << "Unable to resolve " << base::kProcSelfExe << ".";
+ child_path = base::FilePath(base::kProcSelfExe);
+ }
+ }
#endif
// On most platforms, the child executable is the same as the
current
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1926246/+subscriptions
- [Bug 1926246] Re: chrome based apps can not be run under qemu user mode,
Thomas Huth <=