Opened 15 years ago

Closed 8 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:
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, 15 years ago

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

in reply to:  1 comment:2 by bonefish, 15 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, 15 years ago

Milestone: R1/alpha1R1/alpha2

comment:4 by bonefish, 15 years ago

Keywords: vfs fd added

#4473 could be caused by this.

comment:5 by bonefish, 15 years ago

#5123 could be caused by this.

comment:6 by scottmc, 14 years ago

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

sliding this one out to R1/beta1.

comment:7 by richienyhus, 10 years ago

Have there been any improvements in the interim?

Could this be moved to beta2 ?

comment:8 by axeld, 9 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, 9 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, 8 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, 8 years ago

Resolution: fixed
Status: newclosed

Seems fixed.

Note: See TracTickets for help on using tickets.