Bug 125382 - [libc] open(2): ENOSPC may be misleading, consider EIO
Summary: [libc] open(2): ENOSPC may be misleading, consider EIO
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-07 23:00 UTC by Andrew Hammond
Modified: 2018-01-03 05:16 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Hammond 2008-07-07 23:00:01 UTC
Found the following error message in PostgreSQL logs:

vacuumdb: vacuuming of database "adecndb" failed: ERROR:  could not
write block 209610 of relation 1663/16386/236356665: No space left on
device

Didn't make sense since device is only at 18% usage. Got on pgsql-hackers
mailing list (subject "the un-vacuumable table", thread starts at
http://archives.postgresql.org/pgsql-hackers/2008-06/msg00922.php).

> Have you looked into the machine's kernel log to see if there is any
> evidence of low-level distress (hardware or filesystem level)?  I'm
> wondering if ENOSPC is being reported because it is the closest
> available errno code, but the real problem is something different than
> the error message text suggests.  Other than the errno the symptoms
> all look quite a bit like a bad-sector problem ...

Uhm, just for the record FileWrite returns error messages which get printed
this way for two reasons other than write(2) returning ENOSPC:

1) if FileAccess has to reopen the file then open(2) could return an error. I
don't see how open returns ENOSPC without O_CREAT (and that's cleared for
reopening)

2) If write(2) returns < 0 but doesn't set errno. That also seems like a
strange case that shouldn't happen, but perhaps there's some reason it can.



On Thu, Jul 3, 2008 at 10:57 PM, Andrew Hammond
<andrew.george.hammond@gmail.com> wrote:
> On Thu, Jul 3, 2008 at 3:47 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:33 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped