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

dcd-client brings down server when querying for documentation of modules #772

Open
nordlow opened this issue Feb 12, 2024 · 0 comments
Open

Comments

@nordlow
Copy link
Contributor

nordlow commented Feb 12, 2024

Create a file foo.d containing

//
module foo;

Start server via

dcd-client -p 9166

Query for docs at offset 0 via

dcd-client -p 9166 -c 0 -d foo.d

gives

object.Exception@common/src/dcd/common/messages.d(248): Server closed the connection, 0 bytes received
----------------
??:? [0x557f0cd3844e]
??:? [0x557f0cd380c2]
??:? [0x557f0cd430be]
??:? [0x557f0cd424ff]
common/src/dcd/common/messages.d [0x557f0cc35e36]
src/dcd/client/client.d:250 [0x557f0cc13f41]
src/dcd/client/client.d:41 [0x557f0cc134e5]
??:? [0x557f0cd421dc]
??:? [0x557f0cd420d6]
??:? [0x557f0cd41f2c]
??:? [0x7fdf97629d8f]
??:? __libc_start_main [0x7fdf97629e3f]
??:? [0x557f0cc13414]

Querying a second via

dcd-client -p 9166 -c 0 -d foo.d

gives

std.socket.SocketOSException@std/socket.d(2873): Unable to connect socket: Connection refused
----------------
??:? [0x5631f643944e]
??:? [0x5631f64390c2]
??:? [0x5631f64440be]
??:? [0x5631f64434ff]
??:? [0x5631f6411132]
src/dcd/client/client.d:352 [0x5631f631562f]
src/dcd/client/client.d:245 [0x5631f6314ed7]
src/dcd/client/client.d:41 [0x5631f63144e5]
??:? [0x5631f64431dc]
??:? [0x5631f64430d6]
??:? [0x5631f6442f2c]
??:? [0x7f4ca6229d8f]
??:? __libc_start_main [0x7f4ca6229e3f]
??:? [0x5631f6314414]

.

Output from dcd-server when run via gdb:

gdb --args dcd-server -p 9167 
Reading symbols from dcd-server...
(gdb) r
Starting program: /home/per/.local/dlang/linux/bin64/dcd-server -p 9167
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
2024-02-12T20:38:30.902 [info] main.d:146:runServer Starting up...
2024-02-12T20:38:30.902 [info] main.d:159:runServer Listening on port 9167
2024-02-12T20:38:30.902 [info] main.d:197:runServer Import directories:
    
2024-02-12T20:38:30.902 [info] main.d:203:runServer 0 symbols cached.
2024-02-12T20:38:30.902 [info] main.d:204:runServer Startup completed in 55 μs and 7 hnsecs
2024-02-12T20:38:32.911 [info] main.d:341:runServer Getting doc comment
2024-02-12T20:38:32.912 [warning] first.d:378:visit Could not locate object.d or object.di
2024-02-12T20:38:32.912 [info] main.d:258:runServer Request processed in 960 μs and 3 hnsecs
2024-02-12T20:38:32.912 [info] main.d:187:runServer Shutting down sockets...
2024-02-12T20:38:32.912 [info] main.d:192:runServer Sockets shut down.
core.exception.ArrayIndexError@/home/per/.local/ldc2-1.36.0-linux-x86_64/bin/../import/std/range/primitives.d(2505): index [0] is out of bounds for array of length 0
----------------
??:? [0x5555557db08e]
??:? [0x5555557dad02]
??:? [0x5555557e5d0e]
??:? [0x5555557e514f]
??:? [0x5555557c519d]
??:? [0x5555557c549d]
/home/per/.local/ldc2-1.36.0-linux-x86_64/bin/../import/std/range/primitives.d:2505 [0x5555556702ce]
src/dcd/server/autocomplete/doc.d:50 [0x555555668fb5]
src/dcd/server/main.d:342 [0x555555668ede]
src/dcd/server/main.d:367 [0x555555668323]
/home/per/.local/ldc2-1.36.0-linux-x86_64/bin/../import/std/logger/core.d [0x555555666af8]
src/dcd/server/main.d:63 [0x555555664725]
??:? [0x5555557e4e2c]
??:? [0x5555557e4d26]
??:? [0x5555557e4b7c]
??:? [0x7ffff7c29d8f]
??:? __libc_start_main [0x7ffff7c29e3f]
??:? [0x555555662734]

.

@nordlow nordlow changed the title dcd-client connects when dcd-client connects when querying for documentation of modules Feb 12, 2024
@nordlow nordlow changed the title dcd-client connects when querying for documentation of modules dcd-client brings down server when querying for documentation of modules Feb 12, 2024
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