Many file close fd syscalls

14 views
Skip to first unread message

Justin J

unread,
Jun 23, 2025, 11:07:08 AMJun 23
to DynamoRIO Users
Hi all,

I'm running dynamoRIO in a docker container (`fedora:38`). The run is very simple:
`drrun  --  /usr/sbin/sshd -D -e`, i.e., simply starting an SSH server. However,  this is super slow. And even if the server started, it cannot handle any request because it's so slow that all connections to it are time out.

After checking the logs `drrun -debug  -loglevel 4  -logdir /root  --  /usr/sbin/sshd -D -e`. I found there are numerous syscall of close files (as shown below). Looks these file close calls cause a lot of overhead. Why are there so many file close syscalls? It looks not normal. Thank you for you comments on this issue!
```
...
syscall: close fd 52491920
syscall: close fd 52491921
syscall: close fd 52491922
syscall: close fd 52491923
syscall: close fd 52491924
syscall: close fd 52491925
syscall: close fd 52491926
```

Kai Luk

unread,
Jun 23, 2025, 12:10:41 PMJun 23
to DynamoRIO Users
Are these sockets? 

Could you increase the connection timeout, ConnectTimeout, of the ssh connection to see if it's caused by connection timeout?

Regards,
Kai

Derek Bruening

unread,
Jun 23, 2025, 12:48:54 PMJun 23
to Kai Luk, DynamoRIO Users
Some applications loop over every integer up to the file rlimit and call close on that just to make sure there are no inherited files from the parent process, during their initialization.
Did you run strace on sshd without DR involved?  Presumably you see the same behavior.
You can ask the sshd developers if you want more information about how sshd operates.

--
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dynamorio-use...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dynamorio-users/01a9a3af-2e67-4d99-acc1-2162988972efn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages