how to debug ansible seg vault ?

338 views
Skip to first unread message

Mike C

unread,
Jul 26, 2017, 6:50:32 AM7/26/17
to Ansible Project
im getting a seg fault when im running my ansible. Is there a way to turn on more debugging or anything that can help me find out the source ?

My `/var/log/syslog` has entries like this

```
Jul 26 10:47:26 ubuntu-xenial kernel: [  497.822661] ansible-playboo[13890]: segfault at a9 ip 00000000004a7ee4 sp 00007ffdabc1b128 error 4 in python2.7[400000+2ea000]
```

I've tried `-vvvv` but no luck there.

Cheers

Adrian Likins

unread,
Jul 26, 2017, 5:08:46 PM7/26/17
to ansible...@googlegroups.com

Can you reproduce the segfault?

Can try running it under gdb:

    # 'bin/ansible-playbook' or the path to you ansible-playbook install (`which ansible-playbook`)
    gdb --batch -ex run  --args python bin/ansible-playbook -vvv your_playbook.yml
  
But maybe easier to use catchsegv to grab a stack trace

  catchsegv ansible-playbook -vvv your_playbook.yml

Since that log message points to a segfault in python, you likely need to install the debuginfo for
python first, something like:

  sudo apt-get install python2.7-dbg

Though the segfault is likely coming from a python C extension and not ansible
itself...



--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/8e70a592-86bd-4cee-8f9f-4736fad8ed95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mike C

unread,
Jul 26, 2017, 6:19:56 PM7/26/17
to Ansible Project
thanks for the info, ill give it a go.
Im not convinced either that the seg fault is ansibles, but i need more info to see a stack the very least.



On Wednesday, July 26, 2017 at 10:08:46 PM UTC+1, Adrian Likins wrote:

Can you reproduce the segfault?

Can try running it under gdb:

    # 'bin/ansible-playbook' or the path to you ansible-playbook install (`which ansible-playbook`)
    gdb --batch -ex run  --args python bin/ansible-playbook -vvv your_playbook.yml
  
But maybe easier to use catchsegv to grab a stack trace

  catchsegv ansible-playbook -vvv your_playbook.yml

Since that log message points to a segfault in python, you likely need to install the debuginfo for
python first, something like:

  sudo apt-get install python2.7-dbg

Though the segfault is likely coming from a python C extension and not ansible
itself...


On Wed, Jul 26, 2017 at 6:50 AM, Mike C <mhri...@gmail.com> wrote:
im getting a seg fault when im running my ansible. Is there a way to turn on more debugging or anything that can help me find out the source ?

My `/var/log/syslog` has entries like this

```
Jul 26 10:47:26 ubuntu-xenial kernel: [  497.822661] ansible-playboo[13890]: segfault at a9 ip 00000000004a7ee4 sp 00007ffdabc1b128 error 4 in python2.7[400000+2ea000]
```

I've tried `-vvvv` but no luck there.

Cheers

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages