New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 840151 link

Starred by 13 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jul 3
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug


Show other hotlists

Hotlists containing this issue:
Chromium-bugs-related-to-Crostini


Sign in to add a comment

Crostini Terminal app doesn't work after rebooting.

Project Member Reported by lschumacher@google.com, May 6 2018

Issue description

Chrome version: (copy from chrome://version)
OS: Chrome 68.0.3416.0 

#crostini

Repro steps:
1. enable Linux apps
2. go through the steps - get to working Terminal app.
3. reboot
4. attempt to start Terminal, it fails (looks like its trying to adduser 1000 and failing because it already exists

Expected: Working Terminal app after restart
Actual: Not

 
Owner: rjwright@chromium.org
Labels: -Pri-2 Pri-1
I could not reproduce this problem. Did you see it repeatedly or just once? Where did you find the adduser 1000 message?
I saw this problem twice:

1. I ran through the original instructions for setting up crostini (no UI) and installed vscode.  Then i enabled the UI (enable linux apps in the settings) and Terminal never worked.

2. I then deleted the termina vm, disabled linux apps and then re-enabled linux apps.  This time Terminal worked after the initial enable step, but after restarting it failed.

In both cases Terminal would start up, flash an error message for a few ms and then exit.  The exact error msg (based on video of the app startup) is "useradd userid 1000 is not unique".  I could not find a log anywhere with more detail.
Components: OS>Systems>Containers
Components: OS>Systems>Containers
Status: Assigned (was: Untriaged)
<triage>rjwright, let us know if you can look at this</triage>
Labels: -Pri-1 Pri-2
I think the next step for this is to try and repro the problem. As the problem is to do with users going through the old manual setup and then the new flow, I don't think it is a P1.
Labels: Hotlist-Crostini-UI

Comment 9 by vapier@chromium.org, May 23 2018

Labels: -Restrict-View-Google
I have this problem and I did not use the manual setup, for me I think it's because I have a dot in my email address.

When I open up the terminal app the first time, the user was `anthonytsui`, but after restart, the user it tries to use was `anthony.tsui`.

So that causes `run_container.sh` not to detect the user on line `lxc_exec id -u "${FLAGS_user}"`, but when it tries to add user `lxc_exec useradd -u 1000` it blows up because the user already exists, causing the Terminal app to stop running.

If I go into the crosh shell, go into the VM then the container directly and add the `anthony.tsui` user in `/etc/passwd`, it starts working.

HOWEVER, that's not a good fix, because we are not supposed to have duplicate user IDs in the `/etc/passwd` file.

I haven't quite tracked down how the Crostini Terminal app works, but we need `${FLAGS_user}` to be consistent every time it runs `run_container.sh`
Cc: nverne@chromium.org
+nverne re: #10, looks like a separate setup issue.
+benwells, actually that could well be the same issue I saw originally, since my email address also has a dot.
Cc: jkardatzke@chromium.org
I was hitting this same issue randomly. As a further test, when I was not able to get into the terminal because of this error...I then went in through vsh directly and added a user with the name 'narflex.narflex' (and a new user ID). Then when I clicked on the Terminal icon, I was logged in as user 'narflex.narflex' where normally I get logged in as narflexnarflex.  My email I use is narflex.narflex@gmail.com.  Something is weird here...
Cc: smbar...@chromium.org
 Issue 819324  will partially remedy this as vsh won't need to go through the run_container.sh script.

We should still be consistent with the username - IMO we should strip the dots out, unix usernames don't tend to have dots in them.
OK, we can remedy this by stripping '.' from the usernames (actually using gaia::CanonicalizeEmail). 

There will still be some users whose containers were created with '.'-containing gmail names. Those users will need to do something like what Jeff did, but adding a new user (and ID) in the container for the non-'.' name.
Project Member

Comment 17 by bugdroid1@chromium.org, Jun 1 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/65e6b697395a969d34b44ad956f0b93c1b0ad86b

commit 65e6b697395a969d34b44ad956f0b93c1b0ad86b
Author: Nicholas Verne <nverne@chromium.org>
Date: Fri Jun 01 02:26:03 2018

Crostini automatically strips '.' from gmail usernames.

|Profile|'s GetProfileUserName() can return different versions if the username
is in fact a gmail address: those with or without embedded '.'. The version
returned can change within or between sessions unpredictably. We canonicalize
the name (effectively stripping the '.' for gmail addresses).

For those unlucky users who originally created their container with a
'.'-containing gmail-based username, it will be necessary to manually add a new
user to their container with username that strips the '.'s

Bug:  840151 
Change-Id: I2fceadddeb6d8a214ab3780eb5f1e6621e133a50
Reviewed-on: https://chromium-review.googlesource.com/1080473
Commit-Queue: Nicholas Verne <nverne@chromium.org>
Reviewed-by: Timothy Loh <timloh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563495}
[modify] https://crrev.com/65e6b697395a969d34b44ad956f0b93c1b0ad86b/chrome/browser/chromeos/crostini/crostini_util.cc

Status: Fixed (was: Assigned)

Sign in to add a comment