InterNetNews / inn

INN (InterNetNews) Usenet server
https://www.isc.org/othersoftware/#INN
Other
68 stars 12 forks source link

innd unexpectedly closes file descriptors (FD_SETSIZE exceeded) #273

Closed Julien-Elie closed 1 year ago

Julien-Elie commented 1 year ago

On June 30th 2023, Jesse Rehmer reported in news.software.nntp the following errors:

Jun 29 19:13:43 gatekeeper innd[90655]: free:-1 39 free but was in SMASK
Jun 29 19:13:43 gatekeeper innd[90655]: SERVER cant select: Bad file
descriptor
Jun 29 22:51:18 gatekeeper innd[16269]: CNFS: lseek failed for 'TEXT' offset
0x7c4d40000: Illegal seek
Jun 29 22:51:18 gatekeeper innd[16269]: SERVER cant store article: lseek
failed
Jun 29 22:51:18 gatekeeper innd[16269]: SERVER throttled Illegal seek writing
SMstore file -- throttling

It appears that file descriptors larger than 1024 are used by innd, which corrupts data in memory (fd_set stores information for a maximum of 1024 file descriptors, and calling FD_SET on the fd_set for reading sockets modifies the adjacent fd_set in memory for sleeping sockets).

Several changes should be done: