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

Hardcoded 10 seconds gdb timeout is too low for some applications #486

Open
pianofab opened this issue May 9, 2024 · 1 comment
Open

Comments

@pianofab
Copy link

pianofab commented May 9, 2024

Describe the bug
Gdbgui has a hardcoded timeout when talking to gdb. See below for the hardcoded value and its location.

To Reproduce
Steps to reproduce the behavior:

  1. Web browser view, attach to process
  2. Click on 'Fetch source files'
  3. Look at middle pane gdbgui output (read-only)
  4. See error "No gdb response received after 10 seconds."
  5. When this happens, the Thread view is lost. Unclear how to regain it / refresh it.

Expected behavior
The timeout is arbitrarily low so it should be configurable.
The hardcoded constant is: const WAIT_TIME_SEC = 10;
See

const WAIT_TIME_SEC = 10;

Screenshots
If applicable, add screenshots to help explain your problem.

Please complete the following information:

  • OS: Windows 10 (browser). CentOS7 (server side)
  • gdbgui version (gdbgui -v): 0.15.2.0
  • gdb version (gdb -v): GNU gdb (GDB) 14.2
  • browser [e.g. chrome, safari]: Microsoft Edge
  • python packages (pip freeze):
pip freeze
argcomplete @ file:///home/conda/feedstock_root/build_artifacts/argcomplete_1713213540864/work
click @ file:///home/conda/feedstock_root/build_artifacts/click_1692311806742/work
colorama @ file:///home/conda/feedstock_root/build_artifacts/colorama_1666700638685/work
packaging @ file:///home/conda/feedstock_root/build_artifacts/packaging_1710075952259/work
pipx @ file:///home/conda/feedstock_root/build_artifacts/pipx_1711751994084/work
platformdirs @ file:///home/conda/feedstock_root/build_artifacts/platformdirs_1713912794367/work
Pygments @ file:///home/conda/feedstock_root/build_artifacts/pygments_1714846767233/work
setuptools==69.5.1
six @ file:///home/conda/feedstock_root/build_artifacts/six_1620240208055/work
tomli @ file:///home/conda/feedstock_root/build_artifacts/tomli_1644342247877/work
userpath @ file:///home/conda/feedstock_root/build_artifacts/userpath_1632758461979/work
wheel==0.43.0

# conda list
# packages in environment at /root/miniforge3/envs/gdbgui:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
argcomplete               3.3.0              pyhd8ed1ab_0    conda-forge
bzip2                     1.0.8                hd590300_5    conda-forge
ca-certificates           2024.2.2             hbcca054_0    conda-forge
click                     8.1.7           unix_pyh707e725_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
gdb                       14.2            py312heaf2220_0    conda-forge
gmp                       6.3.0                h59595ed_1    conda-forge
ld_impl_linux-64          2.40                 h55db66e_0    conda-forge
libexpat                  2.6.2                h59595ed_0    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-ng                 13.2.0               h77fa898_7    conda-forge
libgfortran-ng            13.2.0               h69a702a_7    conda-forge
libgfortran5              13.2.0               hca663fb_7    conda-forge
libgomp                   13.2.0               h77fa898_7    conda-forge
libnsl                    2.0.1                hd590300_0    conda-forge
libsqlite                 3.45.3               h2797004_0    conda-forge
libstdcxx-ng              13.2.0               hc0a3c3a_7    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libxcrypt                 4.4.36               hd590300_1    conda-forge
libzlib                   1.2.13               hd590300_5    conda-forge
mpfr                      4.2.1                h9458935_1    conda-forge
ncurses                   6.4.20240210         h59595ed_0    conda-forge
openssl                   3.3.0                hd590300_0    conda-forge
packaging                 24.0               pyhd8ed1ab_0    conda-forge
pip                       24.0               pyhd8ed1ab_0    conda-forge
pipx                      1.5.0              pyhd8ed1ab_0    conda-forge
platformdirs              4.2.1              pyhd8ed1ab_0    conda-forge
pygments                  2.18.0             pyhd8ed1ab_0    conda-forge
python                    3.12.3          hab00c5b_0_cpython    conda-forge
python_abi                3.12                    4_cp312    conda-forge
readline                  8.2                  h8228510_1    conda-forge
setuptools                69.5.1             pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
tk                        8.6.13          noxft_h4845f30_101    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
tzdata                    2024a                h0c530f3_0    conda-forge
userpath                  1.7.0              pyhd8ed1ab_0    conda-forge
wheel                     0.43.0             pyhd8ed1ab_1    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
zlib                      1.2.13               hd590300_5    conda-forge

Additional context
Installed pipx in a conda environment (miniforge). Installed gdbgui via pipx as recommended.
I have a remote browser under a VPN which may be slower than local; however it should be a supported use case.
Everything else seems to work fine so far.

@pianofab
Copy link
Author

pianofab commented May 9, 2024

To work around this issue on a live system with gdbgui installed via pipx, we will need to patch the main.js produced by the compilation of the source file above. (Use pipx list to find the location.)
In my system, it is found under:

/root/.local/share/pipx/venvs/gdbgui/lib/python3.12/site-packages/gdbgui/static/js/main.js

Search for the string:

GDBGUI_OUTPUT))},1e4

Replacing the 1e4 with 3e4 (30 seconds) worked for me.

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

No branches or pull requests

1 participant