Comments (4)
I have a bunch of these core dumps, and they're always at this offset in this function. Here's another example with a slightly different disassembly:
(gdb) disas
Dump of assembler code for function do_futex_wait:
0x00007f9c4e419920 <+0>: push %r12
0x00007f9c4e419922 <+2>: push %rbp
0x00007f9c4e419923 <+3>: mov %rdi,%rbp
0x00007f9c4e419926 <+6>: push %rbx
0x00007f9c4e419927 <+7>: sub $0x10,%rsp
0x00007f9c4e41992b <+11>: mov 0x8(%rdi),%ebx
0x00007f9c4e41992e <+14>: callq 0x7f9c4e41a280 <__pthread_enable_asynccancel>
0x00007f9c4e419933 <+19>: mov $0xffffffff,%r9d
0x00007f9c4e419939 <+25>: mov %eax,%r12d
0x00007f9c4e41993c <+28>: xor %r8d,%r8d
0x00007f9c4e41993f <+31>: xor $0x189,%ebx
0x00007f9c4e419945 <+37>: xor %r10d,%r10d
0x00007f9c4e419948 <+40>: xor %edx,%edx
0x00007f9c4e41994a <+42>: movslq %ebx,%rsi
0x00007f9c4e41994d <+45>: mov %rbp,%rdi
0x00007f9c4e419950 <+48>: mov $0xca,%eax
0x00007f9c4e419955 <+53>: syscall
0x00007f9c4e419957 <+55>: syscall
=> 0x00007f9c4e419959 <+57>: add %al,(%rax)
0x00007f9c4e41995b <+59>: add %al,(%rax)
0x00007f9c4e41995d <+61>: add %al,(%rax)
0x00007f9c4e41995f <+63>: mov %r12d,%edi
0x00007f9c4e419962 <+66>: callq 0x7f9c4e41a2e0 <__pthread_disable_asynccancel>
0x00007f9c4e419967 <+71>: xor %eax,%eax
0x00007f9c4e419969 <+73>: add $0x10,%rsp
0x00007f9c4e41996d <+77>: pop %rbx
0x00007f9c4e41996e <+78>: pop %rbp
0x00007f9c4e41996f <+79>: pop %r12
0x00007f9c4e419971 <+81>: retq
0x00007f9c4e419972 <+82>: nopw 0x0(%rax,%rax,1)
0x00007f9c4e419978 <+88>: mov %r12d,%edi
0x00007f9c4e41997b <+91>: mov %rax,0x8(%rsp)
0x00007f9c4e419980 <+96>: callq 0x7f9c4e41a2e0 <__pthread_disable_asynccancel>
0x00007f9c4e419985 <+101>: mov 0x8(%rsp),%rax
0x00007f9c4e41998a <+106>: cmp $0xfffffff5,%eax
0x00007f9c4e41998d <+109>: je 0x7f9c4e4199a8 <do_futex_wait+136>
0x00007f9c4e41998f <+111>: cmp $0xfffffffc,%eax
0x00007f9c4e419992 <+114>: je 0x7f9c4e4199a8 <do_futex_wait+136>
0x00007f9c4e419994 <+116>: cmp $0xffffff92,%eax
0x00007f9c4e419997 <+119>: je 0x7f9c4e4199a8 <do_futex_wait+136>
0x00007f9c4e419999 <+121>: lea 0x3420(%rip),%rdi # 0x7f9c4e41cdc0
0x00007f9c4e4199a0 <+128>: callq 0x7f9c4e40f630 <__libc_fatal@plt>
0x00007f9c4e4199a5 <+133>: nopl (%rax)
0x00007f9c4e4199a8 <+136>: neg %eax
0x00007f9c4e4199aa <+138>: jmp 0x7f9c4e419969 <do_futex_wait+73>
In this case the pyflame process hit an assertion error which caused it to bail out, I believe before restoring the original code value.
from pyflame.
I think I understand what is happening now.
When I pyflame the target process, that process could already be blocked in a syscall. In this case, the syscall is futex(2)
, which blocks. The current code fails in this case. It needs to interrupt the syscall, run the mmap syscall, and then resume the prior syscall.
from pyflame.
I released v1.3.1, which mitigates this when --threads
is not used.
from pyflame.
This was fixed by #61
from pyflame.
Related Issues (20)
- Cannot build on ubuntu 14.04 arm HOT 1
- Building pyflame on aarch64 HOT 3
- Pyflame fails on multithreaded applications with setuid HOT 3
- Work with uwsgi run on Docker HOT 2
- Add support for Python 3.7 HOT 6
- Support for Chrome 58+ style profiles
- flame-chart-json: ValueError: invalid literal for int() with base 10: '(idle) 135\n' HOT 1
- Python 3.6.7 support, seems broken HOT 3
- Profile until the profiled process is terminated? HOT 2
- How can I get the details of each thread ?
- x86_64 ubuntu14.04 not work for Failed to seize PID HOT 2
- Failed to PTRACE_PEEKDATA - in miniconda environment HOT 4
- Failed to PTRACE_PEEKDATA (pid 25920, addr 0x55c4c233b5a8) in anaconda environment HOT 1
- Make pyflame create output after itself being terminated HOT 1
- Package for pypi/pip HOT 2
- pyflame seems to be unmaintained HOT 3
- [RFC] Supports multiples PID (-p PID1 -p PID2 ...)
- Segfaults with --threads in OSQP
- Failed to locate libpython within timeout period when execute pyflame -p PID in python 2.7 HOT 1
- make fail on agx-xavier
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyflame.