marcwebbie / passpie

:closed_lock_with_key: Multiplatform command-line password manager
http://passpie.readthedocs.org/
MIT License
921 stars 68 forks source link

passpie init hangs forever on Ubuntu 14.04 #53

Closed icyground closed 9 years ago

icyground commented 9 years ago

Hi, after installing passpie on Ubuntu 14.04 (0.3.0 from pip and current master tested) passpie init hangs forever after entering the passphrase. This is reproduceable on multiple systems.

Maybe a snipped strace of the moment where he is hanging is helping to figure out the problem:

stat("/home/user/.passpie/.keys", 0x7fff3db49200) = -1 ENOENT (No such file or directory)
pipe([3, 4])                            = 0
fcntl(3, F_GETFD)                       = 0
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fcntl(4, F_GETFD)                       = 0
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
pipe([5, 6])                            = 0
fcntl(5, F_GETFD)                       = 0
fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
fcntl(6, F_GETFD)                       = 0
fcntl(6, F_SETFD, FD_CLOEXEC)           = 0
pipe([7, 8])                            = 0
fcntl(7, F_GETFD)                       = 0
fcntl(7, F_SETFD, FD_CLOEXEC)           = 0
fcntl(8, F_GETFD)                       = 0
fcntl(8, F_SETFD, FD_CLOEXEC)           = 0
pipe([9, 10])                           = 0
fcntl(9, F_GETFD)                       = 0
fcntl(9, F_SETFD, FD_CLOEXEC)           = 0
fcntl(10, F_GETFD)                      = 0
fcntl(10, F_SETFD, FD_CLOEXEC)          = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fbba9526a10) = 9632
close(10)                               = 0
mmap(NULL, 1052672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbba5897000
read(9, "", 1048576)                    = 0
mremap(0x7fbba5897000, 1052672, 4096, MREMAP_MAYMOVE) = 0x7fbba5897000
close(3)                                = 0
close(6)                                = 0
close(8)                                = 0
close(9)                                = 0
munmap(0x7fbba5897000, 4096)            = 0
fcntl(4, F_GETFL)                       = 0x1 (flags O_WRONLY)
fstat(4, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbba9550000
lseek(4, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)
fstat(4, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
munmap(0x7fbba9550000, 4096)            = 0
fcntl(5, F_GETFL)                       = 0 (flags O_RDONLY)
fstat(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbba9550000
lseek(5, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)
fstat(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
munmap(0x7fbba9550000, 4096)            = 0
fcntl(7, F_GETFL)                       = 0 (flags O_RDONLY)
fstat(7, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbba9550000
lseek(7, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)
fstat(7, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
munmap(0x7fbba9550000, 4096)            = 0
mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7fbba5197000
mprotect(0x7fbba5197000, 4096, PROT_NONE) = 0
clone(child_stack=0x7fbba5996fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fbba59979d0, tls=0x7fbba5997700, child_tidptr=0x7fbba59979d0) = 9633
futex(0xf2a390, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0xd6da90, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7fbba4996000
mprotect(0x7fbba4996000, 4096, PROT_NONE) = 0
clone(child_stack=0x7fbba5195fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fbba51969d0, tls=0x7fbba5196700, child_tidptr=0x7fbba51969d0) = 9634
futex(0xa2c230, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0xd6da90, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7fbba4195000
mprotect(0x7fbba4195000, 4096, PROT_NONE) = 0
clone(child_stack=0x7fbba4994fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fbba49959d0, tls=0x7fbba4995700, child_tidptr=0x7fbba49959d0) = 9635
futex(0xd6da90, FUTEX_WAKE_PRIVATE, 1)  = 1
futex(0xd6da90, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Resource temporarily unavailable)
futex(0xa2c230, FUTEX_WAKE_PRIVATE, 1)  = 1
futex(0xd6da90, FUTEX_WAKE_PRIVATE, 1)  = 1
futex(0xe8bfe0, FUTEX_WAIT_PRIVATE, 0, NULL^CProcess 9146 detached
marcwebbie commented 9 years ago

Hello @icyground

This hangs a lot because of entropy on the host machine. You can take a look here: https://github.com/marcwebbie/passpie#passpie-init-hangs

icyground commented 9 years ago

Thanks @marcwebbie, that solves the problem - I thought about missing entropy or key generation but on a desktop machine without haveged I left it runiing for 20min without success so I declined this idea.