Bug 198921 - Keyring-related crash on GNOME 3
Keyring-related crash on GNOME 3
Product: platform
Classification: Unclassified
Component: Options&Settings
PC Linux
: P2 (vote)
: 7.0.1
Assigned To: Jesse Glick
Depends on:
  Show dependency treegraph
Reported: 2011-05-26 16:38 UTC by Samsagax
Modified: 2011-08-30 12:08 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT

messages.log from last crash (28.91 KB, text/plain)
2011-05-26 19:35 UTC, Samsagax
Quick fix (1.60 KB, patch)
2011-08-15 14:17 UTC, Ralph Ruijs
Details | Diff
Proposed patch (2.13 KB, patch)
2011-08-16 12:43 UTC, Ralph Ruijs
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Samsagax 2011-05-26 16:38:35 UTC
I'm using GNOME 3 and Netbeans 7.
I'm trying to checkout (and afterwards commit) an SVN repository hosted on code.google.com. I'm using Netbeans to do that since the repo has netbeans projects hosted.
I go to Team > Subversion > Checkout dialog and fill the url, username and password.
Every time I hit "Next" it automatically crashes.
Running netbeans from a terminal and reproducing the above steps i got the crash and the output complains about an assertion problem:

process 8167: arguments to dbus_message_iter_append_basic() were incorrect, assertion "*bool_p == 0 || *bool_p == 1" failed in file dbus-message.c line 2541.
This is normally a bug in some application using the D-Bus library.
  D-Bus not built with -rdynamic so unable to print a backtrace

Ant then an endless line wich i think this part is only relevant:
/usr/share/netbeans/bin/../platform/lib/nbexec: línea 548:  8167 Abortado

I tried reinstalling, forcing Netbeans to use svn on command line and re-installing both svn and netbeans but nothing worked.
I'm using an https method to access the repo and always got this crash. If I use an http method to access (i can't commit that way) the crash is present most of the times but I could (only once) get pass that screen.
The svn client works on command line and i'm able to checkout and commit that way but is impractical since i lose all the functionality of the versioning IDE. I read somewhere that could be a gnome-keyring related problem but in those cases the output was different (I've tried that fixes too, but guess the result :S)

This happens on every SVN repository. I could not get a backtrace. Is there some configuration i'm missing?
I've posted this problem at the ArchLinux forum as well: https://bbs.archlinux.org/viewtopic.php?id=119592
 (pretty much the same as here, no answer so far)
