crash when browsing ldap-user

Bug #43507 reported by philipp
12
Affects Status Importance Assigned to Milestone
gq (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: gq

i use GQ 1.0beta1. ubuntu dapper beta latest update.

i open gq.
browse user-information (unix-user) on my ldap-server.
select a user. scroll down to the passwort field. then gq crashes.

Revision history for this message
Sven Herzberg (herzi) wrote :

Can you create a backtrace and attach it to this bug report please?

Revision history for this message
philipp (philipp-sutter) wrote :

yes, but i do not know how to create a backtrace.

Revision history for this message
Sven Herzberg (herzi) wrote :

Open your package management, make sure gnome-terminal, gdb, libgtk2.0-0-dbg and libglib2.0-0-dbg (might be called libglib2.0-dbg, I'm not completely sure about this one) are installed.

Once they are: open the gnome terminal (via Applications, Utilities) or by pressing Alt-F2 and entering "gnome-terminal" as the application name.

Then enter "gdb gq" whcih will bring you to the gdb prompt, enter "run", hit return and reproduce the error. The application will be stopped once the error happened, the switch back to the terminal and enter "backtrace" (return) to get a backtrace of the error.

Copy it from the terminal (select with the mouse, Ctrl-Shift-C to copy) to a text editor, save it to a file and attach the file to this bug report.

Revision history for this message
philipp (philipp-sutter) wrote : backtrace

thanks for the description to create a backtrace.

Revision history for this message
Sven Herzberg (herzi) wrote :

There's something missing, please do this again and press return as often as necessary to get back to the gdb prompt.

Revision history for this message
philipp (philipp-sutter) wrote : backtrace 2

new backtrace

Revision history for this message
Soren Hansen (soren) wrote :

Does this happen with all users?

When you say 'unix-user' does that refer to a custom LDAP schema or are we just talking about posixAccounts?

I set up a test LDAP server and used migrationtools to throw my passwd+shadow files into LDAP, and I can browse it all from gq just fine.

Revision history for this message
philipp (philipp-sutter) wrote :

sorry for the delay of my answer.
i don't know a lot about ldap, but it is not the schema posixAccount.
gq crashes when i come to the field with the email-password. so i think it must be in the schema inetLocalMailRecipient or emailAliasObject. the fields just before are: mailLocalAddress, mailHost, mailRoutingAddress

and i have other user-information where it chrashs on an other field. if there is an something in the field userCertificate then it crashs too when i scroll to this field. and this field is after roomNumber,secretary,uid and before x500uniqueIdentifier, preferrredLanguage, userSMIMECertificate.

i have the following objectClasses for users:
top,person,organizationalPerson,inetOrgPerson, posixAccount, shadowAccount, inetLocalMailRecipient, multipass, emailAliasObject, vacationInfo.

i hope that helps.

Revision history for this message
Sven Herzberg (herzi) wrote :

Can you create an example user (right click on an existing one and then select "New -> from current", please don't forget to add the "top" class to your copy, gq tends to forget that) and make a dump of it (per right-click menu) so we can test with similar data than you have?

Revision history for this message
philipp (philipp-sutter) wrote :

I made:
"New -> from current"
added top class, filled necessary fields with dummy entries
then i did not find the new user in the user overview.
i closed gq. reopened it.
right click on test-user: export to LDIF

dn: uid=test,ou=users,cn=system,dc=test,dc=at
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
objectClass: inetLocalMailRecipient
objectClass: multiPass
objectClass: emailAliasObject
objectClass: vacationInfo
sn: test
cn: test
uid: 500000
uidNumber: 500000
gidNumber: 500000
homeDirectory: test
aliasValue: test

Revision history for this message
philipp (philipp-sutter) wrote : dump of example user

see in the comment before

Revision history for this message
Soren Hansen (soren) wrote :

And browsing that one breaks too?

Revision history for this message
philipp (philipp-sutter) wrote :

no because there are no entries in the password fields.

then i entered passwords, saved them, reopende the user, browsed and gq crashed.

Revision history for this message
Sven Herzberg (herzi) wrote :

Philipp, I was asking for a dump of a user that breaks (and the copying was just to not require sending data with a real password of your system). Please attach an ldif which breaks.

Revision history for this message
philipp (philipp-sutter) wrote : ldif which breaks

here same user as before with passwords. browsing this user crashs gq.

Revision history for this message
Soren Hansen (soren) wrote :

I cannot load your LDIF as my ldap server doesn't know about multiPass, emailAliasObject, nor vacationInfo. Maybe the schema where these are defined can shed some light upon this crash.

Revision history for this message
Sven Herzberg (herzi) wrote :

philipp, can you please attach the schema files which belong to the missing classes?

Even if they are not part of the default OpenLDAP distribution, GQ should not crash when browsing such a directory.

If you're fast enough I might even include a potential patch into GQ 1.0.1 this weekend.

Revision history for this message
Barry deFreese (bddebian) wrote :

I have uploaded gq 1.0.0 from Debian. Can you please re-test and see if your issue is resolved? Thank you.

Changed in gq:
status: Unconfirmed → Needs Info
Revision history for this message
Sven Herzberg (herzi) wrote :

Barry, even if it doesn't crash anymore it is definitely not solved by just using 1.0.0 (I am upstream, I know what I'm talking about).

phillipp, please launch GQ from the command line an see if it throws any warnings when crashing.

Revision history for this message
philipp (philipp-sutter) wrote : Re: [Bug 43507] Re: crash when browsing ldap-user

i will do that tomorrow, because today i am out of office.

Am Dienstag, den 23.05.2006, 13:01 +0000 schrieb Sven Herzberg:
> philipp, can you please attach the schema files which belong to the
> missing classes?
>
> Even if they are not part of the default OpenLDAP distribution, GQ
> should not crash when browsing such a directory.
>
> If you're fast enough I might even include a potential patch into GQ
> 1.0.1 this weekend.
>

Revision history for this message
philipp (philipp-sutter) wrote :

i started on the commandline:
~$ gq

Gdk-CRITICAL **: gdk_text_width: assertion `font != NULL' failed
aborting...
Aborted

>
> Von: Sven Herzberg <email address hidden>
> Datum: 2006/05/23 Di PM 05:23:23 CEST
> An: <email address hidden>
> Betreff: [Bug 43507] Re: crash when browsing ldap-user
>
> Barry, even if it doesn't crash anymore it is definitely not solved by
> just using 1.0.0 (I am upstream, I know what I'm talking about).
>
> phillipp, please launch GQ from the command line an see if it throws any
> warnings when crashing.
>
> --
> crash when browsing ldap-user
> https://launchpad.net/bugs/43507
>

Revision history for this message
philipp (philipp-sutter) wrote :

i just updated gq to 1.0.0-2ubuntu1. and now i can browse the users without crashing.

but the field userCertificate is filled only by letters and numbers without any sense. normaly i can read the content in this field.

Revision history for this message
Sven Herzberg (herzi) wrote :

On Mi, 2006-05-24 at 06:14 +0000, philipp wrote:
> i started on the commandline:
> ~$ gq
>
> Gdk-CRITICAL **: gdk_text_width: assertion `font != NULL' failed
> aborting...
> Aborted

Can you please do that again and see whether that error still occurs
when running GQ?

If that's the case please start GQ like this:
# gdb --args gq --g-fatal-warnings
<enter 'run' and hit return to start GQ>
<reproduce this error>
<enter 'bt' and hit return to get a backtrace>

And attach the backtrace to this bug please.

Regards,
  Sven

Revision history for this message
Sven Herzberg (herzi) wrote :

On Mi, 2006-05-24 at 07:11 +0000, philipp wrote:
> i just updated gq to 1.0.0-2ubuntu1. and now i can browse the users
> without crashing.
>
> but the field userCertificate is filled only by letters and numbers
> without any sense. normaly i can read the content in this field.

That's because Debian and Ubuntu build GQ without OpenSSL.

Regards,
  Sven

Revision history for this message
philipp (philipp-sutter) wrote : new backtrace

i made the backtrace for this:

~$ gq

(gq:13690): Gdk-CRITICAL **: gdk_text_width: assertion `font != NULL' failed

(gq:13690): Gdk-CRITICAL **: gdk_text_width: assertion `font != NULL' failed

Revision history for this message
philipp (philipp-sutter) wrote :

> That's because Debian and Ubuntu build GQ without OpenSSL.

does this mean, that i have to compile GQ by myself, if i would like to use debian or ubuntu?

Revision history for this message
Sven Herzberg (herzi) wrote :

This means: your bug is "something like fixed" (I only need to find out why the warning gets triggered) and for your certificate support you should visit http://launchpad.net/bugs/6629 and subscribe to that bug.

Revision history for this message
Sven Herzberg (herzi) wrote : Proposed patch

As GQ 1.0.0 displays passwords and certificates as binary data when not compiling with OpenSSL, can you please try this patch?

Just download gq 1.0.0 from http://www.sf.net/projects/gqclient.

Then install the build requirements
# apt-get build-dep gq
# tar xzf gq-1.0.0.tar.gz
# cd gq-1.0.0/src/
# patch -p0 < "location of this patch"
# cd ..
# ./configure && make
# cd src
# ./gq

And tell me whether a warning appears earlier?

Revision history for this message
Barry deFreese (bddebian) wrote :

Sven. Do you know that OpenSSL support works? According to 6629, it was questionable? If we know it works, I'd be happy to add support for it. Thanks.

Revision history for this message
Barry deFreese (bddebian) wrote :

Oh, and I forgot to add. Let me know if this patch fixes your issue and I will try to get it added to the Ubuntu package. Thanks again.

Revision history for this message
Sven Herzberg (herzi) wrote :

OpenSSL works (at least for passwords), SASL was (for a good reason) questioned to be working with 1.0beta1, but this has been fixed with 1.0.0.

And Barry, the patch won't fix anything it will just make the error more obvious (and at least lead to a more usable backtrace).

I already have a fix at hand (at least one that fixes the crash if the above triggers earlier), will deliver it with GQ 1.0.1 this weekend.

Revision history for this message
philipp (philipp-sutter) wrote : vacation.schema

sorry for the delay. your requested schemas are "selfmade".

Revision history for this message
philipp (philipp-sutter) wrote : mailAliasObject.schema

as asked for

Revision history for this message
philipp (philipp-sutter) wrote : multipass.schema

as asked for.

Revision history for this message
Sven Herzberg (herzi) wrote :

Thanks for the schema files, can you please try out my patch and attach
a backtrace of the error with this patch?

Revision history for this message
Paul Sladen (sladen) wrote :

Downgrading the severity because this happens when browsing users with a GUI utility, rather than when actual authentication occurs.

Sven: it sounds like this is under-control,

philipp: please can you try the patch suggested (and let us know if you have trouble building it (you'll likely need to use 'sudo' and 'fakeroot' in the appropriate places!).

Revision history for this message
philipp (philipp-sutter) wrote : Re: [Bug 43507] Re: crash when browsing ldap-user

sorry for the delay. i am out of office and for testing a need my
ldap-server. i will try tomorrow. thanks for asking.

Revision history for this message
philipp (philipp-sutter) wrote :

can you tell me how to apply the patch?

Revision history for this message
Sven Herzberg (herzi) wrote :

cd gq-1.0.0/src
patch -p0 < "path to the patchfile"

Revision history for this message
philipp (philipp-sutter) wrote :

i never patched before, sorry. i do not have the source of gq. i installed it by a debian package.
so, do i have to get the source code? then patching as you described. then compiling and installing the source? if yes, then i do not know the configuration options for compiling the source so that i have the same binary like now.

Revision history for this message
Paul Sladen (sladen) wrote :

Sven: can you please build a debian package of this (if possible)---that's the easiest way for testing as we can easily get the get the user to 'apt-get install' the in-archive version of the package and know that any testing as been cleaned up automatically.

Revision history for this message
Sven Herzberg (herzi) wrote :

I'll do (though the "cleanup advantage" doesn't count, as the user doesn't need to make install to test gq).

Revision history for this message
Sven Herzberg (herzi) wrote :

philipp: download the modified package from http://www.blaubeermuffin.de/_stuff/gq_1.0.0-2ubuntu1_i386.deb

install with dpkg -i "package.deb"

Revision history for this message
philipp (philipp-sutter) wrote : backtrace

thank you for the debian package. i installed it and made a backtrace (see attachement).

without dbg i could browse through the user scroll over the passwords; but when i made
gdb --args gq --g-fatal-warnings
gq freeze when i come to a password field. i forced closing the gq window and hit enter, enter ... in the terminal where i started gdb.
is that ok?

William Grant (wgrant)
Changed in gq:
status: Needs Info → Unconfirmed
Revision history for this message
Soren Hansen (soren) wrote :

What's the status on this bug?

Revision history for this message
Soren Hansen (soren) wrote :

I'm assuming (due to lack of response) this issue has been fixed in Gutsy and closing the bug report. If the issue persists, feel free to reopen this bug report.

Changed in gq:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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