cs01 / cs01/gdbgui

Hardcoded 10 seconds gdb timeout is too low for some applications

Open
#486 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
10.4k
Forks
521
PR merge metrics
No merged PRs in 30d

Description

**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
https://github.com/cs01/gdbgui/blob/be9521751f747856a21814f5ce71ec63d3740045/gdbgui/src/js/GdbApi.tsx#L263

**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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.