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

Update glog to support stack trace on arm64 #2074

Closed
DeanIsMe opened this issue May 24, 2021 · 13 comments
Closed

Update glog to support stack trace on arm64 #2074

DeanIsMe opened this issue May 24, 2021 · 13 comments
Assignees
Labels
platform:c++ Issues specific to C++ framework in mediapipe task::all All tasks of MediaPipe type:others issues not falling in bug, perfromance, support, build and install or feature

Comments

@DeanIsMe
Copy link

I'm working with an arm64 processor on Linux.
When a graph aborts due to an error, the stack trace is not printed. E.g.

F20210523 21:24:28.664880 10807 packet.h:750] Packet::Get() failed: Expected a Packet of type: float, but received an empty Packet.
	*** Check failure stack trace: ***
Aborted (core dumped)

Or, if I run google::InstallFailureSignalHandler(); in main(), I get

*** Check failure stack trace: ***
PC: @                0x0 (unknown)
Aborted (core dumped)

After some research, I found that arm64 stack trace is not supported on the glog version used in mediapipe, as indicated here:
google/glog#531
Note that this is the glog version referenced by the mediapipe WORKSPACE file.

arm64 stack trace is now supported in glog, as of version 0.5.0.

Are you able to update the glog dependency to 0.5.0 to enable stack trace on arm64 and hence ease development?

@sgowroji sgowroji self-assigned this May 25, 2021
@sgowroji sgowroji added platform:c++ Issues specific to C++ framework in mediapipe task::all All tasks of MediaPipe stat:awaiting googler Waiting for Google Engineer's Response type:others issues not falling in bug, perfromance, support, build and install or feature labels May 25, 2021
@sgowroji sgowroji assigned hadon and unassigned sgowroji May 25, 2021
@hadon
Copy link

hadon commented Jun 11, 2021

Thanks for investigating the glog versions and limitations. Maybe you can help me to validate MediaPipe with glog version 0.5.0. Can you update the glog version in your mediapipe WORKSPACE file and verify that the newer version works ok and provides stack traces in your environment?

I'm glad to start updating the mediapipe WORKSPACE file in the MediaPipe upstream repository. I believe I will be updating target "com_github_google_glog" as follows:

# v0.5.0, 2021-05-07
http_archive(
    name = "com_github_google_glog",
    sha256 = "62efeb57ff70db9ea2129a16d0f908941e355d09d6d83c9f7b18557c0a7ab59e",
    strip_prefix = "glog-d516278b1cd33cd148e8989aec488b6049a4ca0b",
    urls = ["https://github.com/google/glog/archive/d516278b1cd33cd148e8989aec488b6049a4ca0b.zip"],
)

I will also need to update "com_github_glog_glog_no_gflags" and one patch to it, and have the update tested and reviewed.

@sgowroji
Copy link

Hi @DeanIsMe, Could you please check the above comment. Thanks!

@sgowroji sgowroji added stat:awaiting response Waiting for user response and removed stat:awaiting googler Waiting for Google Engineer's Response labels Jun 14, 2021
@sgowroji
Copy link

Hi @DeanIsMe, Could you please respond to the above comment. Thanks!

@DeanIsMe
Copy link
Author

Sorry for the delay.
About a month ago I updated the glog version in my workspace file to:
http_archive(
name = "com_github_google_glog",
sha256 = "21bc744fb7f2fa701ee8db339ded7dce4f975d0d55837a97be7d46e8382dea5a",
strip_prefix = "glog-0.5.0",
urls = ["https://github.com/google/glog/archive/v0.5.0.zip"],
)
I then had huge problems compiling mediapipe examples. Even after reverting the glog version back to the mediapipe default, my mediapipe build process failed when linking OpenCV libs. I later had issues with the mediapipe examples opening the camera stream (which uses OpenCV).
I ended up spending about a day getting the mediapipe build & run process back to a functional state.

I could try this again and record more useful information about the failures, but I'll need to wait a week or 2 so that I have a free day again >_<

@google-ml-butler
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.

@DeanIsMe
Copy link
Author

I changed the http_archive for com_github_glog_glog in WORKSPACE to the comment above by hadon. When I tried to build a mediapipe project, this is the error that I received:

ERROR: /home/lounge/Lounge-client/Lounge_mediapipe/third_party/BUILD:22:11: no such package '@com_github_glog_glog//': The repository '@com_github_glog_glog' could not be resolved and referenced by '//third_party:glog'
ERROR: Analysis of target '//mediapipe/lounge:lounge_main' failed; build aborted: Analysis failed
INFO: Elapsed time: 3.628s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (4 packages loaded, 5 targets configured)

@google-ml-butler google-ml-butler bot removed stale stat:awaiting response Waiting for user response labels Jun 24, 2021
@sgowroji sgowroji added the stat:awaiting googler Waiting for Google Engineer's Response label Jul 28, 2021
@DkAhmRin
Copy link

I am facing a similar issue as @DeanIsMe

When using mediapipe facemesh in a loop, first a warning about glog:

WARNING: Logging before InitGoogleLogging() is written to STDERR
F20211111 12:28:54.792228 380909056 threadpool_pthread_impl.cc:51] Check failed: res == 0 (35 vs. 0) pthread_create failed
*** Check failure stack trace: ***

@sureshdagooglecom
Copy link

Hi @DeanIsMe ,
Are you still looking for the resolution on this issue.

@sureshdagooglecom sureshdagooglecom added stat:awaiting response Waiting for user response and removed stat:awaiting googler Waiting for Google Engineer's Response labels Sep 23, 2022
@DeanIsMe
Copy link
Author

Hi @sureshdagooglecom, I am not working with mediapipe for now. However, I think stack trace on ARM64 would be valuable to many users.

@google-ml-butler google-ml-butler bot removed the stat:awaiting response Waiting for user response label Sep 23, 2022
@kuaashish kuaashish assigned hadon and unassigned sureshdagooglecom Nov 15, 2022
@kuaashish kuaashish added the stat:awaiting googler Waiting for Google Engineer's Response label Nov 15, 2022
@kuaashish kuaashish assigned kuaashish and unassigned hadon Apr 24, 2023
@kuaashish kuaashish removed the stat:awaiting googler Waiting for Google Engineer's Response label Apr 24, 2023
@kuaashish
Copy link
Collaborator

Hello @DeanIsMe,
We are upgrading the MediaPipe Legacy Solutions to new MediaPipe solutions However, the libraries, documentation, and source code for all the MediaPipe Legacy Solutions will continue to be available in our GitHub repository and through library distribution services, such as Maven and NPM.

You can continue to use those legacy solutions in your applications if you choose. Though, we would request you to check new MediaPipe solutions which can help you more easily build and customize ML solutions for your applications. These new solutions will provide a superset of capabilities available in the legacy solutions.

@kuaashish kuaashish added the stat:awaiting response Waiting for user response label Apr 24, 2023
@github-actions
Copy link

github-actions bot commented May 2, 2023

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

@github-actions github-actions bot added the stale label May 2, 2023
@github-actions
Copy link

This issue was closed due to lack of activity after being marked stale for past 7 days.

@google-ml-butler
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

@kuaashish kuaashish removed stat:awaiting response Waiting for user response stale labels May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:c++ Issues specific to C++ framework in mediapipe task::all All tasks of MediaPipe type:others issues not falling in bug, perfromance, support, build and install or feature
Projects
None yet
Development

No branches or pull requests

6 participants