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

assertion error: could not determine username #41

Open
Julio-Guerra opened this issue Jul 29, 2017 · 1 comment
Open

assertion error: could not determine username #41

Julio-Guerra opened this issue Jul 29, 2017 · 1 comment
Assignees
Labels

Comments

@Julio-Guerra
Copy link

Running infinit in a container whose user id is modified with docker-run's option --user leads to the following error:

[elle.assert] [main] assertion 'could not determine username' failed at /builds/infinit/memo/elle/src/elle/system/username.cc:36
[elle.assert] [main]   #0  0x000000007fffffff: elle::AssertError::AssertError(char const*, char const*, unsigned long) +0x507
                       #1  0x000000007fffffff: elle::_abort(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int) +0xc2
                       #2  0x000000007fffffff: elle::system::username[abi:cxx11]() +0x246

I simply wanted to avoid the usual permission problems of files created inside a container accessed from the host (for example to create a backup).

It's easy to reproduce:

$ docker run --name infinit --detach --interactive --privileged --restart=always --user (id -u):(id -g) --volume $HOME:$HOME --workdir $HOME --env INFINIT_HOME=$HOME infinit/infinit bash
$ docker exec -it infinit bash
I have no name!@f65ef37df35c:/Users/julio$ env
HOSTNAME=f65ef37df35c
TERM=xterm
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/Users/julio
SHLVL=1
HOME=/
no_proxy=*.local, 169.254/16
INFINIT_HOME=/Users/julio
_=/usr/bin/env
I have no name!@f65ef37df35c:/Users/julio$ infinit doctor all
[elle.assert] [main] assertion 'could not determine username' failed at /builds/infinit/memo/elle/src/elle/system/username.cc:36
[elle.assert] [main]   #0  0x000000007fffffff: elle::AssertError::AssertError(char const*, char const*, unsigned long) +0x507
                       #1  0x000000007fffffff: elle::_abort(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int) +0xc2
                       #2  0x000000007fffffff: elle::system::username[abi:cxx11]() +0x246
                       #3  0x00000000005bcd18: ???
                       #4  0x00000000004f2857: ???
                       #5  0x00000000005c0c56: ???
                       #6  0x00000000005c2379: ???
                       #7  0x00000000005c3142: ???
                       #8  0x000000007fffffff: elle::reactor::Thread::_action_wrapper(std::function<void ()> const&) +0x259
                       #9  0x000000007fffffff: ???
                       #10 0x000000007fffffff: make_fcontext +0x21
terminate called after throwing an instance of 'elle::AssertError'
  what():  assertion 'could not determine username' failed at /builds/infinit/memo/elle/src/elle/system/username.cc:36
Aborted
I have no name!@f65ef37df35c:/Users/julio$ infinit --help
[elle.assert] [main] assertion 'could not determine username' failed at /builds/infinit/memo/elle/src/elle/system/username.cc:36
[elle.assert] [main]   #0  0x000000007fffffff: elle::AssertError::AssertError(char const*, char const*, unsigned long) +0x507
                       #1  0x000000007fffffff: elle::_abort(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int) +0xc2
                       #2  0x000000007fffffff: elle::system::username[abi:cxx11]() +0x246
                       #3  0x00000000005bcd18: ???
                       #4  0x00000000004f2857: ???
                       #5  0x00000000005c0c56: ???
                       #6  0x00000000005c2379: ???
                       #7  0x00000000005c3142: ???
                       #8  0x000000007fffffff: elle::reactor::Thread::_action_wrapper(std::function<void ()> const&) +0x259
                       #9  0x000000007fffffff: ???
                       #10 0x000000007fffffff: make_fcontext +0x21
terminate called after throwing an instance of 'elle::AssertError'
  what():  assertion 'could not determine username' failed at /builds/infinit/memo/elle/src/elle/system/username.cc:36
Aborted
I have no name!@f65ef37df35c:/Users/julio$ 

Defining the variable INFINIT_USER to try to avoid the error has no effects.

@Dimrok
Copy link

Dimrok commented Jul 29, 2017

Hi @Julio-Guerra.

Thanks, I'll fix that asap.

@Dimrok Dimrok self-assigned this Aug 25, 2017
@Dimrok Dimrok added the Bug label Aug 25, 2017
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

2 participants