VirtualBox

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#13854 closed defect (fixed)

RHEL6: Error: ConsoleKit: unable to lookup user name for uid=0

Reported by: David Charlap Owned by:
Component: guest additions Version: VirtualBox 4.3.22
Keywords: Cc:
Guest type: Linux Host type: Linux

Description

I am running VirtualBox 4.3.22 r98236. I have seven different Linux VMs configured (not all running at once) with the following distros installed:

  • RHEL 5 (i686 and x86_64)
  • RHEL 6 (i686 and x86_64)
  • RHEL 7 (x86_64)
  • Fedora 21 (x86_64)
  • Debian 7.8/wheezy (x86_64)

The Fedora and Debian distros run GUIs and have GUI-based login. The five RHEL distros have no GUI configured and use console-login only.

The host OS is Debian 7.8/wheelzy (x86_64).

All are up to date with the latest packages from their respective distributions. All seven VMs have the guest additions bundled with VirtualBox installed.

On the two RHEL 6 VMs (and only those two), after logging in, I see the following message (with incrementing timestamps) appear every 5 seconds:

00:01:25.289276 vminfo   Error: ConsoleKit: unable to lookup user name for uid=###

Where ### is the uid for whatever account I logged in as. I see these messages for both unprivileged accounts and for root.

Stopping the vboxadd-service makes the messages go away.

I downloaded and installed the latest guest addition ISO (4.3.23-98282), but it did not solve the problem.

Looking at the source code ( http://www.virtualbox.org/svn/vbox/trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp ), it appears that the code in question is calling getpwuid() using the user ID. I wrote a test program and the call succeeds on this platform.

The problem is with what the vminfo code is doing with the result. It is comparing the returned UID with 1000 (a hard-coded constant) and reports failure if it is less. Root is 0 and my non-privileged user is 501. So the user is not added to the ConsoleKit list and a message is generated. And the code repeats every 5 seconds''

But this is probably not the entire problem. My RHEL5 and RHEL7 boxes don't exhibit this problem. They show no problems for root (UID 0) or for UID 500 (the non-privileged user created by RHEL5 at setup.)

Change History (10)

comment:1 by David Charlap, 9 years ago

Update: The problem persists with the guest additions that come bundled with VirtualBox 4.3.24 r98716.

Again, only with my RHEL6 guests, not with RHEL5, RHEL7, Debian or Fedora 21.

Has anyone looked at this yet? The status is still "new". I am willing to work with a VB Engineer to help solve this problem, but I don't know enough to diagnose the problem beyond what I wrote above.

comment:2 by Frank Mehnert, 9 years ago

It's difficult to solve this problem. There is not really a function which delivers the first UID used by non-privileged users. A hack would be to scan /etc/login.defs (Debian) for the value of UID_MIN but this might be completely different on other Linux distributions.

comment:3 by David Charlap, 9 years ago

I understand that, but I think the UID number is only part of the problem. As I wrote, I'm not seeing these messages on RHEL5 (which also has user IDs below 1000). And I see it for the root account on RHEL6, but not for RHEL5 or 7.

comment:4 by David Charlap, 9 years ago

FWIW, I downloaded and installed the guest additions from 4.3.20 on those two RHEL6 VMs and that made the symptoms go away.

I still don't know what the cause is, but at least I can use the VMs without the console being filled with diagnostic messages.

If someone here decides to actually investigate the problem and needs my help, I will be more than willing to reinstall the latest version, run tests and report the results. Otherwise, I'll keep running the 4.3.20 additions (trying the ones from later versions of VirtualBox as they are released, to see if someone fixed the bug without reading this thread.)

comment:5 by Frank Mehnert, 9 years ago

I think at the moment it just makes sense to ignore users silently which are treated as "privileged". The latest Guest Additions .iso package on our Testbuilds page contains a such fix. Could you check if this change works for you?

comment:6 by David Charlap, 9 years ago

I downloaded and installed the 4.3.25-98862 guest additions.

The messages no longer appear when logged in as root (0) or as my non-privileged user (501).

I did notice, a different issue with this build. If I log in (as any user) and then switch to a different virtual console, a few seconds later I see this message appear once:

root00:01:00.310049 vminfo   Error: ConsoleKit: unable to retrieve user for session '/org/freedesktop/ConsoleKit/Session1' (msg type=1): No error information available

dbus message type 1 is METHOD_CALL. This means that if the source at http://www.virtualbox.org/svn/vbox/trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp is what you have compiled, then the dBus call to get the user succeeded but the session isn't active - which would make sense for a console that's sitting at a login prompt. I assume the reason I'm not seeing it repeated is due to the "s_iBitchedAboutConsoleKit" flag.

comment:7 by Frank Mehnert, 9 years ago

Thanks. I've updated the Guest Additions at the test builds page. VBoxService shouldn't complain anymore about inactive users.

comment:8 by David Charlap, 9 years ago

Guest additions 4.3.25-98866 is not displaying any spurious messages.

Of course, not knowing what else is going on or what was changed, I don't know if this solves an underlying problem or merely suppresses messages. But shared folders work, which is the only part that I require, so I'm OK with this fix.

comment:9 by Frank Mehnert, 9 years ago

Resolution: fixed
Status: newclosed

That fix is part of VBox 4.3.26. Please don't forget to upgrade the Guest Additions.

comment:10 by David Charlap, 9 years ago

No messages in 4.3.26. Appears fixed. Thanks much.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use