Opened 10 years ago

Closed 2 years ago

#4157 closed bug (fixed)

File Descriptor Disconnect Handling Broken

Reported by: bonefish Owned by: axeld
Priority: high Milestone: R1/beta1
Component: System/Kernel Version: R1/Development
Keywords: vfs fd Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

The disconnect handling for file descriptors has several issues:

  • Disconnected file_descriptors are leaked (put_fd() sets the ref_count to -1).
  • There are race conditions, particularly in put_fd().
  • Disconnected file descriptors can be dup()ed and copied on fork(), messing with the mangled ref_count.

Change History (11)

comment:1 Changed 10 years ago by emitrax

Could this be the cause of what I've experienced in bug #2381 ?

comment:2 in reply to:  1 Changed 10 years ago by bonefish

Replying to emitrax:

Could this be the cause of what I've experienced in bug #2381 ?

#2381 has been closed as user error (leaking FDs). It doesn't have anything to do with this ticket.

comment:3 Changed 10 years ago by scottmc

Milestone: R1/alpha1R1/alpha2

comment:4 Changed 9 years ago by bonefish

Keywords: vfs fd added

#4473 could be caused by this.

comment:5 Changed 9 years ago by bonefish

#5123 could be caused by this.

comment:6 Changed 8 years ago by scottmc

Milestone: R1/alpha3R1/beta1
Version: R1/pre-alpha1R1/Development

sliding this one out to R1/beta1.

comment:7 Changed 4 years ago by richienyhus

Have there been any improvements in the interim?

Could this be moved to beta2 ?

comment:8 Changed 4 years ago by axeld

Should be fixed with hrev49631. I'd feel better closing this bug if someone else could review the changes, though.

comment:9 Changed 3 years ago by ttcoder

FWIW... We were seeing this with increasing frequency back when our reference hrev was 49137 (up to once a week towards the end!), but we didn't get a single instance of this since switching over to 49856.

comment:10 Changed 3 years ago by scottmc

Sounds like this one might be fixed but should be one or two more reviews look it over and determine if we can close this one? @bonefish @mmlr can either of you weigh in on this one?

comment:11 Changed 2 years ago by axeld

Resolution: fixed
Status: newclosed

Seems fixed.

Note: See TracTickets for help on using tickets.