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

[C++] segmentation fault in s_aws_logger_redirect_get_log_level #38788

Open
Matan2t opened this issue Nov 19, 2023 · 2 comments
Open

[C++] segmentation fault in s_aws_logger_redirect_get_log_level #38788

Matan2t opened this issue Nov 19, 2023 · 2 comments

Comments

@Matan2t
Copy link

Matan2t commented Nov 19, 2023

Hello,
I got a segmentation fault in Aws::Utils::Logging::s_aws_logger_redirect_get_log_level which called from libaws-cpp-sdk-core.so file

> cat debug.py
import boto3
import pyarrow.parquet as pq

> pytest debug.py
=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.10.13, pytest-7.4.3, pluggy-1.3.0
rootdir: /homes/matant/work/objd/py/test_env
configfile: pytest.ini
plugins: anyio-4.0.0
collected 0 items

============================================================================================== no tests ran in 0.76s ==============================================================================================
Segmentation fault (core dumped)

Expected:
pytest will finish to run without any segmentation fault

> gdb python core
GNU gdb (Ubuntu 8.1-0ubuntu3.2) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python...done.

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/homes/matant/mambaforge/envs/test_env/bin/python3.10 /homes/mat'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007ffff1aca4cc in Aws::Utils::Logging::s_aws_logger_redirect_get_log_level(aws_logger*, unsigned int) ()
from /homes/matant/mambaforge/envs/test_env/lib/python3.10/site-packages/pyarrow/../../.././libaws-cpp-sdk-core.so
[Current thread is 1 (Thread 0x7fffa6ffd700 (LWP 12761))]
(gdb) bt
#0 0x00007ffff1aca4cc in Aws::Utils::Logging::s_aws_logger_redirect_get_log_level(aws_logger*, unsigned int) ()
from /homes/matant/mambaforge/envs/test_env/lib/python3.10/site-packages/pyarrow/../../.././libaws-cpp-sdk-core.so
#1 0x00007ffff50eb843 in s_destroy () from /homes/matant/mambaforge/envs/test_env/lib/python3.10/site-packages/../../libaws-c-io.so.1.0.0
#2 0x00007ffff50e57e6 in s_aws_event_loop_group_shutdown_sync () from /homes/matant/mambaforge/envs/test_env/lib/python3.10/site-packages/../../libaws-c-io.so.1.0.0
#3 0x00007ffff50e5839 in s_event_loop_destroy_async_thread_fn () from /homes/matant/mambaforge/envs/test_env/lib/python3.10/site-packages/../../libaws-c-io.so.1.0.0
#4 0x00007ffff50a1b09 in thread_fn () from /homes/matant/mambaforge/envs/test_env/lib/python3.10/site-packages/../../libaws-c-common.so.1
#5 0x00007ffff7bbb6db in start_thread (arg=0x7fffa6ffd700) at pthread_create.c:463
#6 0x00007ffff713f61f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

env:
python 3.10.13
pytest 7.4.3
boto3 1.28.54
pyarrow 10.0.1
libarrow 10.0.1
aws-c-auth 0.7.6
aws-c-cal 0.6.9
aws-c-common 0.9.8
aws-c-compression 0.2.17
aws-c-event-stream 0.3.2
aws-c-http 0.7.14
aws-c-io 0.13.35
aws-c-mqtt 0.9.9
aws-c-s3 0.3.24
aws-c-sdkutils 0.1.12
aws-checksums 0.1.17
aws-crt-cpp 0.24.7
aws-error-utils 2.7.0
aws-sdk-cpp 1.11.182
awscli 2.13.35
awscrt 0.19.12
awswrangler 2.20.1
requests-aws4auth 1.1.1

Component(s)

C++

@Matan2t
Copy link
Author

Matan2t commented Nov 20, 2023

Does the function Aws::Utils::Logging::s_aws_logger_redirect_get_log_level(aws_logger*, unsigned int) from libaws-cpp-sdk-core.so is part of the open source we can see its implementation?
Can I get so file with debug symbols to root-case the problem?

@batterseapower
Copy link

This is perhaps related to aws/aws-sdk-cpp#2681, which was seemingly fixed in version 1.11.274. I'm seeing this with pyarrow 7 and aws-sdk-cpp 1.8.186.

@kou kou changed the title segmentation fault in s_aws_logger_redirect_get_log_level [C++] segmentation fault in s_aws_logger_redirect_get_log_level Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants