<?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>7734</bug_id>
          
          <creation_ts>2015-05-08 14:47:57 +0000</creation_ts>
          <short_desc>bitbake-prserv-tool fails to import file</short_desc>
          <delta_ts>2015-07-10 11:44:09 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BitBake</product>
          <component>bitbake</component>
          <version>1.7</version>
          <rep_platform>x86</rep_platform>
          <op_sys>x86_64</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>1.7.3</target_milestone>
          <dependson>6752</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Lucian Musat">georgex.l.musat</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>alejandro.hernandez</cc>
    
    <cc>costin.c.constantin</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
          
          <qa_contact name="Lucian Musat">georgex.l.musat</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>Regression (Used to work)</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>50880</commentid>
    <comment_count>0</comment_count>
    <who name="Lucian Musat">georgex.l.musat</who>
    <bug_when>2015-05-08 14:47:57 +0000</bug_when>
    <thetext>STATUS: FAILED
BUILD: 1.7.2_rc3: 29812e61736a95f1de64b3e9ebbb9c646ebd28dd
ENVIRONMENT: Ubuntu 14.10 x86_64
STEPS TO REPRODUCE:         Test the PR service database import/export feature. Replace the existing database.

        Use the &apos;m4&apos; recipe for the test. Use the following code to change the recipe&apos;s configuration replacing the unique text every time.
&quot;&quot;&quot;
do_package_append() {
        bb.build.exec_func(&apos;do_test_prserv&apos;, d)
}

do_test_prserv() {
       
echo &quot;Unique text here! For example use date and time in seconds.&quot;
}
&quot;&quot;&quot;

        0) Set up PR service for local use by adding PRSERV_HOST = &quot;localhost:0&quot; in local.conf.

        1) change recipe configuration and build the package
        2) get PR value of package
        3) export the PR database: bitbake-prserv-tool export export.inc
        4) remove the current db
        5) import the PR database&quot; bitbake-prserv-tool import export.inc
        6) change recipe configuration and build the package
        7) get PR value of package
        8) check that PR has increased by 1



EXPECTED OUTCOME: The exported/imported PR database should work as intended and increment the package PR number by 1 compared to the last built package.

ACTUAL OUTCOME: After removing the current db and running &quot;bitbake-prserv-tool import export.inc&quot; the command fails with the error:
ERROR: Only one copy of bitbake should be run against a build directory
Importing from file export.inc failed!

