ish-app / ish-app/ish

`dig` does not work

Open
#1,783 5 comments 5 reactions 0 assignees View on GitHub
unconfirmed
Dominant language
C
Stars
20.5k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

Hi

I have installed iSH and found that `dig` does not work. I installed `dig` as follows.

```shell
sinope:~# apk add bind-tools
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86/APKINDEX.tar.gz
(1/13) Installing fstrm (0.6.1-r0)
(2/13) Installing krb5-conf (1.0-r2)
(3/13) Installing libcom_err (1.46.2-r0)
(4/13) Installing keyutils-libs (1.6.3-r0)
(5/13) Installing libverto (0.3.2-r0)
(6/13) Installing krb5-libs (1.18.5-r0)
(7/13) Installing json-c (0.15-r1)
(8/13) Installing protobuf-c (1.3.3-r6)
(9/13) Installing libuv (1.41.0-r0)
(10/13) Installing xz-libs (5.2.5-r1)
(11/13) Installing libxml2 (2.9.13-r0)
(12/13) Installing bind-libs (9.16.27-r0)
(13/13) Installing bind-tools (9.16.27-r0)
Executing busybox-1.33.1-r6.trigger
OK: 13 MiB in 27 packages
```

However, as soon as I use `dig` the following error appears.

```shell
sinope:~# dig +short github.com
socket.c:2316: setsockopt(20, SO_TIMESTAMP) failed: Invalid argument
socket.c:2331: setsockopt(20, IPV6_RECVPKTINFO) failed: Invalid argument
socket.c:2397: setsockopt(20, IPV6_RECVTCLASS) failed: Invalid argument
140.82.121.3
```

After that, it is no longer possible to return to the shell. Output of `dmesg`:

```shell
sinope:~# dmesg
7 stub syscall 383
7 stub syscall 383
9 stub syscall 383
9 stub syscall 383
9 stub syscall 383
9 stub syscall 383
10 stub syscall 383
10 stub syscall 383
10 stub syscall 383
10 stub syscall 383
8 stub syscall 383
8 stub syscall 383
8 stub syscall 383
8 stub syscall 383
```

This also happens when I uninstall and reinstall the app, so it is reproducible for me. Below is a screen recording that shows the same as described above.

https://user-images.githubusercontent.com/4533780/164978212-b509f34c-f31f-40d9-978e-1a4387678dce.mp4

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue by installing bind-tools and running `dig +short github.com`, then compare the socket.c errors with the `dmesg` output showing stub syscall 383. Done means dig completes without making the shell unusable and the reported socket errors and stub syscall messages no longer occur.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
networking, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.