Can't join to AD domain

Bug #1569292 reported by kukububu
66
This bug affects 11 people
Affects Status Importance Assigned to Milestone
packagekit (Ubuntu)
Fix Released
Medium
Seyeong Kim
Xenial
Fix Released
Medium
Seyeong Kim

Bug Description

[Impact]

When trying to join AD domain via realm command, it hangs.
after researching, packagekit got segfault.

[Testcase]

realm -v join int.domainname.com --user login

 * Resolving: _ldap._tcp.int.domanname.com
 * Performing LDAP DSE lookup on: 192.168.xx.xx
 * Performing LDAP DSE lookup on: 192.168.xx.xx
 * Successfully discovered: int.domainname.com
Password for login:
 * Unconditionally checking packages
 * Resolving required packages

From here nothing happens. It doesn't go any further.

journalctl -b realmd shows:
[...]
Apr 12 13:02:49 ls-mysql57 realmd[946]: Sending TCP Netlogon request
Apr 12 13:02:49 ls-mysql57 realmd[946]: Searching for (objectClass=*)
Apr 12 13:02:49 ls-mysql57 realmd[946]: Received TCP Netlogon response
Apr 12 13:02:49 ls-mysql57 realmd[946]: * Successfully discovered: int.domainname.com
Apr 12 13:02:49 ls-mysql57 realmd[946]: * Successfully discovered: int.domainame.com
Apr 12 13:02:53 ls-mysql57 realmd[946]: Using 'r209.955' operation for method 'Join' invocation on 'org.freedesktop.realmd.KerberosMembership' interface
Apr 12 13:02:53 ls-mysql57 realmd[946]: Registered cancellable for operation 'r209.955'
Apr 12 13:02:53 ls-mysql57 realmd[946]: holding daemon: current-invocation
Apr 12 13:02:53 ls-mysql57 realmd[946]: ** (realmd:946): CRITICAL **: realm_invocation_get_cancellable: assertion 'invocation != NULL' failed
Apr 12 13:02:53 ls-mysql57 realmd[946]: (realmd:946): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Apr 12 13:02:53 ls-mysql57 realmd[946]: * Unconditionally checking packages
Apr 12 13:02:53 ls-mysql57 realmd[946]: * Unconditionally checking packages
Apr 12 13:02:53 ls-mysql57 realmd[946]: * Resolving required packages
Apr 12 13:02:53 ls-mysql57 realmd[946]: * Resolving required packages
Apr 12 13:02:53 ls-mysql57 realmd[946]: realm_invocation_get_cancellable: assertion 'invocation != NULL' failed
Apr 12 13:02:53 ls-mysql57 realmd[946]: packages: CreateTransaction call
Apr 12 13:02:53 ls-mysql57 realmd[946]: GLib-GObject: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Apr 12 13:02:53 ls-mysql57 realmd[946]: packages: SetHints call
Apr 12 13:02:53 ls-mysql57 realmd[946]: packages: call Resolve (262144, ['sssd-tools', 'sssd', 'libnss-sss', 'libpam-sss', 'adcli'])
Apr 12 13:02:53 ls-mysql57 realmd[946]: packages: signal: Changed ()
Apr 12 13:02:53 ls-mysql57 realmd[946]: packages: call Resolve completed
Apr 12 13:02:53 ls-mysql57 realmd[946]: packages: signal: Changed ()
Apr 12 13:02:53 ls-mysql57 realmd[946]: packages: signal: Changed ()
Apr 12 13:02:53 ls-mysql57 realmd[946]: packages: signal: Changed ()

It works in 14.04.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: realmd 0.16.2-2
ProcVersionSignature: Ubuntu 4.4.0-18.34-generic 4.4.6
Uname: Linux 4.4.0-18-generic x86_64
ApportVersion: 2.20.1-0ubuntu1
Architecture: amd64
Date: Tue Apr 12 13:08:33 2016
SourcePackage: realmd
UpgradeStatus: No upgrade log present (probably fresh install)

[Regression Potential]

This patch added null check about http_proxy, ftp_proxy and socket
from pk_backend_job_get_frontend_socket

in test, there was no hang anymore, test has been done with several guys.

[Other Info]
Upstream Patch
https://github.com/hughsie/PackageKit/commit/97161e231b2ab406e77977a2a693d7935e33df0f
https://github.com/hughsie/PackageKit/commit/06fae067c909db93bb5b1e1d04aa7a987208eda2
https://github.com/hughsie/PackageKit/commit/c64c16c2d1ad9142ec8e74473044874bb6398728
https://github.com/hughsie/PackageKit/commit/e94b80f90179db18221b2eff93b4561b5418fbfb

Revision history for this message
kukububu (kukububu) wrote :
Revision history for this message
kukububu (kukububu) wrote :

I'm attaching core dump.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in realmd (Ubuntu):
status: New → Confirmed
Changed in realmd (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Istvan (bergkatten) wrote :

Is there a way to make the join command report more detailed debug info than the -v option?
Using:
realm -v join <realm>
does not tell which operation hanged.

Revision history for this message
Niklas Andersson (niklas-andersson) wrote :

It seems packagekitd is the problem. That process segfaults when realmd try to do the package-resolution:

Starting program: /usr/lib/packagekit/packagekitd
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff4ceb700 (LWP 1292)]
[New Thread 0x7ffff44ea700 (LWP 1293)]
[New Thread 0x7ffff3ce9700 (LWP 1294)]
[New Thread 0x7ffff2431700 (LWP 1295)]
[Thread 0x7ffff2431700 (LWP 1295) exited]
[New Thread 0x7ffff2431700 (LWP 1307)]

