Date: Fri, 04 Jul 2014 00:50:59 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 191593] New: [fcntl] F_SETFL returns EDEADLK when it shouldn't - only F_SETFLW and waiting should return EDEADLK Message-ID: <bug-191593-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191593 Bug ID: 191593 Summary: [fcntl] F_SETFL returns EDEADLK when it shouldn't - only F_SETFLW and waiting should return EDEADLK Product: Base System Version: 11.0-CURRENT Hardware: Any OS: Any Status: Needs Triage Severity: Affects Only Me Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: adrian@freebsd.org Hi! I've seen sqlite3 crap out due to "disk IO error". It looks like the F_SETFL path is returning EDEADLK when it shouldn't be - only the "wait" version of this should be. The kernel code looks to be: lf_setlock() -> lf_add_outgoing() -> lf_add_edge() -> graph_add_edge() -> EDEADLK .. and lf_setlock() will return an error from lf_add_outgoing() without checking if it's (a) EDEADLK, and (b) whether we're going to sleep or not. So, sqlite3 trips up on this. I'm sure other things do. What should the correct thing be? It looks like EWOULDBLOCK is the correct value to return for F_SETFL failing, not EDEADLK. What do those-who-know-POSIX-standards-better-than-I think? Thanks! -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-191593-8>