[OTR-users] gaim-otr hangs on generating key

Ryan Bourque ryan.bourque at gmail.com
Thu Jun 30 16:39:51 EDT 2005


Hi Ian,

Thanks for the quick reply.  The server that's having the problem is
getting rebuilt soon so once we get a fresh image on it, I doubt we'll
have the problem after that since we've been using the plugin on many
of our servers with no problems- I just thought the behavior kind of
interesting.  PS doesn't show the process blocked, but it isn't using
any CPU either.

Another tidbit: I've found that every now and then, maybe 1 in 20,
it'll just work and generate the key.

The error that an ltrace shows (when it hangs up) is:

gaim: ath.c:181: _gcry_ath_mutex_lock: Assertion `*lock ==
((ath_mutex_t) 0)' failed

and the strace:

getrusage(RUSAGE_SELF, {ru_utime={0, 796878}, ru_stime={0, 131979}, ...}) = 0
time(NULL)                              = 1120160820
times({tms_utime=79, tms_stime=13, tms_cutime=0, tms_cstime=0}) = 436037707
getpid()                                = 31770
getpid()                                = 31770
open("/dev/random", O_RDONLY)           = 9
select(10, [9], NULL, NULL, {3, 0})     = 1 (in [9], left {3, 0})
read(9, "8U>\311\320\25\337\347\375U\356\340\276\35\376\311\355"..., 300) = 85
select(10, [9], NULL, NULL, {3, 0})     = 1 (in [9], left {3, 0})
read(9, "\332\10\202Zi\274\344b\6\305\230/T\31\252d\354\317\326"..., 215) = 85
select(10, [9], NULL, NULL, {3, 0})     = 1 (in [9], left {3, 0})
read(9, "8\6*\213\253\311/\357U\370?\266L\307b\274\r^\30\rU?\256"..., 130) = 85
select(10, [9], NULL, NULL, {3, 0})     = 1 (in [9], left {3, 0})
read(9, "5\316.\346\1\336G\16\334\37\315J\200\206\352\273\342\3"..., 45) = 38
select(10, [9], NULL, NULL, {3, 0})     = 0 (Timeout)
select(10, [9], NULL, NULL, {3, 0})     = 0 (Timeout)
select(10, [9], NULL, NULL, {3, 0})     = 0 (Timeout)
select(10, [9], NULL, NULL, {3, 0})     = 0 (Timeout)
select(10, [9], NULL, NULL, {3, 0})     = 0 (Timeout)
select(10, [9], NULL, NULL, {3, 0})     = 0 (Timeout)
select(10, [9], NULL, NULL, {3, 0})     = 0 (Timeout)
select(10, [9], NULL, NULL, {3, 0})     = 0 (Timeout)
select(10, [9], NULL, NULL, {3, 0})     = ? ERESTARTNOHAND (To be restarted)
--- SIGCHLD (Child exited) @ 0 (0) ---
waitpid(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG) = 31823
waitpid(-1, 0xbfff56b0, WNOHANG)        = -1 ECHILD (No child processes)
rt_sigaction(SIGCHLD, {0x80f7770, [CHLD], SA_RESTART}, {0x80f7770,
[CHLD], SA_RE START}, 8) = 0
sigreturn()                             = ? (mask now [])
write(2, "select() error: Interrupted syst"..., 40select() error:
Interrupted sy stem call
) = 40
select(10, [9], NULL, NULL, {3, 0})     = 0 (Timeout)
select(10, [9], NULL, NULL, {3, 0})     = 0 (Timeout)
select(10, [9], NULL, NULL, {3, 0})     = 0 (Timeout)
select(10, [9], NULL, NULL, {3, 0})     = 0 (Timeout)
select(10, [9], NULL, NULL, {3, 0})     = 0 (Timeout)
select(10, [9], NULL, NULL, {3, 0})     = 0 (Timeout)
select(10, [9], NULL, NULL, {3, 0} <unfinished ...>

Yesterday I would have told you I was running on an actual physical
server, but I just figured out that my hosting company has my
"dedicated server" in a vm.  That may be introducing some delay.

I just just wondering if anyone had seen this kind of behavior before.
 Troubleshooting any further may be more trouble than it's worth.

On 6/30/05, Ian Goldberg <ian at cypherpunks.ca> wrote:
> On Thu, Jun 30, 2005 at 09:04:48AM -0500, Ryan Bourque wrote:
> > I've recently been using gaim-otr with my own jabber server for a few
> > months with no problems at all, but I recently changed the domain
> > name, updated all of the accounts and wiped all of our user's gaim
> > settings.
> >
> > Now whenever anyone attempts to generate a key, it hangs gaim and I
> > have to manually kill the gaim process.  The gaim debug output follows
> > whenever I click on "Generate key":
> >
> > dns[11292]: nobody needs me... =(
> > select() error: Interrupted system call
> >
> > It doesn't matter which account we generate a key for, it always hangs
> > gaim.  I've uninstalled and reinstalled gaim, gaim-otr, libotr1 and
> > libotr1-bin (debian sarge packages).
> 
> Hmmm.  A similar problem happened long ago on win32, and it turned out
> to be a bug in the Windows version of libgcrypt (the win32 libgcrypt
> entropy gatherer could get into an infinite loop).  But it seems
> unlikely that debian would have the same issue.  (Especially since it's
> worked before, and it's working for everyone else.)
> 
> The "select() error: Interrupted system call" seems weird; what signal
> is being generated?  Could you strace and/or ltrace and see what's going
> on?  Does gaim end up blocked, or in an infinite loop (what state does
> "ps" show it being in)?
> 
> Note that generating a key *should* hang gaim, but only for a second or
> so, while the key is being calculated.
> 
>    - Ian
>




More information about the OTR-users mailing list