Comment 1 Ondrej Vrabec 2011-05-26 17:01:27 UTC
(In reply to comment #0)
> I tried ... forcing Netbeans to use svn on command line 
How? Could you try running the IDE with -J-DsvnClientAdapterFactory=svnkit ?
Comment 2 Ondrej Vrabec 2011-05-26 17:17:32 UTC
And try to locate and attach the crash log from the NB session, i think hs_err* file somewhere either in current working dir or install dir.
Comment 3 Samsagax 2011-05-26 18:00:27 UTC
>> I tried ... forcing Netbeans to use svn on command line 
>How? Could you try running the IDE with -J-DsvnClientAdapterFactory=svnkit ?
I did it changing -J-DsvnClientAdapterFactory=commandline in the netbeans.conf file (/usr/share/netbeans/etc/netbeans.conf). Tried the above, didn't work.

Couldn't find the crash log. Where are these files? I found a ~/.netbeans/var/log and had no other logs than messages.log (which none of them have the crash report)
Comment 4 Ondrej Vrabec 2011-05-26 18:15:55 UTC
(In reply to comment #3)
> Couldn't find the crash log. Where are these files?
Try NETBEANS_INSTALL_DIR/bin/hs_err_pid*.log or you can force the location with -XX:ErrorFile=./hs_err_pid<pid>.log
And have you tried reinstalled/use a different JDK?
Comment 5 Samsagax 2011-05-26 18:34:43 UTC
> Try NETBEANS_INSTALL_DIR/bin/hs_err_pid*.log
Nothing there. It seemes that it is not creating any error logs.

> And have you tried reinstalled/use a different JDK?
Tried OpenJDK, same error. Reinstalled sun JDK and still got the same error. 

> -XX:ErrorFile=./hs_err_pid<pid>.log
Where goes this line? in netbeans.conf file?
Comment 6 Samsagax 2011-05-26 18:48:31 UTC
Unknown option -XX:ErrorFile=/home/joaquin/.netbeans/7.0/hs_err_pid.log

Got this error trying to set an error file.
Comment 7 Ondrej Vrabec 2011-05-26 18:52:15 UTC
> Unknown option -XX:ErrorFile=/home/joaquin/.netbeans/7.0/hs_err_pid.log
-J-XX:ErrorFile=/home/joaquin/.netbeans/7.0/hs_err_pid<pid>.log in netbeans.conf
Comment 8 Samsagax 2011-05-26 19:19:18 UTC
(In reply to comment #7)
> > Unknown option -XX:ErrorFile=/home/joaquin/.netbeans/7.0/hs_err_pid.log
> -J-XX:ErrorFile=/home/joaquin/.netbeans/7.0/hs_err_pid<pid>.log in
> netbeans.conf

That's exactly what I did. 
First it failed to start with error saying it could not establish pid so I changed <pid> to {$pid}. Then had that error came up.
Comment 9 Samsagax 2011-05-26 19:26:07 UTC
erased "pid" variable call and got rid of that error (put something like -J-XX:ErrorFile=/home/joaquin/.netbeans/7.0/hs_err.log)

Crashed Netbeans again and no error log was created.
Comment 10 Ondrej Vrabec 2011-05-26 19:28:40 UTC
> Crashed Netbeans again and no error log was created.
Then i am affraid i cannot help. At least attach the full message.log (from ~/.netbeans/7.0/var/log/). And have you tried JDK 7?
Comment 11 Samsagax 2011-05-26 19:35:28 UTC
Created attachment 108538 [details]
messages.log from last crash

I think this is crashing the entire JVM.

The last two messages are:

INFO [org.netbeans.modules.subversion.client.SvnClientFactory]: svnClientAdapter running on svnkit
INFO [org.netbeans.ui.metrics.vcs]: USG_VCS_ACTION

So the svn module loaded successfully but when it try to open something just crash.
Comment 12 Ondrej Vrabec 2011-05-26 20:36:09 UTC
One more thing. You mentioned you tried to work-around a gnome-keyring problem, could you please evaluate? What problem and what how did you try to solve it?
Comment 13 Samsagax 2011-05-26 23:48:23 UTC
(In reply to comment #12)
> One more thing. You mentioned you tried to work-around a gnome-keyring problem,
> could you please evaluate? What problem and what how did you try to solve it?

I've read in some forum that a problem with https repositories where related with gnome-keyring and the solution was to create an entry in the gnome-keyring database by accessing the repository via the command line. That didn't work for me. My problem is present even in read-only repositories (http protocol) with no authentication. Netbeans does not show any message, just crash, disappear.
Comment 14 Ondrej Vrabec 2011-05-27 05:56:38 UTC
Try running (adding the option to netbeans.conf) with -J-Dnetbeans.keyring.no.native=true
Comment 15 Samsagax 2011-05-27 15:09:59 UTC
(In reply to comment #14)
> Try running (adding the option to netbeans.conf) with
> -J-Dnetbeans.keyring.no.native=true

It worked like a charm! Is an issue with gnome-keyring integration then. Since I'm using GNOME 3 I'll be glad to test fixes to this if there are to be made.

Comment 16 Ondrej Vrabec 2011-05-27 20:43:08 UTC
Reassinging to keyring. I think the bug should be look at more closely, if the gnome-keyring support crashes the entire JVM on Gnome 3 regularly i believe it should not be used in the IDE and automatically disabled.
Maybe this has something to do with an API change in gnome-keyring? http://mail.gnome.org/archives/gnome-keyring-list/2011-February/msg00004.html ?
Comment 17 Jesse Glick 2011-05-31 18:48:55 UTC
The GNOME commits referred to are:


(In reply to comment #0)
> process 8167: arguments to dbus_message_iter_append_basic() were incorrect

This looks to me like your libgnome-keyring.so does not match your keyring daemon. Perhaps you are not running on a clean system?

(In reply to comment #16)
> Maybe this has something to do with an API change in gnome-keyring?

From what I can ascertain, there was no API change in the client side of libgnome-keyring that NetBeans uses; rather, there was an API change in the protocol between that and the daemon.
Comment 18 Jesse Glick 2011-05-31 19:28:27 UTC
Tried running http://download.gnome.org/misc/live/GNOME30-Live-latest.iso (Fedora base). Saved a website password from Epiphany, agreeing to make a default keyring. Ran a NB dev build using JDK 6u25. Installed the "Team Server" plugin from AU and logged in to kenai.com. Restarted NetBeans and was successfully logged in again as expected. /usr/bin/seahorse showed the password stored by NB. So there does not seem to be any intrinsic problem using the keyring integration with GNOME 3; possibly a problem with the user's GNOME setup.
Comment 19 Ralph Ruijs 2011-08-15 14:17:44 UTC
Created attachment 109982 [details]
Quick fix

The problem has been introduced in dbus version > 1.4.10 (or somewhere around that version), but Fedora is using an older one. My C knowledge is limited, but it looks likes some jni mapping problem. I attached a quick fix by changing the type from boolean to int in the keyring implementation.
Comment 20 Jesse Glick 2011-08-15 15:14:04 UTC
I do not know how to reproduce any such crash. If you do, please attach that information. It is not clear to me why a C function defined to accept a boolean ought to be declared using an int, so I cannot approve your patch without more information.
Comment 21 Ralph Ruijs 2011-08-16 12:43:57 UTC
Created attachment 110008 [details]
Proposed patch

The problem seems to be in JNA's boolean conversion. JNA uses -1 for the value of true, but it seems the convention is to use 1. See http://java.net/jira/browse/JNA-2

This patch adds a typemapper to correctly handle boolean values in JNA.
Comment 22 Jesse Glick 2011-08-16 14:33:26 UTC
core-main #202f192216d6
Comment 23 Jesse Glick 2011-08-16 14:35:15 UTC
Committed after cleaning up patch stylistically. Unit test passes on Ubuntu Lucid at least; please test on your system, whatever that is.
Comment 24 Ralph Ruijs 2011-08-17 07:52:19 UTC
Works on Gentoo amd64 with Gnome Overlay.


Thanks !
Comment 25 Quality Engineering 2011-08-17 13:53:56 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/202f192216d6
User: Jesse Glick <jglick@netbeans.org>
Log: #198921: Keyring-related crash on GNOME 3
Comment 26 Jesse Glick 2011-08-19 15:52:36 UTC
releases #77c15aa12b3b and releases #22f067abe333

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo