Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#2704 closed bug (fixed)

problems with links to long pathnames

Reported by: Adek336 Owned by: axeld
Priority: critical Milestone: R1/alpha1
Component: File Systems/BFS Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Create a folder on the desktop with a long name, inside it create a folder with any name, say "p", the resulting pathname "/boot/home/Desktop/abcdwefasfsd...asdfasd/p" should be about 120 letters long, then create a link to the "p" folder on the desktop and it panics.

Attachments (2)

dsc00537.jpg (403.2 KB ) - added by Adek336 16 years ago.
dsc00538.jpg (420.5 KB ) - added by Adek336 16 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 by anevilyak, 16 years ago

Component: - GeneralSystem/Kernel

Some more information please, what's the panic message and backtrace?

by Adek336, 16 years ago

Attachment: dsc00537.jpg added

by Adek336, 16 years ago

Attachment: dsc00538.jpg added

comment:2 by Adek336, 16 years ago

537.jpg is when you right-click drag the inner directory to make a link to it on the Desktop. 538.jpg is when I use the terminal to make a symlink to a folder with a long pathname in a folder open with Tracker.

comment:3 by emitrax, 16 years ago

Can you please provide the exact steps and commands to reproduce the problem? Because I tried what you said, and it result in a different bug. It seems to be related to BFS. Does it also happen on a different file system? Can you run the same test on a usb stick formatted with fat for example? Thanks. Nice bug by the way! ;-)

comment:4 by emitrax, 16 years ago

Ok. It seems it depends on the length of the filename. I ran into your panic by creating a directory with a name length less then 150 chars and making a link to it. Not need to create a file inside of it. If the directory name lenght is bigger, like 200 chars, the following panic is triggered.

PANIC: ASSERT FAILED (src/add-ons/kernel/file_systems/bfs/Index.cpp:347): inode->IsFile()

comment:5 by emitrax, 16 years ago

Simple test case to reproduce the crash.

Create a bunch of subdirectories

for i in `seq 1 255`; do mkdir a; echo a - $i; cd a; done

back do the base directory and make the links

for i in `seq 1 255`; do ln -s `pwd`/a /boot/home/Desktop/link-to-$i; cd a; done

comment:6 by axeld, 16 years ago

Component: System/KernelFile Systems/BFS
Milestone: R1R1/alpha1
Priority: normalcritical
Status: newassigned

comment:7 by axeld, 16 years ago

Resolution: fixed
Status: assignedclosed

Fixed in hrev27471.

comment:8 by emitrax, 16 years ago

Although with a slightly different stack trace, I still get the same panic when deleting the directories create with the script above. Linking works fine though.

comment:9 by axeld, 16 years ago

I thought this was already tracked in another ticket?

comment:10 by emitrax, 16 years ago

The tickets I found about panic on get_writable_cached_block have different backtrace and it seems they are all been fixed. I just opened #2727.

Note: See TracTickets for help on using tickets.