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

Envoy unable to be run as normal user after running as a superuser #4195

Closed
mancini0 opened this issue Aug 17, 2018 · 6 comments
Closed

Envoy unable to be run as normal user after running as a superuser #4195

mancini0 opened this issue Aug 17, 2018 · 6 comments
Labels
question Questions that are neither investigations, bugs, nor enhancements stale stalebot believes this issue/PR has not been touched recently

Comments

@mancini0
Copy link

mancini0 commented Aug 17, 2018

To reproduce, using envoy 1.7.1,

#run envoy as privileged user
sudo ./envoy
#run envoy as non-privileged user
./envoy

[2018-08-17 12:05:37.523][12870][critical][assert] external/envoy/source/server/hot_restart_impl.cc:58] panic: cannot open shared memory region /envoy_shared_memory_0 check user permissions
[2018-08-17 12:05:37.523][12870][critical][backtrace] bazel-out/k8-dbg/bin/external/envoy/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:125] Caught Aborted, suspect faulting address 0x3e900003246
[2018-08-17 12:05:37.536][12870][critical][backtrace] bazel-out/k8-dbg/bin/external/envoy/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:94] Backtrace thr<0> obj</lib64/libc.so.6> (If unsymbolized, use tools/stack_decode.py):
[2018-08-17 12:05:37.611][12870][critical][backtrace] bazel-out/k8-dbg/bin/external/envoy/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<0> #0 0x7f9e1805b207 raise
[2018-08-17 12:05:37.611][12870][critical][backtrace] bazel-out/k8-dbg/bin/external/envoy/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<0> #1 0x7f9e1805c8f7 abort
[2018-08-17 12:05:37.611][12870][critical][backtrace] bazel-out/k8-dbg/bin/external/envoy/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:104] thr<0> obj<./envoy_1_7_1_kerb>
[2018-08-17 12:05:38.450][12870][critical][backtrace] bazel-out/k8-dbg/bin/external/envoy/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<0> #2 0x818d05 Envoy::Server::SharedMemory::initialize()
[2018-08-17 12:05:38.455][12870][critical][backtrace] bazel-out/k8-dbg/bin/external/envoy/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<0> #3 0x8193e2 Envoy::Server::HotRestartImpl::HotRestartImpl()
[2018-08-17 12:05:38.459][12870][critical][backtrace] bazel-out/k8-dbg/bin/external/envoy/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<0> #4 0x447697 Envoy::MainCommonBase::MainCommonBase()
[2018-08-17 12:05:38.472][12870][critical][backtrace] bazel-out/k8-dbg/bin/external/envoy/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<0> #5 0x447d9d Envoy::MainCommon::MainCommon()
[2018-08-17 12:05:38.482][12870][critical][backtrace] bazel-out/k8-dbg/bin/external/envoy/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<0> #6 0x4467d3 _ZSt11make_uniqueIN5Envoy10MainCommonEIRiRPPcEENSt9_MakeUniqIT_E15__single_objectEDpOT0_
[2018-08-17 12:05:38.486][12870][critical][backtrace] bazel-out/k8-dbg/bin/external/envoy/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<0> #7 0x4455db main
[2018-08-17 12:05:38.486][12870][critical][backtrace] bazel-out/k8-dbg/bin/external/envoy/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:104] thr<0> obj</lib64/libc.so.6>
[2018-08-17 12:05:38.486][12870][critical][backtrace] bazel-out/k8-dbg/bin/external/envoy/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<0> #8 0x7f9e180473d4 __libc_start_main
[2018-08-17 12:05:38.486][12870][critical][backtrace] bazel-out/k8-dbg/bin/external/envoy/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:121] end backtrace thread 0
Aborted (core dumped)

This might be related to #4060

@mattklein123 mattklein123 added the question Questions that are neither investigations, bugs, nor enhancements label Aug 17, 2018
@mattklein123
Copy link
Member

This is "expected" and I don't think we will aim to fix this. If you have suggestions on how to increase usability let us know. Perhaps a clean exit with a better error message?

@yuval-k
Copy link
Contributor

yuval-k commented Aug 23, 2018

I had that too! the fix was sudo rm /dev/shm/envoy_shared_memory_0.

I think the main gap for me was the understanding that shared memory region /envoy_shared_memory_0 is actually /dev/shm/envoy_shared_memory_0 in linux.

@paeschli
Copy link

I had the exact same err, sudo rm /dev/shm/envoy_shared_memory_0 solved the problem as described by @yuval-k

@stale
Copy link

stale bot commented Sep 30, 2018

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Sep 30, 2018
@stale
Copy link

stale bot commented Oct 7, 2018

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.

@techpavan
Copy link

Could the log message be updated to point to the exact absolute path so that users can easily delete to return to non superuser mode?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions that are neither investigations, bugs, nor enhancements stale stalebot believes this issue/PR has not been touched recently
Projects
None yet
Development

No branches or pull requests

5 participants