Opened 11 years ago

Closed 11 years ago

Last modified 11 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:
Has a Patch: no 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 11 years ago.
dsc00538.jpg (420.5 KB) - added by Adek336 11 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 11 years ago by anevilyak

Component: - GeneralSystem/Kernel

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

Changed 11 years ago by Adek336

Attachment: dsc00537.jpg added

Changed 11 years ago by Adek336

Attachment: dsc00538.jpg added

comment:2 Changed 11 years ago by Adek336

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 Changed 11 years ago by emitrax

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 Changed 11 years ago by emitrax

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 Changed 11 years ago by emitrax

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 Changed 11 years ago by axeld

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

comment:7 Changed 11 years ago by axeld

Resolution: fixed
Status: assignedclosed

Fixed in hrev27471.

comment:8 Changed 11 years ago by emitrax

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 Changed 11 years ago by axeld

I thought this was already tracked in another ticket?

comment:10 Changed 11 years ago by emitrax

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.