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 by emitrax, 10 years ago

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

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

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 by scottmc, 10 years ago

Milestone: R1/alpha1R1/alpha2

comment:4 by bonefish, 9 years ago

Keywords: vfs fd added

#4473 could be caused by this.

comment:5 by bonefish, 9 years ago

#5123 could be caused by this.

comment:6 by scottmc, 8 years ago

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

sliding this one out to R1/beta1.

comment:7 by richienyhus, 5 years ago

Have there been any improvements in the interim?

Could this be moved to beta2 ?

comment:8 by axeld, 4 years ago

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

comment:9 by ttcoder, 4 years ago

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 by scottmc, 3 years ago

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 by axeld, 2 years ago

Resolution: fixed
Status: newclosed

Seems fixed.

Note: See TracTickets for help on using tickets.