Ansible 2.7.x broken looping

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Ansible 2.7.x broken looping

Edward Lopez-Acosta
Hello team,

Mark (I got approval from him to CC here) reported an issue with looping
in ansible 2.7 this morning and I spent some time investigating using
the following playbook, I was able to duplicate the issue using -current
and latest snapshot:

$ cat test.yml
---
- hosts: localhost
   tasks:
   - name: testloop
     shell: echo "{{ item }}"
     loop: [ 0, 1, 2, 3, 4, 5 ]

What ends up happening is it echos the 0 then hangs. When I checked with
a ktrace I see the log spammed with the following:

$ kdump -f ktrace.out | tail -n20
 

  96816 python2.7 CALL  sched_yield()
  96816 python2.7 RET   sched_yield 0
  96816 python2.7 CALL  sched_yield()
  96816 python2.7 RET   sched_yield 0
  96816 python2.7 CALL  sched_yield()
  96816 python2.7 RET   sched_yield 0
  96816 python2.7 CALL  sched_yield()
  96816 python2.7 RET   sched_yield 0
  96816 python2.7 CALL  sched_yield()
  96816 python2.7 RET   sched_yield 0
  96816 python2.7 CALL  sched_yield()
  96816 python2.7 RET   sched_yield 0
  96816 python2.7 CALL  sched_yield()
  96816 python2.7 RET   sched_yield 0
  96816 python2.7 CALL  sched_yield()
  96816 python2.7 RET   sched_yield 0
  96816 python2.7 CALL  sched_yield()
  96816 python2.7 RET   sched_yield 0
  96816 python2.7 CALL  sched_yield()
  96816 python2.7 RET   sched_yield 0

This is an issue in ansible 2.7.x. I did not see any list emails for
this, and checking on IRC others saw similar issues.

My experience with this is limited and I am not sure where to look next.
Would anyone be able to lend a hand and help me learn while this gets
solved please?

Thank you,
--
Edward Lopez-Acosta

Reply | Threaded
Open this post in threaded view
|

Re: Ansible 2.7.x broken looping

Daniel Jakots-3
On Thu, 22 Nov 2018 10:23:39 -0600, Edward Lopez-Acosta
<[hidden email]> wrote:

> $ cat test.yml
> ---
> - hosts: localhost
>    tasks:
>    - name: testloop
>      shell: echo "{{ item }}"
>      loop: [ 0, 1, 2, 3, 4, 5 ]
>

> This is an issue in ansible 2.7.x. I did not see any list emails for
> this, and checking on IRC others saw similar issues.
>
> My experience with this is limited and I am not sure where to look
> next. Would anyone be able to lend a hand and help me learn while
> this gets solved please?

The problem is "Add automatic threading initialization for libcrypto."
https://github.com/openbsd/src/commit/3938ed1ebd7560655156b4463ed629b56b149c35#diff-14fea22428619a6129735cb456170388

Thanks for the PoC, Brent asked how to reproduce the problem so
hopefully it will help him.


Cheers,
Daniel

Reply | Threaded
Open this post in threaded view
|

Re: Ansible 2.7.x broken looping

Joel Sing-3
On Thursday 22 November 2018 11:39:53 Daniel Jakots wrote:

> On Thu, 22 Nov 2018 10:23:39 -0600, Edward Lopez-Acosta
>
> <[hidden email]> wrote:
> > $ cat test.yml
> > ---
> > - hosts: localhost
> >
> >    tasks:
> >    - name: testloop
> >    
> >      shell: echo "{{ item }}"
> >      loop: [ 0, 1, 2, 3, 4, 5 ]
> >
> > This is an issue in ansible 2.7.x. I did not see any list emails for
> > this, and checking on IRC others saw similar issues.
> >
> > My experience with this is limited and I am not sure where to look
> > next. Would anyone be able to lend a hand and help me learn while
> > this gets solved please?
>
> The problem is "Add automatic threading initialization for libcrypto."
> https://github.com/openbsd/src/commit/3938ed1ebd7560655156b4463ed629b56b149c
> 35#diff-14fea22428619a6129735cb456170388
>
> Thanks for the PoC, Brent asked how to reproduce the problem so
> hopefully it will help him.

I've just committed a fix for this - thanks for the report.