bloomberg / bloomberg/pystack

Failure to unwind stack in an after-fork handler

Open
#102 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.2k
Forks
72
Avg merge
5d 10h
Merged PRs (30d)
5

Description

After causing a deadlock in an after-fork handler installed with `pthread_atfork`, an attempt to unwind that process with `pystack remote --native-all` is giving me

Engine error: basic_string::_S_construct null not valid

That's happening because `dwfl_getthread_frames` is not finding any frames, and also not setting `dwfl_errno` to something non-zero. Interestingly, this doesn't seem to reproduce with `eu-stack`, so we might be doing something wrong here that's causing this.

#101 fixes the failure mode that we get here, but we should figure out why unwinding is failing, as both `gdb` and `eu-stack` succeed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.