Mailpile just hangs?


#1

first, thanks for the forum!
I am kinda partial to IRC but gotta admit that it didnt seem particularly active?
Anyway, beggars cant be choosers :grin:
I installed mailpile on a debian based distro, which I have actually done before successfully (on another system but similar setup), but for whatever reason this time it is not working, like at all. I try to start it up from the terminal prompt ā€œmailpileā€ and it just hangs, nothing. I checked in firefox using http://localhost:33411/ but that just came up with a ā€œUnable to connectā€ error. I tried with dmesg in another window but dmesg didnt register anything? (might not have used it right though, ā€œwatch dmesgā€ right?). I looked for some .whatever files and directories to see if I could rm any config stuff and try to run it but there didnt seem to be any?

I know this is not much to go on, are there some log files or something that I could post that might shed some more light on this issue?

Thanks!


#2

Hi Lee!

Youā€™re right, thatā€™s not much to go on. :wink: It would be good if you would start by telling us how you installed Mailpile (apt? .deb? github? Which version/repo/ā€¦) and then tell us what commands you ran.

Thereā€™s still too much guesswork required here for me to understand what happened, and if I donā€™t know what you did I canā€™t venture any guesses as to why it didnā€™t work.


#3

Doh! Sorry, those were some pretty obvious omissions.
Ok. I installed pretty much verbatim from the mailpile page:
https://www.mailpile.is/download/linux.html
using apt-get, though I am not sure about which version repoā€¦ the latest perhaps as it doesnt throw up any errors when I run apt-get update/upgrade.
I have mainly just tried running ā€œmailpileā€ at the cmd prompt, and mailpile --help :slight_smile:
I tried running dmesg in a separate terminal window but that didnt seem to yeild anything.
Iā€™d be happy to post a log or something, I just dont know which log or where to find logs on my system, sorry ima bit of a noob :frowning:
Thanks!!!

PS Please dont take my not-much-going-on-in-IRC as a diss, I was just saying its good to have a less ā€œephemeralā€ medium to ask questions :slight_smile:


#4

Itā€™s normal that nothing shows in dmesg, dmesg really only shows kernel-related events (devices and networking, things like that). But if running mailpile at the command prompt just hangs, thatā€™s strange.

I would expect at least some output, but if it hangs without printing anything at allā€¦ I just dunno. Never seen that! If itā€™s a very weak machine, I guess it might take a little while to compile all the Python resources and get started. But usually not more than a few seconds.

If you run mailpile and leave it hanging, and then run top in another window, do you see a mailpile or python process consuming a lot of CPU? Can you tell me exactly what Linux distribution you are running? Is it in a VM?

Iā€™m a bit stumped here. If anyone else has ideas, please feel free to chime in!


#5

Perhaps something outside of Mailpile? Disk space or free inodes exhausted maybe?


#6

Just checked to make sure, diskspace is fine but I hadnā€™t thought of that :slight_smile :slight_smile:
but regarding inodes, I am not familiar with that, how would i check?


#7

its def taking more than a few seconds, I have left it for over an hour and still just hangs.
strangely I didnt see it in top but when I run htop I see:
the command /usr/bin/python /usr/bin/mailpile, taking up 152M virt mem, 0.0% CPU, and 1.9% mem
ah yes, its indeed running in a vm on whonix
I have gotten this setup to work previously, no issues at all but this time when I installed mailpile it just hangs. :slight_smile:
I really like mailpile so I am really hoping to get this working but am no guru :frowning:


#8

Does it print anything at all to the screen?


#9

quite literally nothing :frowning:
I type ā€œmailpileā€ then return and then blankness, no prompt, nada
I dont know if this counts but when I ^c out it gives me some text, shall i paste that here?

eh. I decided to paste it just in case:

