<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>13085</bug_id>
          
          <creation_ts>2018-12-14 09:38:53 +0000</creation_ts>
          <short_desc>test_signing_packages failed</short_desc>
          <delta_ts>2019-06-07 22:13:34 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>QA/Testing</classification>
          <product>Functional (self) Testing</product>
          <component>oe-selftest</component>
          <version>2.7</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.8</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chen Qi">Qi.Chen</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>82503</commentid>
    <comment_count>0</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2018-12-14 09:38:53 +0000</bug_when>
    <thetext>https://autobuilder.yoctoproject.org/typhoon/#/builders/56/builds/39/steps/7/logs/step2d

ERROR: python-2.7.15-r1 do_package_write_rpm: Function failed: sign_rpm
ERROR: bzip2-1.0.6-r5 do_package_write_rpm: Error executing a python function in exec_python_func() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: &apos;exec_python_func() autogenerated&apos;, lineno: 2, function: &lt;module&gt;
     0001:
 *** 0002:sign_rpm(d)
     0003:
File: &apos;/home/pokybuild/yocto-worker/oe-selftest/build/meta/classes/sign_rpm.bbclass&apos;, lineno: 65, function: sign_rpm
     0061:                     d.getVar(&apos;RPM_GPG_PASSPHRASE&apos;),
     0062:                     d.getVar(&apos;RPM_FILE_CHECKSUM_DIGEST&apos;),
     0063:                     int(d.getVar(&apos;RPM_GPG_SIGN_CHUNK&apos;)),
     0064:                     d.getVar(&apos;RPM_FSK_PATH&apos;),
 *** 0065:                     d.getVar(&apos;RPM_FSK_PASSWORD&apos;))
     0066:}
     0067:
     0068:do_package_index[depends] += &quot;signing-keys:do_deploy&quot;
     0069:do_rootfs[depends] += &quot;signing-keys:do_populate_sysroot&quot;
File: &apos;/home/pokybuild/yocto-worker/oe-selftest/build/meta/lib/oe/gpg_sign.py&apos;, lineno: 50, function: sign_rpms
     0046:                cmd += &quot;--define &apos;_file_signing_key_password %s&apos; &quot; % fsk_password
     0047:
     0048:        # Sign in chunks
     0049:        for i in range(0, len(files), sign_chunk):
 *** 0050:            subprocess.check_output(shlex.split(cmd + &apos; &apos;.join(files[i:i+sign_chunk])), stderr=subprocess.STDOUT)
     0051:
     0052:    def detach_sign(self, input_file, keyid, passphrase_file, passphrase=None, armor=True):
     0053:        &quot;&quot;&quot;Create a detached signature of a file&quot;&quot;&quot;
     0054:
File: &apos;/usr/lib64/python3.6/subprocess.py&apos;, lineno: 336, function: check_output
     0332:        # empty string. That is maintained here for backwards compatibility.
     0333:        kwargs[&apos;input&apos;] = &apos;&apos; if kwargs.get(&apos;universal_newlines&apos;, False) else b&apos;&apos;
     0334:
     0335:    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
 *** 0336:               **kwargs).stdout
     0337:
     0338:
     0339:class CompletedProcess(object):
     0340:    &quot;&quot;&quot;A process that has finished running.
File: &apos;/usr/lib64/python3.6/subprocess.py&apos;, lineno: 418, function: run
     0414:            raise
     0415:        retcode = process.poll()
     0416:        if check and retcode:
     0417:            raise CalledProcessError(retcode, process.args,
 *** 0418:                                     output=stdout, stderr=stderr)
     0419:    return CompletedProcess(process.args, retcode, stdout, stderr)
     0420:
     0421:
     0422:def list2cmdline(seq):
Exception: subprocess.CalledProcessError: Command &apos;[&apos;/home/pokybuild/yocto-worker/oe-selftest/build/build-st-17416/tmp/work/core2-64-poky-linux/bzip2/1.0.6-r5/recipe-sysroot-native/usr/bin/rpmsign&apos;, &apos;--addsign&apos;, &apos;--define&apos;, &apos;_gpg_name testuser&apos;, &apos;--define&apos;, &apos;_gpg_sign_cmd_extra_args --no-permission-warning --batch --passphrase=test123 --agent-program=/home/pokybuild/yocto-worker/oe-selftest/build/build-st-17416/tmp/work/core2-64-poky-linux/bzip2/1.0.6-r5/recipe-sysroot-native/usr/bin/gpg-agent|--auto-expand-secmem --pinentry-mode=loopback&apos;, &apos;--define&apos;, &apos;_binary_filedigest_algorithm 8&apos;, &apos;--define&apos;, &apos;__gpg /home/pokybuild/yocto-worker/oe-selftest/build/build-st-17416/tmp/work/core2-64-poky-linux/bzip2/1.0.6-r5/recipe-sysroot-native/usr/bin/gpg&apos;, &apos;--define&apos;, &apos;_gpg_path /tmp/oeqa-signing-i7scv7z9&apos;, &apos;/home/pokybuild/yocto-worker/oe-selftest/build/build-st-17416/tmp/work/core2-64-poky-linux/bzip2/1.0.6-r5/deploy-rpms/core2_64/bzip2-doc-1.0.6-r5.0.core2_64.rpm&apos;]&apos; returned non-zero exit status 255.
Subprocess output:
gpg: signing failed: Cannot allocate memory
gpg: signing failed: Cannot allocate memory
error: gpg exec failed (2)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82548</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2018-12-20 15:58:31 +0000</bug_when>
    <thetext>Robert, the amount of locked memory, from: ulimit -a | grep lock
is 16MB on my system and likely 32MB on larger servers. It&apos;s not clear how even with say 16 parallel users of gpg, we can end up with that much locked memory to result in an allocation error. It would be best to understand and document how the allocation is getting out of hand and arrange via locks perhaps to reduce contention for this scarce resource so that the error is avoided.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84108</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2019-06-07 22:13:34 +0000</bug_when>
    <thetext>Finally tracked this down: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=1334b064d3f04a976a42fe9dad64831b33d93755</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>