vorner / pyo3-log

Logging bridge from pyo3 native extension to python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`pyo3_init` resulting in a segementation fault

sansyrox opened this issue Β· comments

Hi,

I am trying to add pyo3-log in my code but it is resulting in a seg fault.

Here is the rust code

mod executors;
mod io_helpers;
mod request_handler;
mod routers;
mod server;
mod shared_socket;
mod types;
mod web_socket_connection;
// use pyo3_log::{Caching, Logger};

use server::Server;
use shared_socket::SocketHeld;

// pyO3 module
use pyo3::prelude::*;

#[pymodule]
pub fn robyn(_py: Python<'_>, m: &PyModule) -> PyResult<()> {
    // the pymodule class to make the rustPyFunctions available
    pyo3_log::init();

    m.add_class::<Server>()?;
    m.add_class::<SocketHeld>()?;
    pyo3::prepare_freethreaded_python();

    Ok(())
}

and here is the python code

# default imports
import os
import asyncio
from inspect import signature
import multiprocessing as mp
from robyn.events import Events

# custom imports and exports
from .robyn import SocketHeld
from .argument_parser import ArgumentParser
from .responses import static_file, jsonify
from .dev_event_handler import EventHandler
from .processpool import spawn_process
from .log_colors import Colors
from .ws import WS
from .router import Router, MiddlewareRouter, WebSocketRouter

# 3rd party imports and exports
from multiprocess import Process
from watchdog.observers import Observer

mp.allow_connection_pickling()

import logging

FORMAT = '%(levelname)s %(name)s %(asctime)-15s %(filename)s:%(lineno)d %(message)s'
logging.basicConfig(format=FORMAT)
logging.getLogger().setLevel(logging.INFO)
logging.info("Test 1")


class Robyn:
    """This is the python wrapper for the Robyn binaries."""

    def start(self, url="127.0.0.1", port=5000):
        """
        Starts the server

        :param port int: reperesents the port number at which the server is listening
        """

        if not self.dev:
            processes = []
            workers = self.workers
            socket = SocketHeld(url, port)
            for _ in range(self.processes):
                copied_socket = socket.try_clone()
                p = Process(
                    target=spawn_process,
                    args=(
                        self.directories,
                        self.headers,
                        self.router.get_routes(),
                        self.middleware_router.get_routes(),
                        self.web_socket_router.get_routes(),
                        self.event_handlers,
                        copied_socket,
                        workers,
                    ),
                )
                p.start()
                processes.append(p)

            print("Press Ctrl + C to stop \n")
            try:
                for process in processes:
                    process.join()
            except KeyboardInterrupt:
                print(f"\n{Colors.BOLD}{Colors.OKGREEN} Terminating server!! {Colors.ENDC}")
                for process in processes:
                    process.kill()
        else:
            event_handler = EventHandler(self.file_path)
            event_handler.start_server_first_time()
            print(
                f"{Colors.OKBLUE}Dev server initialised with the directory_path : {self.directory_path}{Colors.ENDC}"
            )
            observer = Observer()
            observer.schedule(event_handler, path=self.directory_path, recursive=True)
            observer.start()
            try:
                while True:
                    pass
            finally:
                observer.stop()
                observer.join()

I was able to identify the problem to this snippet by using comments and print statements.

mp.allow_connection_pickling()


def spawn_process(
    directories, headers, routes, middlewares, web_sockets, event_handlers, socket, workers
):
    """
    This function is called by the main process handler to create a server runtime.
    This functions allows one runtime per process.

    :param directories tuple: the list of all the directories and related data in a tuple
    :param headers tuple: All the global headers in a tuple
    :param routes Tuple[Route]: The routes touple, containing the description about every route.
    :param middlewares Tuple[Route]: The middleware router touple, containing the description about every route.
    :param web_sockets list: This is a list of all the web socket routes
    :param event_handlers Dict: This is an event dict that contains the event handlers
    :param socket SocketHeld: This is the main tcp socket, which is being shared across multiple processes.
    :param process_name string: This is the name given to the process to identify the process
    :param workers number: This is the name given to the process to identify the process
    """

    # platform_name = platform.machine()
    if sys.platform.startswith("win32") or sys.platform.startswith("linux-cross"):
        loop = asyncio.new_event_loop()
        asyncio.set_event_loop(loop)
    else:
        # uv loop doesn't support windows or arm machines at the moment
        # but uv loop is much faster than native asyncio
        import uvloop

        uvloop.install()
        loop = uvloop.new_event_loop()
        asyncio.set_event_loop(loop)

    server = Server()

    for directory in directories:
        route, directory_path, index_file, show_files_listing = directory
        server.add_directory(route, directory_path, index_file, show_files_listing)

    for key, val in headers:
        server.add_header(key, val)

    for route in routes:
        route_type, endpoint, handler, is_async, number_of_params = route
        server.add_route(route_type, endpoint, handler, is_async, number_of_params)

    for route in middlewares:
        route_type, endpoint, handler, is_async, number_of_params = route
        server.add_middleware_route(route_type, endpoint, handler, is_async, number_of_params)

    if "startup" in event_handlers:
        server.add_startup_handler(event_handlers[Events.STARTUP][0], event_handlers[Events.STARTUP][1])

    if "shutdown" in event_handlers:
        server.add_shutdown_handler(event_handlers[Events.SHUTDOWN][0], event_handlers[Events.SHUTDOWN][1])

    for endpoint in web_sockets:
        web_socket = web_sockets[endpoint]
        print(web_socket.methods)
        server.add_web_socket_route(
            endpoint,
            web_socket.methods["connect"],
            web_socket.methods["close"],
            web_socket.methods["message"],
        )

    try:
        server.start(socket, workers)
        loop = asyncio.get_event_loop()
        loop.run_forever()
    except KeyboardInterrupt:
        loop.close()

