Skip to contentSkip to conversation

grub-mount (ubuntu) hangs with hfs+ partition

DISCUSSION Kees Bakker 2 participants 6 messages Feb 23, 2012 – Feb 25, 2012

lore
Share & tools
lore
#0 lore raw

Hi,

In Ubuntu (and Debian I guess) there is a grub-mount command. It's added to grub with branch_fuse.patch, and in that file it mentions
http://lists.gnu.org/archive/html/grub-devel/2011-01/msg00056.html

I have a MacPro system with Ubuntu installed and some HFS+ partitions. Everytime I do a kernel update (and update-grub) it hangs when a grub-mount command is used on one of the HFS+ partitions.

The grub-mount command does not hang on all my HFS+ partitions. But the fact that it hangs on one of them makes it very annoying.

I've tried to debug this problem, but I am not making any progress. The program hangs in a while(1) loop at line 657 in grub-core/fs/hfsplus.c

BTW. I've also tried to contact Macro Gerards (the contributor of the HFS+ code), but I didn't get a reply from him.

Signature · 1 line
Kees
#1 lore raw
Quoted 11 lines · Kees Bakker

Hi,

In Ubuntu (and Debian I guess) there is a grub-mount command. It's added to grub with branch_fuse.patch, and in that file it mentions
http://lists.gnu.org/archive/html/grub-devel/2011-01/msg00056.html

I have a MacPro system with Ubuntu installed and some HFS+ partitions. Everytime I do a kernel update (and update-grub) it hangs when a grub-mount command is used on one of the HFS+ partitions.

Quoted 6 lines

The grub-mount command does not hang on all my HFS+ partitions. But the fact that it hangs on one of them makes it very annoying.

I've tried to debug this problem, but I am not making any progress. The program hangs in a while(1) loop at line 657 in grub-core/fs/hfsplus.c

there is no loop at this location in the latest trunk. Could you use this please? Also what is the value of currnode on every loop iteration?

Quoted 2 lines

BTW. I've also tried to contact Macro Gerards (the contributor of the HFS+ code), but I didn't get a reply from him.

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
#2 lore raw
Quoted 5 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 3 lines · Kees Bakker

I've tried to debug this problem, but I am not making any progress. The program hangs in a while(1) loop at line 657 in grub-core/fs/hfsplus.c

there is no loop at this location in the latest trunk. Could you use this please?

OK. I'll take a look (but please be patient, because I am moving to a new location, and I won't have internet access at least until March 19)

Quoted 1 line

Also what is the value of currnode on every loop iteration?

I've added several print statement and limited the loop to 10 iterations. currnode has these values. So, the first time it is 0x8d7d and all next iterations it is 0x4bdff.

reading node currnode=0000000000008d7d
match, currkey=0x9e531e, pointer=0x9e532c, keylen=0c00,
currnode=000000000004bdff
reading node currnode=000000000004bdff
match, currkey=0x9e531e, pointer=0x9e532c, keylen=0c00,
currnode=000000000004bdff
reading node currnode=000000000004bdff
match, currkey=0x9e531e, pointer=0x9e532c, keylen=0c00,
currnode=000000000004bdff
reading node currnode=000000000004bdff
match, currkey=0x9e531e, pointer=0x9e532c, keylen=0c00,
currnode=000000000004bdff
reading node currnode=000000000004bdff
match, currkey=0x9e531e, pointer=0x9e532c, keylen=0c00,
currnode=000000000004bdff
reading node currnode=000000000004bdff
match, currkey=0x9e531e, pointer=0x9e532c, keylen=0c00,
currnode=000000000004bdff
reading node currnode=000000000004bdff
match, currkey=0x9e531e, pointer=0x9e532c, keylen=0c00,
currnode=000000000004bdff
reading node currnode=000000000004bdff
match, currkey=0x9e531e, pointer=0x9e532c, keylen=0c00,
currnode=000000000004bdff
reading node currnode=000000000004bdff
match, currkey=0x9e531e, pointer=0x9e532c, keylen=0c00,
currnode=000000000004bdff

Signature · 1 line
Kees
#3 lore raw
In reply to Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 6 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 4 lines · Kees Bakker

I've tried to debug this problem, but I am not making any progress. The program hangs in a while(1) loop at line 657 in grub-core/fs/hfsplus.c

there is no loop at this location in the latest trunk. Could you use this please?

Correct, the while (1) is at line 665.

Here is the good news: the hang does not happen with the trunk version anymore.

Great work Vladimir. You seem to have done quite a bit of work there, according to the ChangeLog. Thanks a lot.

Now, if only Ubuntu would like to take a more recent upstream version ...

Signature · 1 line
Kees
#4 lore raw
Quoted 6 lines · Kees Bakker
Quoted 5 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 4 lines · Kees Bakker

I've tried to debug this problem, but I am not making any progress. The program hangs in a while(1) loop at line 657 in grub-core/fs/hfsplus.c

Quoted 6 lines
Quoted 1 line

there is no loop at this location in the latest trunk. Could you use this please?

Correct, the while (1) is at line 665.

Here is the good news: the hang does not happen with the trunk version anymore.

But there is still a minor bug that you can make this loop hang with a broken FS (btree loop). I've added standard Brent's check to avoid this.

Quoted 5 lines

Great work Vladimir. You seem to have done quite a bit of work there, according to the ChangeLog. Thanks a lot.

Now, if only Ubuntu would like to take a more recent upstream version ...

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
#5 lore raw
Quoted 4 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 2 lines · Kees Bakker

Here is the good news: the hang does not happen with the trunk version anymore.

But there is still a minor bug that you can make this loop hang with a broken FS (btree loop). I've added standard Brent's check to avoid this.

OK. Great.