Thread 6 "PK-Backend" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff2431700 (LWP 1307)]
strlen () at ../sysdeps/x86_64/strlen.S:106
106 ../sysdeps/x86_64/strlen.S: No such file or directory.
(gdb) bt
#0 strlen () at ../sysdeps/x86_64/strlen.S:106
#1 0x00007ffff65efba9 in __add_to_environ (
    name=name@entry=0x7ffff1a289ef "http_proxy", value=value@entry=0x0,
    combined=combined@entry=0x0, replace=replace@entry=1) at setenv.c:131
#2 0x00007ffff65efcca in __setenv (
    name=name@entry=0x7ffff1a289ef "http_proxy", value=value@entry=0x0,
    replace=replace@entry=1) at setenv.c:259
#3 0x00007ffff1a175cf in AptIntf::init (this=this@entry=0x55555585b070)
    at apt-intf.cpp:94
#4 0x00007ffff1a24c00 in pk_backend_resolve_thread (job=<optimized out>,
    params=<optimized out>, user_data=<optimized out>)
    at pk-backend-aptcc.cpp:685
#5 0x000055555556e419 in pk_backend_job_thread_setup (
    thread_data=0x555555859df0) at pk-backend-job.c:792
#6 0x00007ffff6c0cb45 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7 0x00007ffff69866fa in start_thread (arg=0x7ffff2431700)
    at pthread_create.c:333
#8 0x00007ffff66bcb5d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
(gdb)

Revision history for this message
Niklas Andersson (niklas-andersson) wrote :

..it seems what PackageKit is horribly old in Ubuntu 16.04 (2 years old...)

packagekit 0.8.17-4ubuntu6~gcc5.4ubuntu1

Latest version is: 1.1.0 from 2016-02-12

Perhaps an update is in order?

https://www.freedesktop.org/software/PackageKit/pk-download.html

Revision history for this message
Niklas Andersson (niklas-andersson) wrote :

Filed PackageKit-bug here [1]

[1] https://bugs.freedesktop.org/show_bug.cgi?id=95018

Revision history for this message
Niklas Andersson (niklas-andersson) wrote :

Bug [1] is marked as WONTFIX upstream by Richard Hughes because 0.8.17 is too old.

An upgrade of PackageKit is needed.

[1] https://bugs.freedesktop.org/show_bug.cgi?id=95018

Seyeong Kim (seyeongkim)
Changed in realmd (Ubuntu):
assignee: nobody → Seyeong Kim (xtrusia)
tags: added: sts
Changed in realmd (Ubuntu):
status: Confirmed → In Progress
Seyeong Kim (seyeongkim)
affects: realmd (Ubuntu) → packagekit (Ubuntu)
Revision history for this message
Seyeong Kim (seyeongkim) wrote :

@niklas-andersson

Hello, It seems that https://github.com/hughsie/PackageKit/commit/e94b80f90179db18221b2eff93b4561b5418fbfb fixes this issue ( especially, code checking whether_proxy is null )

I uploaded ppa only for testing with this commit and dependent commits.

Could you please test this PPA if you possible?

https://launchpad.net/~xtrusia/+archive/ubuntu/packagekit-fix

Thanks.

Revision history for this message
Antoine Pernot (antoinepernot) wrote :

I added the xtrusia PPA and it works for me.

Seyeong Kim (seyeongkim)
description: updated
Revision history for this message
Seyeong Kim (seyeongkim) wrote :

need to be sponsored that can be combined 4 patches

Seyeong Kim (seyeongkim)
Changed in packagekit (Ubuntu Xenial):
status: New → In Progress
assignee: nobody → Seyeong Kim (xtrusia)
Revision history for this message
Matrix8967 (matrix8967) wrote :

I'm a total noob to all of this stuff. But I've been struggling and struggling with this for a week.

Adding the PPA and updating the package got this fixed.

Thanks so much! I was so excited when I found this.

Let me know if I can help going forward!

Mathew Hodson (mhodson)
Changed in packagekit (Ubuntu Xenial):
importance: Undecided → Medium
affects: realmd → ubuntu-translations
no longer affects: ubuntu-translations
Seyeong Kim (seyeongkim)
description: updated
Revision history for this message
Seyeong Kim (seyeongkim) wrote :
Revision history for this message
Seyeong Kim (seyeongkim) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package packagekit - 0.8.17-4ubuntu6~gcc5.4ubuntu2

---------------
packagekit (0.8.17-4ubuntu6~gcc5.4ubuntu2) yakkety; urgency=medium

  * Fix segfault on AptIntf::init() (LP: #1569292)
    aptcc: Don't ask about config changes if we are not interactive
    aptcc: Always respect the noninteractive flag
    aptcc: Fix several compiler warnings
    aptcc: Ensure proxy and frontend-socket aren't used if they are NULL

 -- Seyeong Kim <email address hidden> Fri, 29 Apr 2016 12:12:01 +0200

Changed in packagekit (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :
Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello kukububu, or anyone else affected,

Accepted packagekit into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/packagekit/0.8.17-4ubuntu6~gcc5.4ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in packagekit (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Seyeong Kim (seyeongkim) wrote :

It works for me

ii packagekit 0.8.17-4ubuntu6~gcc5.4ubuntu1.1 amd64

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package packagekit - 0.8.17-4ubuntu6~gcc5.4ubuntu1.1

---------------
packagekit (0.8.17-4ubuntu6~gcc5.4ubuntu1.1) xenial; urgency=medium

  * Fix segfault on AptIntf::init() (LP: #1569292)
    aptcc: Don't ask about config changes if we are not interactive
    aptcc: Always respect the noninteractive flag
    aptcc: Fix several compiler warnings
    aptcc: Ensure proxy and frontend-socket aren't used if they are NULL

 -- Seyeong Kim <email address hidden> Tue, 10 May 2016 16:20:37 +0200

Changed in packagekit (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for packagekit has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.