I am getting the following error code:

πŸ“¦ Built wheel for CPython 3.10 to /var/folders/4k/tfv95dys49s5syt_t24swgvh0000gn/T/.tmpslmZ2C/robyn-0.16.3-cp310-cp310-macosx_10_7_x86_64.whl
πŸ›   Installed robyn-0.16.3
[1]    65284 segmentation fault  python3 integration_tests/base_routes.py

and I am using maturin as the development system.

Do you happen to know a fix for this?

Hello

No, this is the first time I'm seeing this. It would help if you could minimize the reproducer to something shorter. Also, a stack trace from gdb could shed some light into what's happening. And honestly, segfault is a bit suspicious thing here, as poy3-log has no unsafe code in it β€’ the theory is that it should be impossible to cause it from such code due to Rust safety guarantees and that the problem probably lies somewhere else (or at least part of the problem).

Hi @vorner ,

Thank you for your revert. I was able to isolate the problem to some extent(updated in the description).

However, I am still learning on how to use gdb with python. I will update the trace as soon as I can figure it out.

Just tried out lldb, which is similar to gdb.

But I still got this. I created a simple bash script to run the script with the venv Python.

(lldb) platform shell /Users/bruhh/Desktop/robyn/a.sh
/Users/bruhh/Desktop/robyn/a.sh: line 3: 97612 Segmentation fault: 11  /Users/bruhh/Desktop/robyn/venv/bin/python /Users/bruhh/Desktop/robyn/integration_tests/base_routes.py
error: command returned with status 139

Hi @vorner ,

I was unable to debug what was causing the seg fault. But I was able to find a fix to this issue. My repo is using pyo3-0.14.x and the latest version of pyo3-log requires atleast 0.16.0 (correct me if I am wrong).

I fixed it by downgrading pyo3-log.

Let me re-check I understand it correctly. Your program contained two versions of pyo3, using both? If that's the case, then it's something that I wouldn't expect to work and matching the versions is the right solution.

Anyway, the last few versions of pyo3-log differ only in the version of pyo3 they depend on, so you're not missing anything by downgrading (at least, not on the pyo3-log side).

Let me re-check I understand it correctly. Your program contained two versions of pyo3, using both? If that's the case, then it's something that I wouldn't expect to work and matching the versions is the right solution.

Nope. It only contained one pyo3(0.14.1).

Anyway, the last few versions of pyo3-log differ only in the version of pyo3 they depend on, so you're not missing anything by downgrading (at least, not on the pyo3-log side).

Ah, perfect then! :D

Nope. It only contained one pyo3(0.14.1).

I mean including the indirect dependencies. You depended (directly) on 0.14.1 and pyo3-log depended on 0.16, so it pulled in both into the dep graph.

Do you still have the old version somewhere? Can you do cargo tree on that? (you might need to install it) or attach the Cargo.lock or Cargo.toml here?

@vorner ,

I mean including the indirect dependencies. You depended (directly) on 0.14.1 and pyo3-log depended on 0.16, so it pulled in both into the dep graph.

That would have been possible.

Here is the cargo tree