This test failed on the autobuilder (http://yocto-lava.rb.intel.com/dashboard/streams/anonymous/oe-selftest-ubuntu/bundles/aa1bc9f8922ebfd7d34f5e9df928b52bad05f247/22af75ff-b651-47fe-a05c-03d0cb768094/result/38/).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50919</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2015-05-12 14:30:11 +0000</bug_when>
    <thetext>Is this a new test for PR Service? Or an existing test that is now Automated? The failure seems to indicate that bitbake might have still been running, did you verify this failure outside of the lava tools?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50935</commentid>
    <comment_count>2</comment_count>
    <who name="Lucian Musat">georgex.l.musat</who>
    <bug_when>2015-05-12 15:40:40 +0000</bug_when>
    <thetext>Hi Saul,

This is an old test that was automated some time ago. I tested this manually too. Right now I can&apos;t even pass the export step because of that error. I know this is usually because another bitbake is running in the background, but in this case I can&apos;t see anything:

lucian@lucian-OptiPlex-9010:~/poky/build$ bitbake-prserv-tool export export.inc
ERROR: Only one copy of bitbake should be run against a build directory
lucian@lucian-OptiPlex-9010:~/poky/build$ 
lucian@lucian-OptiPlex-9010:~/poky/build$ 
lucian@lucian-OptiPlex-9010:~/poky/build$ ps ax | grep python
 3173 pts/1    S+     0:00 grep --color=auto python
lucian@lucian-OptiPlex-9010:~/poky/build$ 
lucian@lucian-OptiPlex-9010:~/poky/build$ 
lucian@lucian-OptiPlex-9010:~/poky/build$ ps ax | grep bitbake
 3177 pts/1    S+     0:00 grep --color=auto bitbake
lucian@lucian-OptiPlex-9010:~/poky/build$ 
lucian@lucian-OptiPlex-9010:~/poky/build$ ps aux | grep gcc
lucian    3321  0.0  0.0  10964  2304 pts/1    S+   18:31   0:00 grep --color=auto gcc
lucian@lucian-OptiPlex-9010:~/poky/build$ 
lucian@lucian-OptiPlex-9010:~/poky/build$ 
lucian@lucian-OptiPlex-9010:~/poky/build$ 
lucian@lucian-OptiPlex-9010:~/poky/build$ bitbake m4
NOTE: Started PRServer with DBfile: /home/lucian/poky/build/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 36896, PID: 3339
WARNING: Host distribution &quot;Ubuntu-15.04&quot; has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Parsing recipes: 100% |##########################################################################################################| Time: 00:00:11
Parsing of 893 .bb files complete (0 cached, 893 parsed). 1289 targets, 40 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = &quot;1.24.0&quot;
BUILD_SYS         = &quot;x86_64-linux&quot;
NATIVELSBSTRING   = &quot;Ubuntu-15.04&quot;
TARGET_SYS        = &quot;i586-poky-linux&quot;
MACHINE           = &quot;qemux86&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;1.7.2&quot;
TUNE_FEATURES     = &quot;m32 i586&quot;
TARGET_FPU        = &quot;&quot;
meta              
meta-yocto        
meta-yocto-bsp    = &quot;(detachedfrom29812e6):29812e61736a95f1de64b3e9ebbb9c646ebd28dd&quot;

NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 382 tasks of which 382 didn&apos;t need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.
lucian@lucian-OptiPlex-9010:~/poky/build$</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50944</commentid>
    <comment_count>3</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2015-05-12 19:15:40 +0000</bug_when>
    <thetext>Did this pass for the RC2 build?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50966</commentid>
    <comment_count>4</comment_count>
    <who name="Costin">costin.c.constantin</who>
    <bug_when>2015-05-13 13:23:36 +0000</bug_when>
    <thetext>Hello,

For the RC2 build it did pass. I tested it. However, it seems that this bug is not consistent in terms of reproducibility. There are cases when both import/export of database work fine with no issue and there are times like comment#2 when it alternates. This bug is similar to 6752. 

Costin</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50972</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-05-13 14:34:14 +0000</bug_when>
    <thetext>The message &quot;Only one copy of bitbake should be run against a build directory&quot; means what it says, there are multiple copies of bitbake running. Is this something transient, e.g. does waiting a short while make the problem go away, or do you have to kill processes to allow things to work again?

If its a transient process, its much less of an issue that if bitbake is hanging/crashing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50986</commentid>
    <comment_count>6</comment_count>
    <who name="Lucian Musat">georgex.l.musat</who>
    <bug_when>2015-05-14 08:46:53 +0000</bug_when>
    <thetext>Hi Richard,

As you can see I looked with ps and could not find any other bitbake process running. Furthermore bitbake-prserv-tool complained but the bitbake command ran just fine. If there was a bitbake process in the background bitbake itself would have complained about that, but it didn&apos;t.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51942</commentid>
    <comment_count>7</comment_count>
    <who name="Alejandro Hernandez">alejandro.hernandez</who>
    <bug_when>2015-06-25 17:12:49 +0000</bug_when>
    <thetext>I am not able to reproduce this locally, the process for me goes smoothly, importing the db successfully, and after rebuilding the PR is increased by 1 as it should&apos;ve, could this be Autobuilder specific?, I will test on the local AB just in case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51944</commentid>
    <comment_count>8</comment_count>
    <who name="Alejandro Hernandez">alejandro.hernandez</who>
    <bug_when>2015-06-25 19:45:35 +0000</bug_when>
    <thetext>I need more info since I am not able to reproduce this</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52282</commentid>
    <comment_count>9</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-07-10 11:44:00 +0000</bug_when>
    <thetext>I believe this to be the same issues as Leonardo&apos;s changes from http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=3b5b74b430f0c62bcb4bbbcce02b18f2cb12d336 (and preceeding two patches) fix andrelated to bug #7941. I believe this is resolved now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52283</commentid>
    <comment_count>10</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-07-10 11:44:09 +0000</bug_when>
    <thetext>Resolve.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>