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

tips: solve error Segmentation fault (core dumped) #33

Open
IceCodeNew opened this issue Feb 7, 2023 · 1 comment
Open

tips: solve error Segmentation fault (core dumped) #33

IceCodeNew opened this issue Feb 7, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@IceCodeNew
Copy link
Contributor

IceCodeNew commented Feb 7, 2023

A probable cause for the Segmentation fault (core dumped) error is that the UPX-compressed binary failed to self-unpacked and run on the current OS. This case has been caught on the Rocky Linux 9.1 OS.
(However, I can not reproduce this problem inside the docker image rockylinux:9.1)

People who ran into the same condition may try downloading the binary of UPX on the GitHub releases page, then issue the command upx -d ./gg to revert the compression.

Here is an example:

[root@xxx git]# ./test-bin
Segmentation fault (core dumped)
[root@xxx git]# upx -d ./test-bin
                       Ultimate Packer for eXecutables
                          Copyright (C) 1996 - 2023
UPX 4.0.2       Markus Oberhumer, Laszlo Molnar & John Reiser   Jan 30th 2023

        File size         Ratio      Format      Name
   --------------------   ------   -----------   -----------
[WARNING] bad b_info at 0x55c58c

[WARNING] ... recovery at 0x55c588

  14471678 <-   5621256   38.84%   linux/amd64   test-bin

Unpacked 1 file.
[root@xxx git]# ll
total 14136
drwxr-xr-x. 13 root root     4096 Feb  7 16:08 gg
-rwxr-xr-x.  1 root root 14467072 Feb  7 16:14 test-bin
[root@xxx git]# ./test-bin --help
go-graft is a portable tool to redirect the traffic of a given
program to your modern proxy without installing any other programs.

Usage:
  gg [flags] [command [argument ...]]
  gg [command]

Available Commands:
  completion  generate the autocompletion script for the specified shell
  config      Get and set persistent global options
  help        Help about any command

Flags:
  -h, --help                  help for gg
  -n, --node string           node share-link of your modern proxy
      --noudp                 do not redirect UDP traffic, even though the proxy server supports
      --select                manually select the node to connect from the subscription
  -s, --subscription string   subscription-link of your modern proxy
      --testnode string       test the connectivity before connecting to the node (default "true")
  -v, --verbose count         verbose (-v, or -vv)
      --version               version for gg

Use "gg [command] --help" for more information about a command.
@mzz2017 mzz2017 added the documentation Improvements or additions to documentation label Feb 10, 2023
@mzz2017 mzz2017 pinned this issue Feb 10, 2023
@abolast
Copy link

abolast commented Apr 27, 2023

Thank you, I am also using Rocky. Congratulations on successfully running gg.
sudo dnf install upx
sudo upx -d $(which gg)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants