Front page

gpg failed with exit code -9

3997958ab8134418b4feb6705b74b25c
CLASSROOM MOSQUITO PRECLUDE

From: Levin Straub <levin@straubis.org>
Date: Wed, 4 Jan 2017 21:47:04 +0100

   Hey,
   first of all I think obnam is really great and I'm really happy with it
   because I got my Ubuntu re-installation (14.04 --> 16.04) managed with it.
   Now, I want to make my first backup on 16.04 and I ran into some
   problems with gpg-agent. First gpg-agent version 2.1 does apparently not
   set the GPG_AGENT_INFO environment variable, so I had to set it on my own.
   I got gpg-agent working but I can't complete my backup. The backup
   starts normally, processes some time (in my tests ~20-40min) and crashes
   then. It seems to depend also on gpg-agent/gpg. The log says only
   "GpgError: R0C79EX: gpg failed with exit code -9:". The complete log
   (loglevel debug) starting at the last succesfull backed-up file can be
   found here: http://pastebin.com/cfYZ31KU
   The agent is normally usable, also after obnam crashed. I am able to
   decrypt a file with the key tah obnam should use without giving a password.
   The error occurs after a (from my position) random time.
   I'm on obnam version 1.20-3 from the PPA.
   GPG version 1.4.20 is installed.
   And, as I said Ubuntu 16.04.
   Everything worked fine in Ubuntu 14.04.
   Maybe somebody is able to help me or give me a hint what I'm doing
   wrong. I would be very happy about it. :)
   
   Greetings,
   Levin
   
   Sorry for the first mail.
