<?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>13506</bug_id>
          
          <creation_ts>2019-09-07 23:02:13 +0000</creation_ts>
          <short_desc>[master-next] strace ptest timed out</short_desc>
          <delta_ts>2019-09-26 15:13:29 +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>OE-Core</product>
          <component>core</component>
          <version>3.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>13556</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.8 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Armin Kuster">akuster</reporter>
          <assigned_to name="Alexander Kanavin">alex.kanavin</assigned_to>
          <cc>bruce.ashfield</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>84902</commentid>
    <comment_count>0</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2019-09-07 23:02:13 +0000</bug_when>
    <thetext>strace                       | 15           | 0            | 7           | 321 T


https://autobuilder.yocto.io/pub/non-release/20190907-13/testresults/qemux86-64-ptest/strace.log

https://autobuilder.yocto.io/pub/non-release/20190907-13/testresults/qemux86-64-ptest/testresults.json</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84910</commentid>
    <comment_count>1</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2019-09-10 17:18:01 +0000</bug_when>
    <thetext>This has regressed somewhere between kernels 5.0 and 5.2. Using the latest strace commit does not help.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84923</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2019-09-11 02:21:42 +0000</bug_when>
    <thetext>To just make the tests complete, we could lower the timeout in run-ptest:

root@qemux86-64:/usr/lib/strace/ptest# cat run-ptest
#!/bin/sh
export TIMEOUT_DURATION=20
make -B -C tests -k test-suite.log

Then ptest-runner strace results in:

============================================================================
Testsuite summary for strace 5.2
============================================================================
# TOTAL: 685
# PASS:  508
# SKIP:  152
# XFAIL: 0
# FAIL:  25
# XPASS: 0
# ERROR: 0


That doesn&apos;t get to the root cause but it might be useful.

--
debugging notes:

The logs are full of this sort of thing:

PASS: times.gen.test

