Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#15607 closed bug (fixed)

Tracker crashes when opening Open With menu

Reported by: X512 Owned by: axeld
Priority: normal Milestone: R1/beta2
Component: File Systems/BFS Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

This hrev53693. Tested on x86 gcc2hybrid and x86_64.

When attempt to move mouse to Open With menu item, Tracker crash.

There was FS corruption before (invalid b+tree) that was fixed by checkfs. Before FS corruption crashes do not appear. After checkfs FS errors are not detected.

Crash appear in BQuery::GetNextRef(entry_ref*). It seems that stack is corrupted, because FP and IP of previous frame is 0xcccccccc.

Attachments (4)

Tracker-1010-debug-07-01-2020-12-10-48.report (32.6 KB ) - added by X512 5 years ago.
Debug report.
Tracker-1007-debug-07-01-2020-13-58-41.report (27.8 KB ) - added by X512 5 years ago.
Debug report for x86_64.
CIMG4592_1.jpg (901.7 KB ) - added by X512 5 years ago.
Assert fail.
syslog (133.6 KB ) - added by X512 5 years ago.
Syslog.

Download all attachments as: .zip

Change History (13)

by X512, 5 years ago

Debug report.

comment:1 by X512, 5 years ago

Crash not happen if problem volume is not mounted.

by X512, 5 years ago

Debug report for x86_64.

comment:2 by X512, 5 years ago

In https://xref.landonf.org/source/xref/haiku/src/system/kernel/fs/fd.cpp#950 there is risk of writing outside buffer if descriptor->ops->fd_read_dir set count larger than maxCount.

comment:3 by X512, 5 years ago

I added asserts in _user_read_dir (https://review.haiku-os.org/c/haiku/+/2082) and ASSERT(sizeToCopy <= bufferSize) fails. Bug seems to be in BFS driver.

by X512, 5 years ago

Attachment: CIMG4592_1.jpg added

Assert fail.

by X512, 5 years ago

Attachment: syslog added

Syslog.

comment:4 by X512, 5 years ago

Relevant syslog entries:

KERN: bfs: bfs_create_index:2187: File or Directory already exists
KERN: Last message repeated 3 times.
KERN: bfs: Remove:2125: No such file or directory
KERN: bfs: KERN: Could not find value in index "size"!
KERN: bfs: Remove:2125: No such file or directory
KERN: bfs: KERN: Could not find value in index "last_modified"!
KERN: bfs: InitCheck:325: Bad data
KERN: bfs: KERN: inode at 27724319 is already deleted!
KERN: bfs: GetNextMatching:615: Bad data
KERN: bfs: KERN: could not get inode 27724319 in index "BEOS:APP_SIG"!
KERN: bfs: inode 27724750 in query has no name!
KERN: PANIC: ASSERT FAILED (../src/system/kernel/fs/fd.cpp:998): sizeToCopy <= bufferSize

comment:6 by korli, 5 years ago

Component: System/KernelFile Systems/BFS
Owner: changed from nobody to axeld

comment:7 by X512, 5 years ago

Fixed in hrev53696.

comment:8 by diver, 5 years ago

Resolution: fixed
Status: newclosed

comment:9 by nielx, 5 years ago

Milestone: UnscheduledR1/beta2

Assign tickets with status=closed and resolution=fixed within the R1/beta2 development window to the R1/beta2 Milestone

Note: See TracTickets for help on using tickets.