Opened 14 years ago
Closed 14 years ago
#255 closed defect (fixed)
Assertion failed (firstc >= FAT_CLST_FIRST && firstc < FAT_CLST_BAD) at 'fat_fat.c', line 515
Reported by: | Štěpán Henek | Owned by: | Jakub Jermář |
---|---|---|---|
Priority: | major | Milestone: | 0.4.3 |
Component: | helenos/fs/fat | Version: | mainline |
Keywords: | Cc: | ||
Blocker for: | Depends on: | ||
See also: |
Description
By accident, I used write in an infinite loop, so it filled my small(16M) FAT partition (mounted to /data).
After killing the process using kcon, the root partition became unaccessible:
# cd /
Invalid directory '/' (No Such Entry)
and an assert appeared in the kernel console:
Assertion failed (firstc ≥ FAT_CLST_FIRST && firstc < FAT_CLST_BAD) at 'fat_fat.c', line 515
After a reboot the fat partition seemed to be destroyed.
Attachments (1)
Change History (7)
comment:1 by , 14 years ago
Component: | uspace/libfs → fs/fat |
---|---|
Milestone: | 0.5.1 → 0.5.0 |
Owner: | set to |
Status: | new → accepted |
comment:2 by , 14 years ago
comment:3 by , 14 years ago
Summary: | FAT full problem → Assertion failed (firstc >= FAT_CLST_FIRST && firstc < FAT_CLST_BAD) at 'fat_fat.c', line 515 |
---|
comment:4 by , 14 years ago
Hi Jakub,
it is revno: 631.
The easiest way to reproduce this situation is to use FAT as your RAM disk.
Then after boot, you can trigger it by editing a file using the edit command and saving and appending several times.
comment:5 by , 14 years ago
Priority: | trivial → major |
---|
Ok, I could reproduce it that way. The stack trace shows the following calling sequence:
fat_free_clusters()
fat_chop_clusters()
fat_truncate()
comment:6 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
The recent sequential I/O improvements introduced a regression into fat_append_clusters() which in turn did not update nodep→firstc as necessary.
Fixed in changeset:mainline,632
Hi Stepan,
what revision is this? I tried to reproduce your testcase, but in my case the write will start returning ENOSPACE after the file system is full and when I kill it, nothing special happens and I can run the test again. Also did you use HelenOS mkfat command to create the file system? Was the image created like: dd if=/dev/zero of=img bs=1024 count=16384?
Thanks,
Jakub