From: Levin <levin@straubis.org>
Date: Thu, 05 Jan 2017 22:21:34 +0100

   Hey,
   thank you for investigating!
   Please let me know when there is a obnam update for this problem and through wich channel I can get it.
   
   Am 5. Januar 2017 22:14:55 MEZ schrieb Lars Wirzenius <liw@liw.fi>:
   >On Wed, Jan 04, 2017 at 09:47:04PM +0100, Levin Straub wrote:
   >> found here: http://pastebin.com/cfYZ31KU
   >
   >The log file you pasted has this:
   >
   >    GpgError: R0C79EX: gpg failed with exit code -9:
   >
   >This is missing something: the actual error message has more lines,
   >and those aren't in the log. But that's a bug elsewhere in Obnam, I'm
   >afraid. Thing is, this is really difficult to debug without seeing
   >what the actual gpg error message is. I don't know what exit code -9
   >is, I'll have to dig.
   >
   >I'll try to provide an update to Obnam soon to make it possible to see
   >the gpg error message.
   >
   >-- 
   >I want to build worthwhile things that might last. --joeyh
   
   --
   ++ PGP Key fingerprint 7C07 93B4 4AF9 47F0 5320 8D66 AEAC 0845 C647 9F16 ++
   (https://straubis.org/pgp)
From: Lars Wirzenius <liw@liw.fi>
Date: Thu, 5 Jan 2017 23:14:55 +0200

   On Wed, Jan 04, 2017 at 09:47:04PM +0100, Levin Straub wrote:
   > found here: http://pastebin.com/cfYZ31KU
   
   The log file you pasted has this:
   
       GpgError: R0C79EX: gpg failed with exit code -9:
   
   This is missing something: the actual error message has more lines,
   and those aren't in the log. But that's a bug elsewhere in Obnam, I'm
   afraid. Thing is, this is really difficult to debug without seeing
   what the actual gpg error message is. I don't know what exit code -9
   is, I'll have to dig.
   
   I'll try to provide an update to Obnam soon to make it possible to see
   the gpg error message.
From: Lars Wirzenius <liw@liw.fi>
Date: Sun, 8 Jan 2017 17:15:04 +0200

   On Thu, Jan 05, 2017 at 10:21:34PM +0100, Levin wrote:
   > Hey,
   > thank you for investigating!
   > Please let me know when there is a obnam update for this problem and through wich channel I can get it.
   
   Unfortunately, I don't have a reasonable way to build a .deb or an
   experimental change for Ubuntu, but perhaps you could do a hacky,
   in-place experiment:
   
   * Make a backup copy of
     /usr/lib/python2.7/dist-packages/obnamlib/app.py
   
   * Download
     http://git.liw.fi/cgi-bin/cgit/cgit.cgi/obnam/plain/obnamlib/app.py
     and replace the app.py file above with it.
   
   * Run obnam again in the same as before to reproduce the issue.
   
   * The log file should now have the stderr output from gpg, which
     should tell us what the actual proglem is. (It's just before the
     traceback)
   
   
   > Am 5. Januar 2017 22:14:55 MEZ schrieb Lars Wirzenius <liw@liw.fi>:
   > >On Wed, Jan 04, 2017 at 09:47:04PM +0100, Levin Straub wrote:
   > >> found here: http://pastebin.com/cfYZ31KU
   > >
   > >The log file you pasted has this:
   > >
   > >    GpgError: R0C79EX: gpg failed with exit code -9:
   > >
   > >This is missing something: the actual error message has more lines,
   > >and those aren't in the log. But that's a bug elsewhere in Obnam, I'm
   > >afraid. Thing is, this is really difficult to debug without seeing
   > >what the actual gpg error message is. I don't know what exit code -9
   > >is, I'll have to dig.
   > >
   > >I'll try to provide an update to Obnam soon to make it possible to see
   > >the gpg error message.
   > >
   > >-- 
   > >I want to build worthwhile things that might last. --joeyh
   > 
   > --
   > ++ PGP Key fingerprint 7C07 93B4 4AF9 47F0 5320 8D66 AEAC 0845 C647 9F16 ++
   > (https://straubis.org/pgp)
   
   > _______________________________________________
   > obnam-support mailing list
   > obnam-support@obnam.org
   > http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-support-obnam.org
From: Levin Straub <levin@straubis.org>
Date: Mon, 9 Jan 2017 14:53:28 +0100

   Hi,
   
   I tried to reproduce the bug yesterday (after replacing the app.py) and
   in my first run Obnam ran pretty long (~3h). Finally it crashed but this
   time not with a gpg error message. Instead obnam just said "Killed". In
   the log (debug) there was nothing. It just ended. I saw this behaviour
   before, when I didn't had logging enabled. When I saw this earlier I
   tried to re-run obnam with logs and then the gpg error came up. So, I
   came to my report. Now I got the "Killed" message again and no notices
   in the debug log. I didn't kill anything manually and my server should
   not just randomly kill a process.
   I retried the backup. Same behaviour. In my third try (it was pretty
   short, only about 3min) I got the gpg error message again. I pasted the
   log here: http://pastebin.com/MVnW3vUG
   Maybe you know now whats going on there.
   
   Am 08.01.2017 um 16:15 schrieb Lars Wirzenius:
   > On Thu, Jan 05, 2017 at 10:21:34PM +0100, Levin wrote:
   >> Hey,
   >> thank you for investigating!
   >> Please let me know when there is a obnam update for this problem and through wich channel I can get it.
   > Unfortunately, I don't have a reasonable way to build a .deb or an
   > experimental change for Ubuntu, but perhaps you could do a hacky,
   > in-place experiment:
   >
   > * Make a backup copy of
   >   /usr/lib/python2.7/dist-packages/obnamlib/app.py
   >
   > * Download
   >   http://git.liw.fi/cgi-bin/cgit/cgit.cgi/obnam/plain/obnamlib/app.py
   >   and replace the app.py file above with it.
   >
   > * Run obnam again in the same as before to reproduce the issue.
   >
   > * The log file should now have the stderr output from gpg, which
   >   should tell us what the actual proglem is. (It's just before the
   >   traceback)
   >
   >
   >> Am 5. Januar 2017 22:14:55 MEZ schrieb Lars Wirzenius <liw@liw.fi>:
   >>> On Wed, Jan 04, 2017 at 09:47:04PM +0100, Levin Straub wrote:
   >>>> found here: http://pastebin.com/cfYZ31KU
   >>> The log file you pasted has this:
   >>>
   >>>    GpgError: R0C79EX: gpg failed with exit code -9:
   >>>
   >>> This is missing something: the actual error message has more lines,
   >>> and those aren't in the log. But that's a bug elsewhere in Obnam, I'm
   >>> afraid. Thing is, this is really difficult to debug without seeing
   >>> what the actual gpg error message is. I don't know what exit code -9
   >>> is, I'll have to dig.
   >>>
   >>> I'll try to provide an update to Obnam soon to make it possible to see
   >>> the gpg error message.
   >>>
   >>> -- 
   >>> I want to build worthwhile things that might last. --joeyh
   >> --
   >> ++ PGP Key fingerprint 7C07 93B4 4AF9 47F0 5320 8D66 AEAC 0845 C647 9F16 ++
   >> (https://straubis.org/pgp)
   >> _______________________________________________
   >> obnam-support mailing list
   >> obnam-support@obnam.org
   >> http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-support-obnam.org
   >
From: SanskritFritz <sanskritfritz@gmail.com>
Date: Mon, 9 Jan 2017 15:53:08 +0100

   On Mon, Jan 9, 2017 at 2:53 PM, Levin Straub <levin@straubis.org> wrote:
   > Instead obnam just said "Killed". In
   > the log (debug) there was nothing. It just ended.
   
   Try to watch the memory consumption while obnam works, I suspect, the
   kernel has killed obnam via the oom killer method.
   
   _______________________________________________
   obnam-support mailing list
   obnam-support@obnam.org
   http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-support-obnam.org
From: Levin <levin@straubis.org>
Date: Tue, 10 Jan 2017 16:00:30 +0100

   Seems you were right (Thank you!). I got a run finished after some adjustments to the memory.
   Was this also the cause of the gpg error?
   
   Am 9. Januar 2017 15:53:08 MEZ schrieb SanskritFritz <sanskritfritz@gmail.com>:
   >On Mon, Jan 9, 2017 at 2:53 PM, Levin Straub <levin@straubis.org>
   >wrote:
   >> Instead obnam just said "Killed". In
   >> the log (debug) there was nothing. It just ended.
   >
   >Try to watch the memory consumption while obnam works, I suspect, the
   >kernel has killed obnam via the oom killer method.
   
   --
   ++ PGP Key fingerprint 7C07 93B4 4AF9 47F0 5320 8D66 AEAC 0845 C647 9F16 ++
   (https://straubis.org/pgp)
From: SanskritFritz <sanskritfritz@gmail.com>
Date: Tue, 10 Jan 2017 16:27:02 +0100

   Can you share the adjustments you made for future reference?
   
   Well, about the GPG error, when a process dies any other processes
   depending on it will spit out weird errorr I guess...
   
   
   
   On Tue, Jan 10, 2017 at 4:00 PM, Levin <levin@straubis.org> wrote:
   > Seems you were right (Thank you!). I got a run finished after some
   > adjustments to the memory.
   > Was this also the cause of the gpg error?
   >
   >
   > Am 9. Januar 2017 15:53:08 MEZ schrieb SanskritFritz
   > <sanskritfritz@gmail.com>:
   >>
   >> On Mon, Jan 9, 2017 at 2:53 PM, Levin Straub <levin@straubis.org> wrote:
   >>>
   >>>  Instead obnam just said "Killed". In
   >>>  the log (debug) there was nothing. It just ended.
   >>
   >>
   >> Try to watch the memory consumption while obnam works, I suspect, the
   >> kernel has killed obnam via the oom killer method.
   >
   >
   > --
   > ++ PGP Key fingerprint 7C07 93B4 4AF9 47F0 5320 8D66 AEAC 0845 C647 9F16 ++
   > (https://straubis.org/pgp)
   
   _______________________________________________
   obnam-support mailing list
   obnam-support@obnam.org
   http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-support-obnam.org
From: Levin Straub <levin@straubis.org>
Date: Tue, 10 Jan 2017 17:34:34 +0100

   Yeah. First I tried to decrease the used memory. I searched for
   programs/services that use much memory but are not so important. In my
   case, I found a clamav daemon running that used ~20% of my memory and
   did nothing. So, I killed the the process.
   After that I looked at the options obnam provides for memory management.
   Earlier, I adjusted some of those options for better performance (see
   also here:
   https://listmaster.pepperfish.net/pipermail/obnam-support-obnam.org/2014-June/003086.html).
   I decided to set the values to the defaulte ones that are preset from
   obnam to achieve less memory use by obnam. With even lower values than
   the default ones, obnam would consume also less memory but would also
   run slower. With these adjustments I got all backed up.
   I didn't thought about the possibility that obnam is consuming to much
   memory because on my old system (Ubuntu 14.04) I used the same values
   and configurations to make a backup and it wasn't a problem.
   
   Thank you for helping me.
   
   Am 10.01.2017 um 16:27 schrieb SanskritFritz:
   > Can you share the adjustments you made for future reference?
   >
   > Well, about the GPG error, when a process dies any other processes
   > depending on it will spit out weird errorr I guess...
   >
   >
   >
   > On Tue, Jan 10, 2017 at 4:00 PM, Levin <levin@straubis.org> wrote:
   >> Seems you were right (Thank you!). I got a run finished after some
   >> adjustments to the memory.
   >> Was this also the cause of the gpg error?
   >>
   >>
   >> Am 9. Januar 2017 15:53:08 MEZ schrieb SanskritFritz
   >> <sanskritfritz@gmail.com>:
   >>> On Mon, Jan 9, 2017 at 2:53 PM, Levin Straub <levin@straubis.org> wrote:
   >>>>  Instead obnam just said "Killed". In
   >>>>  the log (debug) there was nothing. It just ended.
   >>>
   >>> Try to watch the memory consumption while obnam works, I suspect, the
   >>> kernel has killed obnam via the oom killer method.
   >>
   >> --
   >> ++ PGP Key fingerprint 7C07 93B4 4AF9 47F0 5320 8D66 AEAC 0845 C647 9F16 ++
   >> (https://straubis.org/pgp)
   > _______________________________________________
   > obnam-support mailing list
   > obnam-support@obnam.org
   > http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-support-obnam.org