Project

General

Profile

Actions

Bug #12255

closed

proc_get_fdinfo() crash if fdinfo file grows

Added by Andy Fiddaman almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

The recently introduced proc_get_fdinfo() function does not rewind the file pointer when it detects that it needs to re-read with a bigger buffer, usually resulting in a crash. This happens due to a race between fetching the file size and reading it, when the size can change.

This never showed up in testing but some subsequent work involved blowing up the race window and that exposed the problem.


Related issues

Related to illumos gate - Feature #12046: Provide /proc/<PID>/fdinfo/ClosedAndy Fiddaman

Actions
Actions

Also available in: Atom PDF