PASS: trace_fstatfs.gen.test
[ 1311.457169] futex_atomic_op_inuser: 2 callbacks suppressed
[ 1311.457178] futex_wake_op: futex tries to shift op by -849; fix this program
[ 1311.460925] futex_wake_op: futex tries to shift op by -849; fix this program
[ 1311.462768] futex_wake_op: futex tries to shift op by -518; fix this program
[ 1311.464530] futex_wake_op: futex tries to shift op by -518; fix this program
[ 1311.466296] futex_wake_op: futex tries to shift op by -1; fix this program
[ 1311.467958] futex_wake_op: futex tries to shift op by -1; fix this program
[ 1311.662242] futex_wake_op: futex tries to shift op by -849; fix this program
[ 1311.668765] futex_wake_op: futex tries to shift op by -849; fix this program
[ 1311.758758] futex_wake_op: futex tries to shift op by -518; fix this program
[ 1311.765137] futex_wake_op: futex tries to shift op by -518; fix this program
^[[5~^[[5~PASS: trace_lstat.gen.test
[ 1548.103763] futex_atomic_op_inuser: 2 callbacks suppressed
[ 1548.103766] futex_wake_op: futex tries to shift op by -849; fix this program
[ 1548.108061] futex_wake_op: futex tries to shift op by -849; fix this program
[ 1548.109854] futex_wake_op: futex tries to shift op by -518; fix this program
[ 1548.111585] futex_wake_op: futex tries to shift op by -518; fix this program
[ 1548.113231] futex_wake_op: futex tries to shift op by -1; fix this program
[ 1548.114920] futex_wake_op: futex tries to shift op by -1; fix this program
[ 1548.323078] futex_wake_op: futex tries to shift op by -849; fix this program
[ 1548.329742] futex_wake_op: futex tries to shift op by -849; fix this program
[ 1548.421786] futex_wake_op: futex tries to shift op by -518; fix this program
[ 1548.427759] futex_wake_op: futex tries to shift op by -518; fix this program
PASS: trace_personality_32.gen.test
[ 1782.230746] futex_atomic_op_inuser: 2 callbacks suppressed
[ 1782.230749] futex_wake_op: futex tries to shift op by -849; fix this program
[ 1782.234645] futex_wake_op: futex tries to shift op by -849; fix this program
[ 1782.236784] futex_wake_op: futex tries to shift op by -518; fix this program
[ 1782.238965] futex_wake_op: futex tries to shift op by -518; fix this program
[ 1782.240844] futex_wake_op: futex tries to shift op by -1; fix this program
[ 1782.242583] futex_wake_op: futex tries to shift op by -1; fix this program
[ 1782.437341] futex_wake_op: futex tries to shift op by -849; fix this program
[ 1782.443768] futex_wake_op: futex tries to shift op by -849; fix this program
[ 1782.533780] futex_wake_op: futex tries to shift op by -518; fix this program
[ 1782.539765] futex_wake_op: futex tries to shift op by -518; fix this program
PASS: trace_personality_64.gen.test
[ 2005.687170] futex_atomic_op_inuser: 2 callbacks suppressed
[ 2005.687179] futex_wake_op: futex tries to shift op by -849; fix this program
[ 2005.690868] futex_wake_op: futex tries to shift op by -849; fix this program

PASS: trace_personality_regex_32.gen.test
[ 2234.836985] futex_atomic_op_inuser: 2 callbacks suppressed

PASS: trace_personality_regex_64.gen.test
[ 2466.070901] futex_atomic_op_inuser: 2 callbacks suppressed

Doing a bit of math (in my head even!)
2466 - 2234 = 232
2234 - 2005 = 229
2005 - 1782 = 223
1782 - 1548 = 234
1548 - 1311 = 237

Looks like a common timeout making all the tests slow.

Suspending the tests and looking around:

root@qemux86-64:~# ps -aef --forest
UID        PID  PPID  C STIME TTY          TIME CMD
...

root       336   299  0 00:45 ttyS0    00:00:00  \_ -sh
root       345   336  0 00:46 ?        00:00:00      \_ ptest-runner strace
root       346   345  0 00:46 pts/0    00:00:00      |   \_ /bin/sh /usr/lib/strace/ptest/run-ptest
root       347   346  0 00:46 pts/0    00:00:00      |       \_ make -B -C tests -k test-suite.log
root     16738   347  0 01:41 pts/0    00:00:00      |           \_ /bin/sh -c p=&apos;trace_stat_like.gen.test&apos;; \ case &apos;trace_stat_like.gen.log&apos; in */*)
root     16742 16738  0 01:41 pts/0    00:00:00      |               \_ /bin/sh ../test-driver --test-name trace_stat_like.gen.test --log-file trace_s
root     16743 16742  0 01:41 pts/0    00:00:00      |                   \_ timeout -k 5 -s XCPU 600 ./trace_stat_like.gen.test
root     16747 16743  0 01:41 pts/0    00:00:00      |                       \_ /bin/sh -efu ./trace_stat_like.gen.test
root     18632 16747  3 01:42 pts/0    00:00:04      |                           \_ ../../strace -o log -qq -esignal=none -e%%stat -v -P stat.sample -
root     18635 18632  3 01:42 pts/0    00:00:04      |                               \_ ../printpath-umovestr

so from there it was simple to reduce the timeout from 600 to 20 and have the tests complete.


That kernel log message isn&apos;t new:
e78c38f6bdd90 (Jiri Slaby              
    2017-10-23 13:41:51 +0200 1660)                        pr_info_ratelimited(&quot;futex_wake_op: %s tries to shift op by %d; fix this program\n&quot;,

All for now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84925</commentid>
    <comment_count>3</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2019-09-11 10:07:56 +0000</bug_when>
    <thetext>The futex stuff is present also with 5.0 kernel, and even 4.18 kernel in Ubuntu, but the tests run much faster with those kernels, so it isn&apos;t relevant. I&apos;d rather find out where the problem is than hide the issue by lowering the timeout.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84944</commentid>
    <comment_count>4</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2019-09-12 15:43:35 +0000</bug_when>
    <thetext>Hints for bisecting the issue are welcome btw! How does one do it with linux-yocto?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84950</commentid>
    <comment_count>5</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2019-09-12 17:53:13 +0000</bug_when>
    <thetext>I have narrowed this down a bit further:

root@qemux86-64:/usr/lib/strace/ptest/tests# time ../strace -o log -qq -esignal=none -e/clock ./printpath-umovestr&gt;ttt

The above line takes several minutes on kernel 5.2, but only a couple seconds on 5.0. Removing the &apos;-e/clock&apos; makes it go much faster on 5.2 as well.

Will try to dig further tomorrow. Something has regressed about processing regexps in -e option (between the two kernels!).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84951</commentid>
    <comment_count>6</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2019-09-13 13:36:51 +0000</bug_when>
    <thetext>The slowness happens in the kernel, but I am not sure where to start there. I tried to build the 5.2 kernel with 5.0 kernel config, but it didn&apos;t help. Also the same 5.2.10 kernel on my opensuse machine executes those ptests fine and without delays. I&apos;m out of ideas at this point, other than try to bisect the kernel.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84953</commentid>
    <comment_count>7</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2019-09-13 17:08:23 +0000</bug_when>
    <thetext>After a painful bisecting session, the winner was declared:

76f969e8948d82e78e1bc4beb6b9465908e74873 is the first bad commit
commit 76f969e8948d82e78e1bc4beb6b9465908e74873
Author: Roman Gushchin &lt;guro@fb.com&gt;
Date:   Fri Apr 19 10:03:04 2019 -0700

    cgroup: cgroup v2 freezer
    
    Cgroup v1 implements the freezer controller, which provides an ability
    to stop the workload in a cgroup and temporarily free up some
    resources (cpu, io, network bandwidth and, potentially, memory)
    for some other tasks. Cgroup v2 lacks this functionality.
    
    This patch implements freezer for cgroup v2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84954</commentid>
    <comment_count>8</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2019-09-13 17:21:31 +0000</bug_when>
    <thetext>Upstream report:
https://lkml.org/lkml/2019/5/13/713</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84955</commentid>
    <comment_count>9</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2019-09-13 17:27:21 +0000</bug_when>
    <thetext>Actually, this may not be the case, as the latest kernel already has a &apos;fix&apos;. Will try more on Monday.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84956</commentid>
    <comment_count>10</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2019-09-13 17:38:02 +0000</bug_when>
    <thetext>Right, the &apos;fix&apos; seems to fix one issue with the freezer, but does not actually address the performance regression of the testsuite.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84957</commentid>
    <comment_count>11</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2019-09-13 18:49:30 +0000</bug_when>
    <thetext>I can now confirm that it is definitely this:

76f969e8948d82e78e1bc4beb6b9465908e74873 is the first bad commit
commit 76f969e8948d82e78e1bc4beb6b9465908e74873
Author: Roman Gushchin &lt;guro@fb.com&gt;
Date:   Fri Apr 19 10:03:04 2019 -0700

    cgroup: cgroup v2 freezer

I believe we now have everything needed for an upstream bug report, and a workaround.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85051</commentid>
    <comment_count>12</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2019-09-24 10:39:53 +0000</bug_when>
    <thetext>The workaround is now in master. What remains is diagnosing the issue properly with upstream developers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85053</commentid>
    <comment_count>13</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2019-09-24 14:50:36 +0000</bug_when>
    <thetext>We need to track the kernel fix and when it&apos;s resolved, revert this work-around. Do you want to re-open this bug or should I create a new one?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85054</commentid>
    <comment_count>14</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2019-09-24 14:54:14 +0000</bug_when>
    <thetext>Maybe reopen this one is better? I am actually not sure if RP and/or Bruce have reported the issue yet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85055</commentid>
    <comment_count>15</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2019-09-24 15:14:43 +0000</bug_when>
    <thetext>Add Bruce to CC to find out if the bug is reported and/or being worked on.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85056</commentid>
    <comment_count>16</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2019-09-24 15:16:05 +0000</bug_when>
    <thetext>Let&apos;s reopen too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85098</commentid>
    <comment_count>17</comment_count>
    <who name="Stephen K Jolley">sjolley.yp.pm</who>
    <bug_when>2019-09-26 15:13:29 +0000</bug_when>
    <thetext>Duplicate

*** This bug has been marked as a duplicate of bug 13556 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>