robyn v0.16.3 (/Users/bruhh/Desktop/robyn)
β”œβ”€β”€ actix v0.13.0
β”‚   β”œβ”€β”€ actix-rt v2.7.0
β”‚   β”‚   β”œβ”€β”€ futures-core v0.3.21
β”‚   β”‚   └── tokio v1.18.2
β”‚   β”‚       β”œβ”€β”€ bytes v1.1.0
β”‚   β”‚       β”œβ”€β”€ libc v0.2.125
β”‚   β”‚       β”œβ”€β”€ memchr v2.5.0
β”‚   β”‚       β”œβ”€β”€ mio v0.8.3
β”‚   β”‚       β”‚   β”œβ”€β”€ libc v0.2.125
β”‚   β”‚       β”‚   └── log v0.4.17
β”‚   β”‚       β”‚       └── cfg-if v1.0.0
β”‚   β”‚       β”œβ”€β”€ num_cpus v1.13.1
β”‚   β”‚       β”‚   └── libc v0.2.125
β”‚   β”‚       β”œβ”€β”€ once_cell v1.10.0
β”‚   β”‚       β”œβ”€β”€ parking_lot v0.12.0
β”‚   β”‚       β”‚   β”œβ”€β”€ lock_api v0.4.7
β”‚   β”‚       β”‚   β”‚   └── scopeguard v1.1.0
β”‚   β”‚       β”‚   β”‚   [build-dependencies]
β”‚   β”‚       β”‚   β”‚   └── autocfg v1.1.0
β”‚   β”‚       β”‚   └── parking_lot_core v0.9.3
β”‚   β”‚       β”‚       β”œβ”€β”€ cfg-if v1.0.0
β”‚   β”‚       β”‚       β”œβ”€β”€ libc v0.2.125
β”‚   β”‚       β”‚       └── smallvec v1.8.0
β”‚   β”‚       β”œβ”€β”€ pin-project-lite v0.2.9
β”‚   β”‚       β”œβ”€β”€ signal-hook-registry v1.4.0
β”‚   β”‚       β”‚   └── libc v0.2.125
β”‚   β”‚       β”œβ”€β”€ socket2 v0.4.5
β”‚   β”‚       β”‚   └── libc v0.2.125
β”‚   β”‚       └── tokio-macros v1.7.0 (proc-macro)
β”‚   β”‚           β”œβ”€β”€ proc-macro2 v1.0.38
β”‚   β”‚           β”‚   └── unicode-xid v0.2.3
β”‚   β”‚           β”œβ”€β”€ quote v1.0.18
β”‚   β”‚           β”‚   └── proc-macro2 v1.0.38 (*)
β”‚   β”‚           └── syn v1.0.92
β”‚   β”‚               β”œβ”€β”€ proc-macro2 v1.0.38 (*)
β”‚   β”‚               β”œβ”€β”€ quote v1.0.18 (*)
β”‚   β”‚               └── unicode-xid v0.2.3
β”‚   β”œβ”€β”€ actix_derive v0.6.0 (proc-macro)
β”‚   β”‚   β”œβ”€β”€ proc-macro2 v1.0.38 (*)
β”‚   β”‚   β”œβ”€β”€ quote v1.0.18 (*)
β”‚   β”‚   └── syn v1.0.92 (*)
β”‚   β”œβ”€β”€ bitflags v1.3.2
β”‚   β”œβ”€β”€ bytes v1.1.0
β”‚   β”œβ”€β”€ crossbeam-channel v0.5.4
β”‚   β”‚   β”œβ”€β”€ cfg-if v1.0.0
β”‚   β”‚   └── crossbeam-utils v0.8.8
β”‚   β”‚       β”œβ”€β”€ cfg-if v1.0.0
β”‚   β”‚       └── lazy_static v1.4.0
β”‚   β”œβ”€β”€ futures-core v0.3.21
β”‚   β”œβ”€β”€ futures-sink v0.3.21
β”‚   β”œβ”€β”€ futures-task v0.3.21
β”‚   β”œβ”€β”€ futures-util v0.3.21
β”‚   β”‚   β”œβ”€β”€ futures-channel v0.3.21
β”‚   β”‚   β”‚   β”œβ”€β”€ futures-core v0.3.21
β”‚   β”‚   β”‚   └── futures-sink v0.3.21
β”‚   β”‚   β”œβ”€β”€ futures-core v0.3.21
β”‚   β”‚   β”œβ”€β”€ futures-io v0.3.21
β”‚   β”‚   β”œβ”€β”€ futures-macro v0.3.21 (proc-macro)
β”‚   β”‚   β”‚   β”œβ”€β”€ proc-macro2 v1.0.38 (*)
β”‚   β”‚   β”‚   β”œβ”€β”€ quote v1.0.18 (*)
β”‚   β”‚   β”‚   └── syn v1.0.92 (*)
β”‚   β”‚   β”œβ”€β”€ futures-sink v0.3.21
β”‚   β”‚   β”œβ”€β”€ futures-task v0.3.21
β”‚   β”‚   β”œβ”€β”€ memchr v2.5.0
β”‚   β”‚   β”œβ”€β”€ pin-project-lite v0.2.9
β”‚   β”‚   β”œβ”€β”€ pin-utils v0.1.0
β”‚   β”‚   └── slab v0.4.6
β”‚   β”œβ”€β”€ log v0.4.17 (*)
β”‚   β”œβ”€β”€ once_cell v1.10.0
β”‚   β”œβ”€β”€ parking_lot v0.12.0 (*)
β”‚   β”œβ”€β”€ pin-project-lite v0.2.9
β”‚   β”œβ”€β”€ smallvec v1.8.0
β”‚   β”œβ”€β”€ tokio v1.18.2 (*)
β”‚   └── tokio-util v0.7.1
β”‚       β”œβ”€β”€ bytes v1.1.0
β”‚       β”œβ”€β”€ futures-core v0.3.21
β”‚       β”œβ”€β”€ futures-sink v0.3.21
β”‚       β”œβ”€β”€ pin-project-lite v0.2.9
β”‚       β”œβ”€β”€ tokio v1.18.2 (*)
β”‚       └── tracing v0.1.34
β”‚           β”œβ”€β”€ cfg-if v1.0.0
β”‚           β”œβ”€β”€ log v0.4.17 (*)
β”‚           β”œβ”€β”€ pin-project-lite v0.2.9
β”‚           β”œβ”€β”€ tracing-attributes v0.1.21 (proc-macro)
β”‚           β”‚   β”œβ”€β”€ proc-macro2 v1.0.38 (*)
β”‚           β”‚   β”œβ”€β”€ quote v1.0.18 (*)
β”‚           β”‚   └── syn v1.0.92 (*)
β”‚           └── tracing-core v0.1.26
β”‚               └── lazy_static v1.4.0
β”œβ”€β”€ actix-files v0.6.0
β”‚   β”œβ”€β”€ actix-http v3.0.4
β”‚   β”‚   β”œβ”€β”€ actix-codec v0.5.0
β”‚   β”‚   β”‚   β”œβ”€β”€ bitflags v1.3.2
β”‚   β”‚   β”‚   β”œβ”€β”€ bytes v1.1.0
β”‚   β”‚   β”‚   β”œβ”€β”€ futures-core v0.3.21
β”‚   β”‚   β”‚   β”œβ”€β”€ futures-sink v0.3.21
β”‚   β”‚   β”‚   β”œβ”€β”€ log v0.4.17 (*)
β”‚   β”‚   β”‚   β”œβ”€β”€ memchr v2.5.0
β”‚   β”‚   β”‚   β”œβ”€β”€ pin-project-lite v0.2.9
β”‚   β”‚   β”‚   β”œβ”€β”€ tokio v1.18.2 (*)
β”‚   β”‚   β”‚   └── tokio-util v0.7.1 (*)
β”‚   β”‚   β”œβ”€β”€ actix-rt v2.7.0 (*)
β”‚   β”‚   β”œβ”€β”€ actix-service v2.0.2
β”‚   β”‚   β”‚   β”œβ”€β”€ futures-core v0.3.21
β”‚   β”‚   β”‚   β”œβ”€β”€ paste v1.0.7 (proc-macro)
β”‚   β”‚   β”‚   └── pin-project-lite v0.2.9
β”‚   β”‚   β”œβ”€β”€ actix-utils v3.0.0
β”‚   β”‚   β”‚   β”œβ”€β”€ local-waker v0.1.3
β”‚   β”‚   β”‚   └── pin-project-lite v0.2.9
β”‚   β”‚   β”œβ”€β”€ ahash v0.7.6
β”‚   β”‚   β”‚   β”œβ”€β”€ getrandom v0.2.6
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ cfg-if v1.0.0
β”‚   β”‚   β”‚   β”‚   └── libc v0.2.125
β”‚   β”‚   β”‚   └── once_cell v1.10.0
β”‚   β”‚   β”‚   [build-dependencies]
β”‚   β”‚   β”‚   └── version_check v0.9.4
β”‚   β”‚   β”œβ”€β”€ base64 v0.13.0
β”‚   β”‚   β”œβ”€β”€ bitflags v1.3.2
β”‚   β”‚   β”œβ”€β”€ brotli v3.3.4
β”‚   β”‚   β”‚   β”œβ”€β”€ alloc-no-stdlib v2.0.3
β”‚   β”‚   β”‚   β”œβ”€β”€ alloc-stdlib v0.2.1
β”‚   β”‚   β”‚   β”‚   └── alloc-no-stdlib v2.0.3
β”‚   β”‚   β”‚   └── brotli-decompressor v2.3.2
β”‚   β”‚   β”‚       β”œβ”€β”€ alloc-no-stdlib v2.0.3
β”‚   β”‚   β”‚       └── alloc-stdlib v0.2.1 (*)
β”‚   β”‚   β”œβ”€β”€ bytes v1.1.0
β”‚   β”‚   β”œβ”€β”€ bytestring v1.0.0
β”‚   β”‚   β”‚   └── bytes v1.1.0
β”‚   β”‚   β”œβ”€β”€ derive_more v0.99.17 (proc-macro)
β”‚   β”‚   β”‚   β”œβ”€β”€ convert_case v0.4.0
β”‚   β”‚   β”‚   β”œβ”€β”€ proc-macro2 v1.0.38 (*)
β”‚   β”‚   β”‚   β”œβ”€β”€ quote v1.0.18 (*)
β”‚   β”‚   β”‚   └── syn v1.0.92 (*)
β”‚   β”‚   β”‚   [build-dependencies]
β”‚   β”‚   β”‚   └── rustc_version v0.4.0
β”‚   β”‚   β”‚       └── semver v1.0.9
β”‚   β”‚   β”œβ”€β”€ encoding_rs v0.8.31
β”‚   β”‚   β”‚   └── cfg-if v1.0.0
β”‚   β”‚   β”œβ”€β”€ flate2 v1.0.23
β”‚   β”‚   β”‚   β”œβ”€β”€ cfg-if v1.0.0
β”‚   β”‚   β”‚   β”œβ”€β”€ crc32fast v1.3.2
β”‚   β”‚   β”‚   β”‚   └── cfg-if v1.0.0
β”‚   β”‚   β”‚   β”œβ”€β”€ libc v0.2.125
β”‚   β”‚   β”‚   └── miniz_oxide v0.5.1
β”‚   β”‚   β”‚       └── adler v1.0.2
β”‚   β”‚   β”œβ”€β”€ futures-core v0.3.21
β”‚   β”‚   β”œβ”€β”€ h2 v0.3.13
β”‚   β”‚   β”‚   β”œβ”€β”€ bytes v1.1.0
β”‚   β”‚   β”‚   β”œβ”€β”€ fnv v1.0.7
β”‚   β”‚   β”‚   β”œβ”€β”€ futures-core v0.3.21
β”‚   β”‚   β”‚   β”œβ”€β”€ futures-sink v0.3.21
β”‚   β”‚   β”‚   β”œβ”€β”€ futures-util v0.3.21 (*)
β”‚   β”‚   β”‚   β”œβ”€β”€ http v0.2.7
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ bytes v1.1.0
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ fnv v1.0.7
β”‚   β”‚   β”‚   β”‚   └── itoa v1.0.1
β”‚   β”‚   β”‚   β”œβ”€β”€ indexmap v1.8.1
β”‚   β”‚   β”‚   β”‚   └── hashbrown v0.11.2
β”‚   β”‚   β”‚   β”‚   [build-dependencies]
β”‚   β”‚   β”‚   β”‚   └── autocfg v1.1.0
β”‚   β”‚   β”‚   β”œβ”€β”€ slab v0.4.6
β”‚   β”‚   β”‚   β”œβ”€β”€ tokio v1.18.2 (*)
β”‚   β”‚   β”‚   β”œβ”€β”€ tokio-util v0.7.1 (*)
β”‚   β”‚   β”‚   └── tracing v0.1.34 (*)
β”‚   β”‚   β”œβ”€β”€ http v0.2.7 (*)
β”‚   β”‚   β”œβ”€β”€ httparse v1.7.1
β”‚   β”‚   β”œβ”€β”€ httpdate v1.0.2
β”‚   β”‚   β”œβ”€β”€ itoa v1.0.1
β”‚   β”‚   β”œβ”€β”€ language-tags v0.3.2
β”‚   β”‚   β”œβ”€β”€ local-channel v0.1.3
β”‚   β”‚   β”‚   β”œβ”€β”€ futures-core v0.3.21
β”‚   β”‚   β”‚   β”œβ”€β”€ futures-sink v0.3.21
β”‚   β”‚   β”‚   β”œβ”€β”€ futures-util v0.3.21 (*)
β”‚   β”‚   β”‚   └── local-waker v0.1.3
β”‚   β”‚   β”œβ”€β”€ log v0.4.17 (*)
β”‚   β”‚   β”œβ”€β”€ mime v0.3.16
β”‚   β”‚   β”œβ”€β”€ percent-encoding v2.1.0
β”‚   β”‚   β”œβ”€β”€ pin-project-lite v0.2.9
β”‚   β”‚   β”œβ”€β”€ rand v0.8.5
β”‚   β”‚   β”‚   β”œβ”€β”€ libc v0.2.125
β”‚   β”‚   β”‚   β”œβ”€β”€ rand_chacha v0.3.1
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ppv-lite86 v0.2.16
β”‚   β”‚   β”‚   β”‚   └── rand_core v0.6.3
β”‚   β”‚   β”‚   β”‚       └── getrandom v0.2.6 (*)
β”‚   β”‚   β”‚   └── rand_core v0.6.3 (*)
β”‚   β”‚   β”œβ”€β”€ sha-1 v0.10.0
β”‚   β”‚   β”‚   β”œβ”€β”€ cfg-if v1.0.0
β”‚   β”‚   β”‚   β”œβ”€β”€ cpufeatures v0.2.2
β”‚   β”‚   β”‚   └── digest v0.10.3
β”‚   β”‚   β”‚       β”œβ”€β”€ block-buffer v0.10.2
β”‚   β”‚   β”‚       β”‚   └── generic-array v0.14.5
β”‚   β”‚   β”‚       β”‚       └── typenum v1.15.0
β”‚   β”‚   β”‚       β”‚       [build-dependencies]
β”‚   β”‚   β”‚       β”‚       └── version_check v0.9.4
β”‚   β”‚   β”‚       └── crypto-common v0.1.3
β”‚   β”‚   β”‚           β”œβ”€β”€ generic-array v0.14.5 (*)
β”‚   β”‚   β”‚           └── typenum v1.15.0
β”‚   β”‚   β”œβ”€β”€ smallvec v1.8.0
β”‚   β”‚   └── zstd v0.10.0+zstd.1.5.2
β”‚   β”‚       └── zstd-safe v4.1.4+zstd.1.5.2
β”‚   β”‚           β”œβ”€β”€ libc v0.2.125
β”‚   β”‚           └── zstd-sys v1.6.3+zstd.1.5.2
β”‚   β”‚               └── libc v0.2.125
β”‚   β”‚               [build-dependencies]
β”‚   β”‚               └── cc v1.0.73
β”‚   β”‚                   └── jobserver v0.1.24
β”‚   β”‚                       └── libc v0.2.125
β”‚   β”œβ”€β”€ actix-service v2.0.2 (*)
β”‚   β”œβ”€β”€ actix-utils v3.0.0 (*)
β”‚   β”œβ”€β”€ actix-web v4.0.1
β”‚   β”‚   β”œβ”€β”€ actix-codec v0.5.0 (*)
β”‚   β”‚   β”œβ”€β”€ actix-http v3.0.4 (*)
β”‚   β”‚   β”œβ”€β”€ actix-macros v0.2.3 (proc-macro)
β”‚   β”‚   β”‚   β”œβ”€β”€ quote v1.0.18 (*)
β”‚   β”‚   β”‚   └── syn v1.0.92 (*)
β”‚   β”‚   β”œβ”€β”€ actix-router v0.5.0
β”‚   β”‚   β”‚   β”œβ”€β”€ bytestring v1.0.0 (*)
β”‚   β”‚   β”‚   β”œβ”€β”€ firestorm v0.5.0
β”‚   β”‚   β”‚   β”œβ”€β”€ http v0.2.7 (*)
β”‚   β”‚   β”‚   β”œβ”€β”€ log v0.4.17 (*)
β”‚   β”‚   β”‚   β”œβ”€β”€ regex v1.5.5
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ aho-corasick v0.7.18
β”‚   β”‚   β”‚   β”‚   β”‚   └── memchr v2.5.0
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ memchr v2.5.0
β”‚   β”‚   β”‚   β”‚   └── regex-syntax v0.6.25
β”‚   β”‚   β”‚   └── serde v1.0.137
β”‚   β”‚   β”œβ”€β”€ actix-rt v2.7.0 (*)
β”‚   β”‚   β”œβ”€β”€ actix-server v2.1.1
β”‚   β”‚   β”‚   β”œβ”€β”€ actix-rt v2.7.0 (*)
β”‚   β”‚   β”‚   β”œβ”€β”€ actix-service v2.0.2 (*)
β”‚   β”‚   β”‚   β”œβ”€β”€ actix-utils v3.0.0 (*)
β”‚   β”‚   β”‚   β”œβ”€β”€ futures-core v0.3.21
β”‚   β”‚   β”‚   β”œβ”€β”€ futures-util v0.3.21 (*)
β”‚   β”‚   β”‚   β”œβ”€β”€ mio v0.8.3 (*)
β”‚   β”‚   β”‚   β”œβ”€β”€ num_cpus v1.13.1 (*)
β”‚   β”‚   β”‚   β”œβ”€β”€ socket2 v0.4.5 (*)
β”‚   β”‚   β”‚   β”œβ”€β”€ tokio v1.18.2 (*)
β”‚   β”‚   β”‚   └── tracing v0.1.34 (*)
β”‚   β”‚   β”œβ”€β”€ actix-service v2.0.2 (*)
β”‚   β”‚   β”œβ”€β”€ actix-utils v3.0.0 (*)
β”‚   β”‚   β”œβ”€β”€ actix-web-codegen v4.0.0 (proc-macro)
β”‚   β”‚   β”‚   β”œβ”€β”€ actix-router v0.5.0 (*)
β”‚   β”‚   β”‚   β”œβ”€β”€ proc-macro2 v1.0.38 (*)
β”‚   β”‚   β”‚   β”œβ”€β”€ quote v1.0.18 (*)
β”‚   β”‚   β”‚   └── syn v1.0.92 (*)
β”‚   β”‚   β”œβ”€β”€ ahash v0.7.6 (*)
β”‚   β”‚   β”œβ”€β”€ bytes v1.1.0
β”‚   β”‚   β”œβ”€β”€ bytestring v1.0.0 (*)
β”‚   β”‚   β”œβ”€β”€ cfg-if v1.0.0
β”‚   β”‚   β”œβ”€β”€ cookie v0.16.0
β”‚   β”‚   β”‚   β”œβ”€β”€ percent-encoding v2.1.0
β”‚   β”‚   β”‚   └── time v0.3.9
β”‚   β”‚   β”‚       β”œβ”€β”€ itoa v1.0.1
β”‚   β”‚   β”‚       β”œβ”€β”€ libc v0.2.125
β”‚   β”‚   β”‚       β”œβ”€β”€ num_threads v0.1.6
β”‚   β”‚   β”‚       β”‚   └── libc v0.2.125
β”‚   β”‚   β”‚       └── time-macros v0.2.4 (proc-macro)
β”‚   β”‚   β”‚   [build-dependencies]
β”‚   β”‚   β”‚   └── version_check v0.9.4
β”‚   β”‚   β”œβ”€β”€ derive_more v0.99.17 (proc-macro) (*)
β”‚   β”‚   β”œβ”€β”€ encoding_rs v0.8.31 (*)
β”‚   β”‚   β”œβ”€β”€ futures-core v0.3.21
β”‚   β”‚   β”œβ”€β”€ futures-util v0.3.21 (*)
β”‚   β”‚   β”œβ”€β”€ itoa v1.0.1
β”‚   β”‚   β”œβ”€β”€ language-tags v0.3.2
β”‚   β”‚   β”œβ”€β”€ log v0.4.17 (*)
β”‚   β”‚   β”œβ”€β”€ mime v0.3.16
β”‚   β”‚   β”œβ”€β”€ once_cell v1.10.0
β”‚   β”‚   β”œβ”€β”€ pin-project-lite v0.2.9
β”‚   β”‚   β”œβ”€β”€ regex v1.5.5 (*)
β”‚   β”‚   β”œβ”€β”€ serde v1.0.137
β”‚   β”‚   β”œβ”€β”€ serde_json v1.0.81
β”‚   β”‚   β”‚   β”œβ”€β”€ itoa v1.0.1
β”‚   β”‚   β”‚   β”œβ”€β”€ ryu v1.0.9
β”‚   β”‚   β”‚   └── serde v1.0.137
β”‚   β”‚   β”œβ”€β”€ serde_urlencoded v0.7.1
β”‚   β”‚   β”‚   β”œβ”€β”€ form_urlencoded v1.0.1
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ matches v0.1.9
β”‚   β”‚   β”‚   β”‚   └── percent-encoding v2.1.0
β”‚   β”‚   β”‚   β”œβ”€β”€ itoa v1.0.1
β”‚   β”‚   β”‚   β”œβ”€β”€ ryu v1.0.9
β”‚   β”‚   β”‚   └── serde v1.0.137
β”‚   β”‚   β”œβ”€β”€ smallvec v1.8.0
β”‚   β”‚   β”œβ”€β”€ socket2 v0.4.5 (*)
β”‚   β”‚   β”œβ”€β”€ time v0.3.9 (*)
β”‚   β”‚   └── url v2.2.2
β”‚   β”‚       β”œβ”€β”€ form_urlencoded v1.0.1 (*)
β”‚   β”‚       β”œβ”€β”€ idna v0.2.3
β”‚   β”‚       β”‚   β”œβ”€β”€ matches v0.1.9
β”‚   β”‚       β”‚   β”œβ”€β”€ unicode-bidi v0.3.8
β”‚   β”‚       β”‚   └── unicode-normalization v0.1.19
β”‚   β”‚       β”‚       └── tinyvec v1.6.0
β”‚   β”‚       β”‚           └── tinyvec_macros v0.1.0
β”‚   β”‚       β”œβ”€β”€ matches v0.1.9
β”‚   β”‚       └── percent-encoding v2.1.0
β”‚   β”œβ”€β”€ askama_escape v0.10.3
β”‚   β”œβ”€β”€ bitflags v1.3.2
β”‚   β”œβ”€β”€ bytes v1.1.0
β”‚   β”œβ”€β”€ derive_more v0.99.17 (proc-macro) (*)
β”‚   β”œβ”€β”€ futures-core v0.3.21
β”‚   β”œβ”€β”€ http-range v0.1.5
β”‚   β”œβ”€β”€ log v0.4.17 (*)
β”‚   β”œβ”€β”€ mime v0.3.16
β”‚   β”œβ”€β”€ mime_guess v2.0.4
β”‚   β”‚   β”œβ”€β”€ mime v0.3.16
β”‚   β”‚   └── unicase v2.6.0
β”‚   β”‚       [build-dependencies]
β”‚   β”‚       └── version_check v0.9.4
β”‚   β”‚   [build-dependencies]
β”‚   β”‚   └── unicase v2.6.0 (*)
β”‚   β”œβ”€β”€ percent-encoding v2.1.0
β”‚   └── pin-project-lite v0.2.9
β”œβ”€β”€ actix-http v3.0.4 (*)
β”œβ”€β”€ actix-web v4.0.1 (*)
β”œβ”€β”€ actix-web-actors v4.1.0
β”‚   β”œβ”€β”€ actix v0.13.0 (*)
β”‚   β”œβ”€β”€ actix-codec v0.5.0 (*)
β”‚   β”œβ”€β”€ actix-http v3.0.4 (*)
β”‚   β”œβ”€β”€ actix-web v4.0.1 (*)
β”‚   β”œβ”€β”€ bytes v1.1.0
β”‚   β”œβ”€β”€ bytestring v1.0.0 (*)
β”‚   β”œβ”€β”€ futures-core v0.3.21
β”‚   β”œβ”€β”€ pin-project-lite v0.2.9
β”‚   └── tokio v1.18.2 (*)
β”œβ”€β”€ anyhow v1.0.57
β”œβ”€β”€ dashmap v4.0.2 (https://github.com/quake/dashmap?branch=parking_lot#c964e5c2)
β”‚   β”œβ”€β”€ cfg-if v1.0.0
β”‚   β”œβ”€β”€ num_cpus v1.13.1 (*)
β”‚   └── parking_lot v0.11.2
β”‚       β”œβ”€β”€ instant v0.1.12
β”‚       β”‚   └── cfg-if v1.0.0
β”‚       β”œβ”€β”€ lock_api v0.4.7 (*)
β”‚       └── parking_lot_core v0.8.5
β”‚           β”œβ”€β”€ cfg-if v1.0.0
β”‚           β”œβ”€β”€ instant v0.1.12 (*)
β”‚           β”œβ”€β”€ libc v0.2.125
β”‚           └── smallvec v1.8.0
β”œβ”€β”€ futures v0.3.21
β”‚   β”œβ”€β”€ futures-channel v0.3.21 (*)
β”‚   β”œβ”€β”€ futures-core v0.3.21
β”‚   β”œβ”€β”€ futures-executor v0.3.21
β”‚   β”‚   β”œβ”€β”€ futures-core v0.3.21
β”‚   β”‚   β”œβ”€β”€ futures-task v0.3.21
β”‚   β”‚   └── futures-util v0.3.21 (*)
β”‚   β”œβ”€β”€ futures-io v0.3.21
β”‚   β”œβ”€β”€ futures-sink v0.3.21
β”‚   β”œβ”€β”€ futures-task v0.3.21
β”‚   └── futures-util v0.3.21 (*)
β”œβ”€β”€ futures-util v0.3.21 (*)
β”œβ”€β”€ matchit v0.4.6
β”œβ”€β”€ pyo3 v0.14.5
β”‚   β”œβ”€β”€ cfg-if v1.0.0
β”‚   β”œβ”€β”€ indoc v0.3.6
β”‚   β”‚   β”œβ”€β”€ indoc-impl v0.3.6 (proc-macro)
β”‚   β”‚   β”‚   β”œβ”€β”€ proc-macro-hack v0.5.19 (proc-macro)
β”‚   β”‚   β”‚   β”œβ”€β”€ proc-macro2 v1.0.38 (*)
β”‚   β”‚   β”‚   β”œβ”€β”€ quote v1.0.18 (*)
β”‚   β”‚   β”‚   β”œβ”€β”€ syn v1.0.92 (*)
β”‚   β”‚   β”‚   └── unindent v0.1.9
β”‚   β”‚   └── proc-macro-hack v0.5.19 (proc-macro)
β”‚   β”œβ”€β”€ libc v0.2.125
β”‚   β”œβ”€β”€ parking_lot v0.11.2 (*)
β”‚   β”œβ”€β”€ paste v0.1.18
β”‚   β”‚   β”œβ”€β”€ paste-impl v0.1.18 (proc-macro)
β”‚   β”‚   β”‚   └── proc-macro-hack v0.5.19 (proc-macro)
β”‚   β”‚   └── proc-macro-hack v0.5.19 (proc-macro)
β”‚   β”œβ”€β”€ pyo3-macros v0.14.5 (proc-macro)
β”‚   β”‚   β”œβ”€β”€ pyo3-macros-backend v0.14.5
β”‚   β”‚   β”‚   β”œβ”€β”€ proc-macro2 v1.0.38 (*)
β”‚   β”‚   β”‚   β”œβ”€β”€ pyo3-build-config v0.14.5
β”‚   β”‚   β”‚   β”‚   └── once_cell v1.10.0
β”‚   β”‚   β”‚   β”œβ”€β”€ quote v1.0.18 (*)
β”‚   β”‚   β”‚   └── syn v1.0.92 (*)
β”‚   β”‚   β”œβ”€β”€ quote v1.0.18 (*)
β”‚   β”‚   └── syn v1.0.92 (*)
β”‚   └── unindent v0.1.9
β”‚   [build-dependencies]
β”‚   └── pyo3-build-config v0.14.5 (*)
β”œβ”€β”€ pyo3-asyncio v0.14.1
β”‚   β”œβ”€β”€ futures v0.3.21 (*)
β”‚   β”œβ”€β”€ inventory v0.1.11
β”‚   β”‚   β”œβ”€β”€ ctor v0.1.22 (proc-macro)
β”‚   β”‚   β”‚   β”œβ”€β”€ quote v1.0.18 (*)
β”‚   β”‚   β”‚   └── syn v1.0.92 (*)
β”‚   β”‚   β”œβ”€β”€ ghost v0.1.4 (proc-macro)
β”‚   β”‚   β”‚   β”œβ”€β”€ proc-macro2 v1.0.38 (*)
β”‚   β”‚   β”‚   β”œβ”€β”€ quote v1.0.18 (*)
β”‚   β”‚   β”‚   └── syn v1.0.92 (*)
β”‚   β”‚   └── inventory-impl v0.1.11 (proc-macro)
β”‚   β”‚       β”œβ”€β”€ proc-macro2 v1.0.38 (*)
β”‚   β”‚       β”œβ”€β”€ quote v1.0.18 (*)
β”‚   β”‚       └── syn v1.0.92 (*)
β”‚   β”œβ”€β”€ once_cell v1.10.0
β”‚   β”œβ”€β”€ pin-project-lite v0.2.9
β”‚   β”œβ”€β”€ pyo3 v0.14.5 (*)
β”‚   β”œβ”€β”€ pyo3-asyncio-macros v0.14.1 (proc-macro)
β”‚   β”‚   β”œβ”€β”€ proc-macro2 v1.0.38 (*)
β”‚   β”‚   β”œβ”€β”€ quote v1.0.18 (*)
β”‚   β”‚   └── syn v1.0.92 (*)
β”‚   └── tokio v1.18.2 (*)
β”œβ”€β”€ pyo3-log v0.6.0
β”‚   β”œβ”€β”€ arc-swap v1.5.0
β”‚   β”œβ”€β”€ log v0.4.17 (*)
β”‚   └── pyo3 v0.16.5
β”‚       β”œβ”€β”€ cfg-if v1.0.0
β”‚       β”œβ”€β”€ indoc v1.0.6 (proc-macro)
β”‚       β”œβ”€β”€ libc v0.2.125
β”‚       β”œβ”€β”€ parking_lot v0.12.0 (*)
β”‚       β”œβ”€β”€ pyo3-ffi v0.16.5
β”‚       β”‚   └── libc v0.2.125
β”‚       β”‚   [build-dependencies]
β”‚       β”‚   └── pyo3-build-config v0.16.5
β”‚       β”‚       β”œβ”€β”€ once_cell v1.10.0
β”‚       β”‚       └── target-lexicon v0.12.4
β”‚       β”‚       [build-dependencies]
β”‚       β”‚       └── target-lexicon v0.12.4
β”‚       β”œβ”€β”€ pyo3-macros v0.16.5 (proc-macro)
β”‚       β”‚   β”œβ”€β”€ proc-macro2 v1.0.38 (*)
β”‚       β”‚   β”œβ”€β”€ pyo3-macros-backend v0.16.5
β”‚       β”‚   β”‚   β”œβ”€β”€ proc-macro2 v1.0.38 (*)
β”‚       β”‚   β”‚   β”œβ”€β”€ quote v1.0.18 (*)
β”‚       β”‚   β”‚   └── syn v1.0.92 (*)
β”‚       β”‚   β”œβ”€β”€ quote v1.0.18 (*)
β”‚       β”‚   └── syn v1.0.92 (*)
β”‚       └── unindent v0.1.9
β”‚       [build-dependencies]
β”‚       └── pyo3-build-config v0.16.5 (*)
β”œβ”€β”€ serde v1.0.137
β”œβ”€β”€ serde_json v1.0.81 (*)
β”œβ”€β”€ socket2 v0.4.5 (*)
β”œβ”€β”€ tokio v1.18.2 (*)
└── uuid v0.8.2
    β”œβ”€β”€ getrandom v0.2.6 (*)
    └── serde v1.0.137

Thanks. Yes, this contains both versions of pyo3. I'd say that's never going to work, I'll close this bug report β€’ this is not exactly pyo3-log's fault, this is how version resolution works for Rust.