#33 ✓invalid

[LPXTTask launchAndWait] does not return

Reported by elm | August 8th, 2012 @ 12:08 AM

When I try to decrypt something in my app libmacgpg ends up in a endless loop. This happens in the [LPXTTask launchAndWait] function in the last while loop that is waiting for some process to end. I think it's waiting for a process that does not exist. I couldn't find one with the process id that waitpid() is looking for and waitpid() also returns the error [ECHILD] which means "The calling process has no existing unwaited-for child processes." The log tells me that gpg did run and produced some output like this:

This looks like the decryption actually worked but libmacgpg failed to detect the ended process.

I'm running 10.8.

Comments and changes to this ticket

  • elm

    elm August 8th, 2012 @ 12:10 AM

    Hmm. the log was stripped... Maybe like this:

    2012-08-07 23:40:10.599 [25093:1015f] [GNUPG]: ENC_TO ... 1 0
    2012-08-07 23:40:10.618 [25093:1015f] [GNUPG]: USERID_HINT ...
    2012-08-07 23:40:10.619 [25093:1015f] [GNUPG]: NEED_PASSPHRASE ... 1 0
    2012-08-07 23:40:10.996 [25093:1015f] [GNUPG]: GOOD_PASSPHRASE
    2012-08-07 23:40:11.738 [25093:1015f] [GNUPG]: BEGIN_DECRYPTION
    2012-08-07 23:40:11.739 [25093:1015f] [GNUPG]: PLAINTEXT ...
    2012-08-07 23:40:11.740 [25093:1015f] [GNUPG]: PLAINTEXT_LENGTH 5
    2012-08-07 23:40:11.741 [25093:1015f] [GNUPG]: DECRYPTION_OKAY
    2012-08-07 23:40:11.742 [25093:1015f] [GNUPG]: GOODMDC
    2012-08-07 23:40:11.743 [25093:1015f] [GNUPG]: END_DECRYPTION

  • Luke Le

    Luke Le August 8th, 2012 @ 12:13 AM

    Hi elm,

    we've not yet seen such an error in our apps, but this might be related to the latest commit pushed to the Libmacgpg framework.

    Could you try to revert to the commit before that.

    Also, out of curiosity, on what application are you working on?

  • elm

    elm August 8th, 2012 @ 12:34 AM

    I tried libmacgpg without the latest commit and also the without the latest commit to LPXTTask.m but neither worked. I try to build an adium xmpp gpg plugin

  • Luke Le

    Luke Le August 8th, 2012 @ 12:40 AM

    Oh interesting. Good luck with that :)!
    Try to run the Libmacgpg unit tests. If they work, there's a bigger chance the
    problem is in your app. If they don't work, it might very well be Libmacgpg.

  • elm

    elm August 8th, 2012 @ 11:42 AM

    Hmm, the unit tests are running fine. Since I did not write much code until now I have no idea what could cause the problem. Maybe the way Adium executes plugins or something like that. I'm just calling two libmacgpg functions: [[gpgcontroller alloc] init] and [gpgcontroller decryptData:] and I do not work with threads or something. If you have any idea where I could start searching for the problem I would appreciate it.

  • Luke Le

    Luke Le August 18th, 2012 @ 05:52 PM

    Hi elm,

    sorry you didn't receive an answer earlier.
    Unfortunately I don't really have an idea what the problem could be.
    Best is to have a look at GPG Keychain Access and GPG Services on how to best use
    the GPGController class.

  • Luke Le

    Luke Le April 20th, 2013 @ 02:59 PM

    • State changed from “new” to “invalid”
    • Importance changed from “” to “Low”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket