Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyspy broken stacktrace during module import #121

Open
korniltsev opened this issue Jul 7, 2023 · 0 comments
Open

pyspy broken stacktrace during module import #121

korniltsev opened this issue Jul 7, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@korniltsev
Copy link
Collaborator

import logging
import time
logger = logging.getLogger()

logger.setLevel(logging.DEBUG)


def run_one():
    import pyroscope

    pyroscope.configure(
        enable_logging=True,
        application_name       = "simple.python.app",
        server_address = "http://127.0.0.1:4100",
    )



    time.sleep(1)

    import importlib
    from kubernetes import client, config, watch
    time.sleep(1)
    # importlib.reload(client)
    # importlib.reload(config)
    # importlib.reload(watch)
    # del client
    # del config
    # del watch

import os
for i in range(400):
    pid = os.fork()
    if pid > 0:
        continue
    else:
        run_one()
        exit(1)
        

produces something like this:


<frozen importlib._bootstrap>:228 - _call_with_frames_removed;<frozen importlib._bootstrap>:228 - _call_with_frames_removed;<frozen importlib._bootstrap_external>:850 - exec_module;<frozen importlib._bootstrap>:697 - _load_unlocked;<frozen importlib._bootstrap>:996 - _find_and_load_unlocked;<frozen importlib._bootstrap>:228 - _call_with_frames_removed;<frozen importlib._bootstrap>:228 - _call_with_frames_removed;__doc__:0 - Utility class to read content of obj[%data_key_name] or file's
     content of obj[%file_key_name] and represent it as file or data.
     Note that the data is preferred. The obj[%file_key_name] will be used iff
     obj['%data_key_name'] is not set or empty. Assumption is file content is
     raw data and data field is base64 string. The assumption can be changed
     with base64_file_content flag. If set to False, the content of the file
     will assumed to be base64 and read as is. The default True value will
     result in base64 encode of the file content after read.;<frozen importlib._bootstrap>:1007 - _find_and_load;<frozen importlib._bootstrap>:996 - _find_and_load_unlocked;<frozen importlib._bootstrap>:697 - _load_unlocked;<frozen importlib._bootstrap_external>:850 - exec_module;<frozen importlib._bootstrap_external>:978 - get_code;<frozen importlib._bootstrap_external>:1040 - get_data 1
     
@korniltsev korniltsev added the bug Something isn't working label Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant