Gajim - 2015-05-02


  1. Nico Rikken Can I ask a brief support-question in this Group?
  2. Nico Rikken I've been trying for weeks to get GPG Agent working, but I haven't been able to. Normal GPG works fine, but requires many password logins. Search the related Gajim tickets more people seem to be having the same problem, but no real solution is offered. So apparently developers get it working, but some (me) users can't. Any tips?
  3. Link Mauve I don’t remember any such issue when I was using gajim and gpg-agent, do you have more informations?
  4. Nico Rikken Sure, I'm running Ubuntu Gnome 15.04, installed Gajim and GPG (default 1.4.18 and v2.0.26) from the repo.
  5. Nico Rikken When enabling GPG Agent my Keychain pasword was requested and accepted. However when trying to send a message I get an error
  6. Nico Rikken Test
  7. Link Mauve Which error?
  8. Link Mauve In Gajim or in gpg-agent?
  9. Nico Rikken I get: error while sending Test ( )
  10. Link Mauve You can’t send a gpg-encrypted message in a MUC like here, GPG should only be used in one-to-one chats.
  11. Link Mauve Do you have a traceback after that?
  12. Nico Rikken Indeed, I was just trying with a friend
  13. Link Mauve You can paste it here, if so.
  14. Nico Rikken Can I get more details? I only get the single line error
  15. Nico Rikken Is there like a verbose option?
  16. Nico Rikken I successfully have used OTR and GPG without the GPG agent, but Ideally I wouldn't want to give in my password any time I awake my laptop from suspend
  17. Link Mauve Hmm, you could try launching Gajim from the terminal, with the `gajim -v` command, in which it will write a ton of stuff.
  18. Link Mauve Then send an encrypted message, get that error, and look at the terminal if there is some “Traceback” line, in which case copy me all of the following lines.
  19. Nico Rikken Great, I'll do that, brb
  20. Nico Rikken Back again
  21. Nico Rikken Verbose version crashes whilst trying to send using GPG-agent:
  22. Nico Rikken <message xmlns="jabber:client" to="the_unconventional@jabber.fsfe.org" type="chat" id="34"><composing xmlns="http://jabber.org/protocol/chatstates" /><thread>lqOkCqbyhhzLtFStOVixbfGxtVODAvBF</thread></message> _____________ 02-05-15 11:17:04 (D) gajim.c.ged stanza-sent Args: (<common.connection_handlers_events.StanzaSentEvent object at 0x7f3245eca910>,) 02-05-15 11:17:05 (D) gajim.c.ged message-outgoing Args: (<common.connection_handlers_events.MessageOutgoingEvent object at 0x7f3245eca910>,) 02-05-15 11:17:05 (D) gajim.c.gnupg gpg --status-fd 2 --no-tty --use-agent --encrypt --recipient "383058FD" --armor 02-05-15 11:17:05 (D) gajim.c.gnupg data copier: <Thread(Thread-43, initial daemon)>, <_io.BytesIO object at 0x7f3250136e30>, <open file '<fdopen>', mode 'wb' at 0x7f32500d0150> 02-05-15 11:17:05 (D) gajim.c.gnupg sending chunk (4): 'Test'
  23. Nico Rikken (nice feature that auto-pastebin)
  24. Link Mauve Nico Rikken, this doesn’t look like an error to me.
  25. Link Mauve (Yup, Prosody’s mod_pastebin ♥.)
  26. Link Mauve The (D) means those are debug messages.
  27. Nico Rikken When not in verbose I get an error, otherwise it just crashes
  28. Nico Rikken I understood ( I ) for info, ( D ) for Debug. No error.
  29. Link Mauve Oh, a real crash?!
  30. Link Mauve Like, a segfault and everything?
  31. Nico Rikken Gajim in Debian (my other laptop) also crashed directly on Debian Testing, so in that regard the behavior seems to be similar (jumping to conclusions). Can I achieve more logging after the debug message and before the crash?
  32. Nico Rikken Indeed
  33. Link Mauve Woah.
  34. Link Mauve You might want to use gdb, in order to see in which module the crash happens.
  35. Link Mauve Btw, is it crashing when you start typing, or when you press enter to send the actual message?
  36. Link Mauve Because the stanza you pasted is just a typing notification, which shouldn’t require to be encrypted at all.
  37. Nico Rikken sudo tail -n 1000 /var/log/syslog | grep gajim.desktop May 1 17:35:40 nico-c720p gajim.desktop[18489]: /home/nico/.local/share/gajim/plugins/gotr/ui.py:40: GtkWarning: Unknown property: GtkMenu.ubuntu-local May 1 17:35:40 nico-c720p gajim.desktop[18489]: self.B.add_from_file(self.GTK_BUILDER_FILE_PATH) May 1 17:36:40 nico-c720p gajim.desktop[18489]: /usr/share/gajim/src/dialogs.py:5232: RuntimeWarning: missing handler 'on_verify_now_button_clicked' May 1 17:36:40 nico-c720p gajim.desktop[18489]: xml.connect_signals(self) May 2 10:37:34 nico-c720p gajim.desktop[18489]: 02-05-15 10:37:34 (W) gajim.c.jingle: Invalid JID: conference.gajim.org?join, ignoring it May 2 10:40:33 nico-c720p gajim.desktop[18489]: (process:595): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed May 2 11:17:15 nico-c720p gajim.desktop[3304]: /home/nico/.local/share/gajim/plugins/gotr/ui.py:40: GtkWarning: Unknown property: GtkMenu.ubuntu-local May 2 11:17:15 nico-c720p gajim.desktop[3304]: self.B.add_from_file(self.GTK_BUILDER_FILE_PATH) May 2 11:20:18 nico-c720p gajim.desktop[3304]: (process:3551): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
  38. Nico Rikken When hitting enter, I can open the window (initiating the first handshake), start typing a message 'Test' and when hitting Enter it crashes
  39. Nico Rikken How would I use gdb?
  40. Link Mauve Nico Rikken, those GLib-CRITICAL are usually not critical at all.
  41. Link Mauve For gdb, try: cd /usr/lib/python2.7/site-packages/gajim gdb python2 gajim.py
  42. Link Mauve And then, type “r” to run it, reproduce your crash, and then type “bt” once it has crashed to see the call stack.
  43. Nico Rikken I don't have a directory site-packages, I'll look it up
  44. Link Mauve Hmm, maybe dist-packages?
  45. Link Mauve You can cat /usr/bin/gajim to see where it goes to start it.
  46. Natureshadow /usr/share/gajim/src in Debian
  47. Nico Rikken indeed
  48. Nico Rikken "/usr/share/gajim/src/gajim.py": not in executable format: File format not recognized
  49. Link Mauve You need to call `gdb python2 gajim.py` in order for that to work.
  50. Link Mauve python2 is the actual binary that will be debugged.
  51. Nico Rikken I get dropped into a shell (python?)
  52. Nico Rikken "/usr/share/gajim/src/gajim.py" is not a core dump: File format not recognized (gdb) r Starting program: /usr/bin/python2 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Python 2.7.9 (default, Apr 2 2015, 15:33:21) [GCC 4.9.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>
  53. Nico Rikken Yep, python shell. I'll run gajim.py from there
  54. Link Mauve Nico Rikken, oops, sorry, I meant `gdb -args python2 gajim.py`.
  55. Link Mauve Or (gdb) r gajim.py
  56. Nico Rikken Still: Starting program: gajim.py No executable file specified. Use the "file" or "exec-file" command.
  57. Nico Rikken the file is in the directory (tab-completion and pwd check)
  58. Nico Rikken gdb -ex r --args python gajim.py BRB
  59. Nico Rikken Did it, here I am
  60. Link Mauve So now crash it, and once it is crashed run `bt` in the gdb console.
  61. Link Mauve And then paste that here.
  62. Nico Rikken Back again
  63. Nico Rikken Had to use the verbose option to force a crash, to get a backtrace, but managed to, a couple of times
  64. Nico Rikken ... 02-05-15 12:03:55 (D) gajim.c.ged stanza-sent Args: (<common.connection_handlers_events.StanzaSentEvent object at 0x7fffe9da33d0>,) 02-05-15 12:03:57 (D) gajim.c.ged message-outgoing Args: (<common.connection_handlers_events.MessageOutgoingEvent object at 0x7fffe9da33d0>,) 02-05-15 12:03:57 (D) gajim.c.gnupg gpg --status-fd 2 --no-tty --use-agent --encrypt --recipient "383058FD" --armor [New Thread 0x7fffd2daa700 (LWP 6500)] 02-05-15 12:03:57 (D) gajim.c.gnupg data copier: <Thread(Thread-64, initial daemon)>, <_io.BytesIO object at 0x7fffd82d74d0>, <open file '<fdopen>', mode 'wb' at 0x7fffd8bc20c0> 02-05-15 12:03:57 (D) gajim.c.gnupg sending chunk (4): 'Test' [New Thread 0x7fffe9c19700 (LWP 6503)] [New Thread 0x7fffeab21700 (LWP 6372)] Program received signal SIGPIPE, Broken pipe. [Switching to Thread 0x7fffe9c19700 (LWP 6503)] 0x00007ffff78e84fd in write () from /lib/x86_64-linux-gnu/libc.so.6 (gdb) (gdb) bt #0 0x00007ffff78e84fd in write () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x00007ffff786abff in _IO_file_write () from /lib/x86_64-linux-gnu/libc.so.6 #2 0x00007ffff786b39f in _IO_file_xsputn () from /lib/x86_64-linux-gnu/libc.so.6 #3 0x00007ffff7860b69 in fwrite () from /lib/x86_64-linux-gnu/libc.so.6 #4 0x0000000000551d69 in ?? () #5 0x00000000004ccd05 in PyEval_EvalFrameEx () #6 0x00000000004e7cc8 in ?? () #7 0x00000000004cf239 in PyEval_EvalFrameEx () #8 0x00000000004cd4e2 in PyEval_EvalFrameEx () #9 0x00000000004cd4e2 in PyEval_EvalFrameEx () #10 0x00000000004e7cc8 in ?? () #11 0x000000000050b968 in ?? () #12 0x00000000004d437b in PyEval_CallObjectWithKeywords () #13 0x00000000005bdcd2 in ?? () #14 0x00007ffff7bc26aa in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0 #15 0x00007ffff78f7eed in clone () from /lib/x86_64-linux-gnu/libc.so.6 ... 02-05-15 12:05:00 (I) nbxmpp.client_nb raising event from transport: :::::DATA SENT:::: _____________ <message xmlns="jabber:client" to="the_unconventional@jabber.fsfe.org" type="chat" id="38"><composing xmlns="http://jabber.org/protocol/chatstates" /><thread>zfEbtnFXpdKMEuRskNaJGalFuGxpwEje</thread></message> _____________ 02-05-15 12:05:00 (D) gajim.c.ged stanza-sent Args: (<common.connection_handlers_events.StanzaSentEvent object at 0x7fffebcaf710>,) 02-05-15 12:05:01 (D) gajim.c.ged message-outgoing Args: (<common.connection_handlers_events.MessageOutgoingEvent object at 0x7fffebcaf710>,) 02-05-15 12:05:01 (D) gajim.c.gnupg gpg --status-fd 2 --no-tty --use-agent --encrypt --recipient "383058FD" --armor [New Thread 0x7fffe9418700 (LWP 6642)] 02-05-15 12:05:01 (D) gajim.c.gnupg data copier: <Thread(Thread-53, initial daemon)>, <_io.BytesIO object at 0x7fffd8c75b90>, <open file '<fdopen>', mode 'wb' at 0x7fffd95c8db0> 02-05-15 12:05:01 (D) gajim.c.gnupg stderr reader: <Thread(Thread-54, initial daemon)> 02-05-15 12:05:01 (D) gajim.c.gnupg sending chunk (4): 'Test' [New Thread 0x7fffe9c19700 (LWP 6645)] [New Thread 0x7fffd8b44700 (LWP 6646)] [New Thread 0x7fffeab21700 (LWP 6534)] Program received signal SIGPIPE, Broken pipe. [Switching to Thread 0x7fffe9c19700 (LWP 6645)] 0x00007ffff78e84fd in write () from /lib/x86_64-linux-gnu/libc.so.6 (gdb) bt #0 0x00007ffff78e84fd in write () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x00007ffff786abff in _IO_file_write () from /lib/x86_64-linux-gnu/libc.so.6 #2 0x00007ffff786b39f in _IO_file_xsputn () from /lib/x86_64-linux-gnu/libc.so.6 #3 0x00007ffff7860b69 in fwrite () from /lib/x86_64-linux-gnu/libc.so.6 #4 0x0000000000551d69 in ?? () #5 0x00000000004ccd05 in PyEval_EvalFrameEx () #6 0x00000000004e7cc8 in ?? () #7 0x00000000004cf239 in PyEval_EvalFrameEx () #8 0x00000000004cd4e2 in PyEval_EvalFrameEx () #9 0x00000000004cd4e2 in PyEval_EvalFrameEx () #10 0x00000000004e7cc8 in ?? () #11 0x000000000050b968 in ?? () #12 0x00000000004d437b in PyEval_CallObjectWithKeywords () #13 0x00000000005bdcd2 in ?? () #14 0x00007ffff7bc26aa in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0 #15 0x00007ffff78f7eed in clone () from /lib/x86_64-linux-gnu/libc.so.6
  65. Nico Rikken Broken pipe?
  66. Nico Rikken I'd like to debug without using the verbose option (just getting the error, but I cant use the backtrace option in that case, as there is no crash)
  67. Nico Rikken The backtrace seems relatively limited, any ideas?
  68. Link Mauve I don’t know much about the gpg-agent, but my understanding is that the gpg command exits before Gajim can write to its stdin, which causes that signal to be sent and terminate Gajim.
  69. Link Mauve Could you try to reproduce it on the CLI, by running `gpg --status-fd 2 --no-tty --use-agent --encrypt --recipient "383058FD" --armor` directly and writing in it?
  70. Nico Rikken Sure
  71. Nico Rikken gpg --status-fd 2 --no-tty --use-agent --encrypt --recipient "383058FD" --armor gpg: 52BB0ECB: There is no assurance this key belongs to the named user gpg: Sorry, no terminal at all requested - can't get input
  72. Link Mauve Try `echo something | gpg …` then.
  73. Nico Rikken I guess I need to add thrust in gpg-agent?
  74. Link Mauve Yeah, probably.
  75. Link Mauve But before that try the echo.
  76. Nico Rikken Negative: echo test | gpg --status-fd 2 --no-tty --use-agent --encrypt --recipient "383058FD" --armor gpg: 52BB0ECB: There is no assurance this key belongs to the named user gpg: Sorry, no terminal at all requested - can't get input
  77. Link Mauve If this is actually a trust issue, Gajim should be fixed to display that error instead of silently crashing.
  78. Nico Rikken That would be great :D
  79. Link Mauve Now try to set the trust, and do that again.
  80. Nico Rikken Added a trust of 1
  81. Nico Rikken Changing trust didn't do it, I guess validity needs to be changed
  82. Link Mauve What is the error you get now when you echo test | gpg …?
  83. Nico Rikken It worked, but only on trust-level of ultimate
  84. Nico Rikken I guess having a decent web-of-trust might help, but I'd have to look into the gpg details further to confirm that
  85. Link Mauve oO
  86. Nico Rikken In that case I can test it using the terminal as well, so that indeed seems to be the issue.
  87. Nico Rikken So I guess the ticket would be: * Add better freedback from the gpg agent coming from the error messages * Maybe allow GPG without ultimate trust, if there are some options available to achieve that when envoking gpg
  88. Link Mauve I’m sure gpg works without ultimate trust, I did use that before (looong ago).
  89. Link Mauve But yeah, better feedback is certainly useful.
  90. Nico Rikken After setting the key trust back to 1: won't say, and refreshing the keys (didn't do that yet as this laptop install is not even a week old), I get: echo test | gpg --status-fd 2 --no-tty --use-agent --encrypt --recipient "383058FD" --armor gpg: checking the trustdb gpg: no ultimately trusted keys found gpg: 52BB0ECB: There is no assurance this key belongs to the named user gpg: Sorry, no terminal at all requested - can't get input
  91. Nico Rikken So clearly refering to 'ultimately'
  92. Nico Rikken Shall I make a ticket on the issuetracker?
  93. Link Mauve Yes, please. :)
  94. Nico Rikken Great, what should be the main issue? The fact that Gajim lacks verbose error?
  95. Link Mauve I think it’s the main issue wrt debugging, but I would open two issues, one for that lack of feedback and one for the unusability of Gajim to use gpg without such an absurd trust.
  96. Nico Rikken I'll do that. Thanks for all the help and making my Gajim even more usable
  97. Link Mauve I’m not a dev, not even an user. ^^'
  98. Nico Rikken Really? I don't buy that :P
  99. Link Mauve Well, I do have a few patches in Gajim, that’s all.
  100. Nico Rikken That's one: https://trac.gajim.org/ticket/8040
  101. bot RSS: Feeds for Gajim • Ticket #8040 (GPG Agent lacks verbose error) created Bug description When using GPG Agent, and it fails to encode a message, only a very simple error is returned: error while sending <text> ( ) The only way of finding out what is actually going on is by using gdb backtrace (bt), as the logging in verbose and syslog also lack the greater details. In my case the key-trust was too low, but the only eventually I found out replicati[…] https://trac.gajim.org/ticket/8040
  102. Devin Hi everyone! I made a thing for the gajim project... don't know where to go to add it
  103. Devin (just a presence icon theme)
  104. Link Mauve Hmm, apparently there is no plugin for such things.
  105. Devin it's not a plugin, literally just a zip full of images
  106. Devin for the icons on the left side of your buddies
  107. Devin the online/offline icons
  108. Link Mauve Maybe put it on the wiki first?
  109. Devin oh? ok
  110. Link Mauve Until Asterix merges it into the main program.
  111. Nico Rikken Link Mauve, The second issue is also committed: https://trac.gajim.org/ticket/8041
  112. Link Mauve Devin, ah, here seems like a good place: https://trac.gajim.org/wiki/GajimCommunityArt
  113. Link Mauve Nico Rikken, great. :)
  114. Devin ah, found that a minute before you linked it, haha
  115. bot RSS: Feeds for Gajim • Ticket #8041 (GPG Agent requires ultimate trust) created Bug description When using GPG Agent the recipient is assumed be trusted ultimately. This level of trust seems to be rarely used in practice, but is a prerequisite for GPG Encryption, feeding back into the main GPG configuration, affecting other programs using the gpg agent as well. Requiring a lower trust level, or at least having an option t[…] https://trac.gajim.org/ticket/8041
  116. Dr. Watson Well, I got Gajim running behind the evil firewall. The BOSH server on bind.jappix.com didn't work for me but using Tor works just fine
  117. Darlan Good.