user@host:~$ mailpile
^CTraceback (most recent call last):
  File "/usr/bin/mailpile", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/dist-packages/mailpile/__main__.py", line 6, in main
    Main(sys.argv[1:])
  File "/usr/lib/python2.7/dist-packages/mailpile/app.py", line 207, in Main
    mailpile.platforms.DetectBinaries()
  File "/usr/lib/python2.7/dist-packages/mailpile/platforms.py", line 43, in DetectBinaries
    stdout=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 181, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 168, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/dist-packages/mailpile/safe_popen.py", line 233, in wait
    rv = Unsafe_Popen.wait(self, *args, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 1073, in wait
    pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
  File "/usr/lib/python2.7/subprocess.py", line 121, in _eintr_retry_call
    return func(*args)
KeyboardInterrupt

#10

That is useful! Your Mailpile is hanging trying to check if the apps it requires are installed. If you run the following commands yourself from the shell, what happens?

  1. gpg --version
  2. dirmngr --version
  3. gpg-agent --version
  4. openssl version
  5. tor --version

Do any of them hang? Are any missing?


#11

yeah, good to hear that I was able to provide at least some useful output.
Ok, I get the following from the first 4 commands:

gpg (GnuPG) 2.1.18
libgcrypt 1.7.6-beta
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: /home/user/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
        CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
dirmngr (GnuPG) 2.1.18
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
gpg-agent (GnuPG) 2.1.18
libgcrypt 1.7.6-beta
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
OpenSSL 1.1.0j  20 Nov 2018

but tor hangs.
This is starting to sound familar, problems with tor that is. Though last time it tor was apparently the default browser and mailpile would pull up the torbrowser and apparently tor didnt like mailpile, or visaversa?


#12

Itā€™s really weird if Tor hangs when you just ask it for the version number. But thatā€™s your culprit!

What if you run it this way?

$ tor -f /dev/null --version

#13

hmmm, that apparently just makes it hang as well
is there any reason mp shouldnt work with tor?


#14

Very strange. Your Tor shouldnā€™t be hanging like that. If you get that fixed, things will work. It would also be really cool to know why, and document that here for others who have the same issue.

Butā€¦ as a workaround you can also go to the source and just comment out tor from the mailpile.platforms module. Then things wonā€™t hang until (unless) you actually ask Mailpile to launch Tor.

I need to fix things at my end so that doesnā€™t hang forever, and probably to make the Tor dependency a warning rather than a hard failure. Iā€™ll be filing an issue for thatā€¦


#15

for what its worth, if i run ā€œtorbrowserā€ then the tor browser pops right up, but not when i type ā€œtorā€ (ā€œtorā€ just hangs) could that be part of the problem?
Regarding the workaround, where would the mailpile.platforms module be located?
Thanks for all the help, really really appreciated.


#16

Tor is not the Tor browser, itā€™s the backend daemon that manages connections to the Tor network. I just apt install tor, I have no idea what ships with the browser or whether itā€™s somehow weirdly different.

You can find your mailpile.platforms like so:

$ dpkg -L mailpile |grep platforms.py

ā€¦ but if you hand-edit that, it will probably get overwritten next time Mailpile updates. Hopefully Iā€™ll have patched the issue by then.


#17

ah right. ok well I will give the workaround a try.
Thanks again!!


#18

(Note I edited my previous response, it had typoes and got posted prematurely.)


#19

Thanks for the note.
So i tried, and got:
user@host:~$ dpkg -L mailpile |grep platforms.py
/usr/lib/python2.7/dist-packages/mailpile/platforms.py
/usr/lib/python2.7/dist-packages/mailpile/platforms.pyc

so i assumed it was the platforms.py so edited the section like below:
# These are the binaries we want, and the test we use to detect whether
# they are available/working.
BINARIES_WANTED = {
ā€˜GnuPGā€™: [ā€˜gpgā€™, ā€˜ā€“versionā€™],
ā€˜OpenSSLā€™: [ā€˜opensslā€™, ā€˜versionā€™],
# ā€˜Torā€™: [ā€˜torā€™, ā€˜ā€“versionā€™]}

Then tried mailpile and got:
user@host:~$ mailpile
Traceback (most recent call last):
File ā€œ/usr/bin/mailpileā€, line 6, in
from mailpile.main import main
File ā€œ/usr/lib/python2.7/dist-packages/mailpile/main.pyā€, line 2, in
from mailpile.app import Main
File ā€œ/usr/lib/python2.7/dist-packages/mailpile/app.pyā€, line 8, in
import mailpile.util
File ā€œ/usr/lib/python2.7/dist-packages/mailpile/util.pyā€, line 28, in
from mailpile.safe_popen import Popen, PIPE
File ā€œ/usr/lib/python2.7/dist-packages/mailpile/safe_popen.pyā€, line 30, in
import mailpile.platforms
File ā€œ/usr/lib/python2.7/dist-packages/mailpile/platforms.pyā€, line 24
def _assert_file_exists(path):
^
SyntaxError: invalid syntax

so am I editing the wrong file or does ā€œ#ā€ not suffice? (sorry I know almost nothing about coding)


#20

You need to move the closing } to the previous line (instead of the trailing comma).