All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Fwd: Re: Fwd: Mounting an lvm-backed device via FUSE: 100% cpu usage and memory exhaustion.
Date: Wed, 14 Dec 2011 14:45:02 +0100	[thread overview]
Message-ID: <4EE8A85E.4060801@gmail.com> (raw)



-------- Original Message --------
Subject: 	Re: Fwd: Mounting an lvm-backed device via FUSE: 100% cpu 
usage and memory exhaustion.
Date: 	Wed, 14 Dec 2011 13:03:06 +0100
From: 	Paolo Pisati <p.pisati@gmail.com>
To: 	Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com>



On 12/13/2011 01:13 AM, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>
>
>  So first thing: I don't accept bugreports by private mail. Use
>  grub-devel or bug-grub.
>  Second thing: debian grub mount is based on old version of branch,
>  please use upstream.
>  Third thing I will need the output of grub-fstest /dev/sdXY ls -- -l and
>  a backtrace of a hang (of a version with symbols)

[flag@newluxor grub]$ bzr log -l 1 | grep revno
revno: 3658

[flag@newluxor grub]$ sudo ./grub-fstest /dev/sdd1 ls -- -l
Device loop0: Filesystem type ufs2 - Last modification time 2009-06-21
10:52:41 Sunday, UUID 49bcd83e59408510 - Total size 1953520002 sectors
Device host: Filesystem type hostfs - Total size 0 sectors
Device lvm/storage-storage: Filesystem type ext2 - Last modification
time 2011-12-14 08:06:06 Wednesday, UUID
b6df38ad-605c-4b9a-965c-71b8f4012684 - Total size 1953513472 sectors

ufs2? where does it come from?

[flag@newluxor ~]$ sudo fdisk -l /dev/sdd

Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa7591a3d

    Device Boot      Start         End      Blocks   Id  System
/dev/sdd1              63  1953520064   976760001   8e  Linux LVM

backtrace:


[root@newluxor grub]# ./grub-mount /dev/sdd1 /media/
[root@newluxor grub]# ps -auxwww | grep grub-mount
Warning: bad ps syntax, perhaps a bogus '-'? See
http://procps.sf.net/faq.html
root     15214  0.0  0.0  29660  1332 ?        Ss   12:39   0:00
./grub-mount /dev/sdd1 /media/
root     15216  0.0  0.0  14560   888 pts/2    S+   12:39   0:00 grep
grub-mount
[root@newluxor grub]# gdb ./grub-mount 15214

...

grub_memmove (dest=0xcaadc0, src=0xbf9dd0, n=24244) at
grub-core/kern/misc.c:61
61              *--d = *--s;
(gdb) bt
#0  grub_memmove (dest=0xcaadc0, src=0xbf9dd0, n=24244) at
grub-core/kern/misc.c:61
#1  0x0000000000451ee3 in grub_memcpy (dest=0xcaadc0, src=0xbf9dd0,
n=32768) at ./include/grub/misc.h:62
#2  0x0000000000452eda in grub_disk_read (disk=0xb99c90,
sector=1953519424, offset=0, size=33792, buf=0xcaadc0) at
grub-core/kern/disk.c:550
#3  0x000000000043a21d in scan_disk (dev=0xb99ce0, data=0xb78b50,
original=1, inserted=0x7fff68b7a294) at grub-core/fs/zfs/zfs.c:917
#4  0x0000000000440d95 in zfs_mount (dev=0xb99ce0) at
grub-core/fs/zfs/zfs.c:3299
#5  0x0000000000441ee1 in grub_zfs_dir (device=0xb99ce0, path=0x474e14
"/") at grub-core/fs/zfs/zfs.c:3790
#6  0x0000000000454cc3 in grub_fs_probe (device=0xb99ce0) at
grub-core/kern/fs.c:55
#7  0x0000000000454998 in grub_file_open (name=0xb99c70 "//") at
grub-core/kern/file.c:96
#8  0x00000000004033e6 in call_fill (filename=0x7fff68b7a8e0 "",
info=0x7fff68b7a920) at util/grub-mount.c:292
#9  0x00000000004344dc in grub_ufs_dir (device=0xb77740, path=0xb776e0
"/", hook=0x7fff68b7aac8) at grub-core/fs/ufs.c:640
#10 0x000000000040358d in fuse_readdir (buf=0xb77660,
fill=0x7ff9bd932a05<fill_dir>, off=0, fi=0x7fff68b7ac40) at
util/grub-mount.c:314
#11 0x00007ff9bd92eaba in fuse_fs_readdir (fs=0xb98f20, path=0xb99450
"/", buf=0xb77660, filler=0x7ff9bd932a05<fill_dir>, off=0,
fi=0x7fff68b7ac40) at fuse.c:1401
#12 0x00007ff9bd932dc3 in readdir_fill (f=0xb98e20, req=0xb775d0, ino=1,
size=4096, off=0, dh=0xb77660, fi=0x7fff68b7ac40) at fuse.c:2754
#13 0x00007ff9bd932ed7 in fuse_lib_readdir (req=0xb775d0, ino=1,
size=4096, off=0, llfi=0x7fff68b7acb0) at fuse.c:2780
#14 0x00007ff9bd938a25 in do_readdir (req=0xb775d0, nodeid=1,
inarg=0x7ff9bdf5b038) at fuse_lowlevel.c:846
#15 0x00007ff9bd93a3dd in fuse_ll_process (data=0xb99090,
buf=0x7ff9bdf5b010 "P", len=80, ch=0xb98dd0) at fuse_lowlevel.c:1514
#16 0x00007ff9bd93c3c1 in fuse_session_process (se=0xb77700,
buf=0x7ff9bdf5b010 "P", len=80, ch=0xb98dd0) at fuse_session.c:80
#17 0x00007ff9bd935ffa in fuse_session_loop (se=0xb77700) at fuse_loop.c:33
#18 0x00007ff9bd934c05 in fuse_loop (f=0xb98e20) at fuse.c:3436
#19 0x00007ff9bd93dff1 in fuse_main_common (argc=3, argv=0xb750c0,
op=0x68c3e0, op_size=328, user_data=0x0, compat=0) at helper.c:330
#20 0x00007ff9bd93e059 in fuse_main_real (argc=3, argv=0xb750c0,
op=0x68c3e0, op_size=328, user_data=0x0) at helper.c:342
#21 0x00000000004037c3 in fuse_init () at util/grub-mount.c:384
#22 0x0000000000403f2e in main (argc=3, argv=0x7fff68b7b058) at
util/grub-mount.c:558
(gdb) c
Continuing.
^C
Program received signal SIGINT, Interrupt.
0x0000000000455552 in grub_memmove (dest=0xcb31c0, src=0xc12200,
n=23108) at grub-core/kern/misc.c:61
61              *--d = *--s;
(gdb) bt
#0  0x0000000000455552 in grub_memmove (dest=0xcb31c0, src=0xc12200,
n=23108) at grub-core/kern/misc.c:61
#1  0x0000000000451ee3 in grub_memcpy (dest=0xcb31c0, src=0xc12200,
n=31744) at ./include/grub/misc.h:62
#2  0x000000000045298f in grub_disk_read_small (disk=0xb99c90,
sector=1953519744, offset=1024, size=31744, buf=0xcb31c0) at
grub-core/kern/disk.c:414
#3  0x0000000000452dcf in grub_disk_read (disk=0xb99c90,
sector=1953519746, offset=0, size=131072, buf=0xcb31c0) at
grub-core/kern/disk.c:518
#4  0x000000000043a21d in scan_disk (dev=0xb99c50, data=0xb78b50,
original=1, inserted=0x7fff68b7a294) at grub-core/fs/zfs/zfs.c:917
#5  0x0000000000440d95 in zfs_mount (dev=0xb99c50) at
grub-core/fs/zfs/zfs.c:3299
#6  0x0000000000441ee1 in grub_zfs_dir (device=0xb99c50, path=0x474e14
"/") at grub-core/fs/zfs/zfs.c:3790
#7  0x0000000000454cc3 in grub_fs_probe (device=0xb99c50) at
grub-core/kern/fs.c:55
#8  0x0000000000454998 in grub_file_open (name=0xb99ce0 "//") at
grub-core/kern/file.c:96
#9  0x00000000004033e6 in call_fill (filename=0x7fff68b7a8e0 "",
info=0x7fff68b7a920) at util/grub-mount.c:292
#10 0x00000000004344dc in grub_ufs_dir (device=0xb77740, path=0xb776e0
"/", hook=0x7fff68b7aac8) at grub-core/fs/ufs.c:640
#11 0x000000000040358d in fuse_readdir (buf=0xb77660,
fill=0x7ff9bd932a05<fill_dir>, off=0, fi=0x7fff68b7ac40) at
util/grub-mount.c:314
#12 0x00007ff9bd92eaba in fuse_fs_readdir (fs=0xb98f20, path=0xb99450
"/", buf=0xb77660, filler=0x7ff9bd932a05<fill_dir>, off=0,
fi=0x7fff68b7ac40) at fuse.c:1401
#13 0x00007ff9bd932dc3 in readdir_fill (f=0xb98e20, req=0xb775d0, ino=1,
size=4096, off=0, dh=0xb77660, fi=0x7fff68b7ac40) at fuse.c:2754
#14 0x00007ff9bd932ed7 in fuse_lib_readdir (req=0xb775d0, ino=1,
size=4096, off=0, llfi=0x7fff68b7acb0) at fuse.c:2780
#15 0x00007ff9bd938a25 in do_readdir (req=0xb775d0, nodeid=1,
inarg=0x7ff9bdf5b038) at fuse_lowlevel.c:846
#16 0x00007ff9bd93a3dd in fuse_ll_process (data=0xb99090,
buf=0x7ff9bdf5b010 "P", len=80, ch=0xb98dd0) at fuse_lowlevel.c:1514
#17 0x00007ff9bd93c3c1 in fuse_session_process (se=0xb77700,
buf=0x7ff9bdf5b010 "P", len=80, ch=0xb98dd0) at fuse_session.c:80
#18 0x00007ff9bd935ffa in fuse_session_loop (se=0xb77700) at fuse_loop.c:33
#19 0x00007ff9bd934c05 in fuse_loop (f=0xb98e20) at fuse.c:3436
#20 0x00007ff9bd93dff1 in fuse_main_common (argc=3, argv=0xb750c0,
op=0x68c3e0, op_size=328, user_data=0x0, compat=0) at helper.c:330
#21 0x00007ff9bd93e059 in fuse_main_real (argc=3, argv=0xb750c0,
op=0x68c3e0, op_size=328, user_data=0x0) at helper.c:342
#22 0x00000000004037c3 in fuse_init () at util/grub-mount.c:384
#23 0x0000000000403f2e in main (argc=3, argv=0x7fff68b7b058) at
util/grub-mount.c:558
(gdb) c
Continuing.
...
^C
Program received signal SIGINT, Interrupt.
0x0000000000455555 in grub_memmove (dest=0xc8adb0, src=0xbf9dd0, n=9575)
at grub-core/kern/misc.c:61
61              *--d = *--s;
(gdb) bt
#0  0x0000000000455555 in grub_memmove (dest=0xc8adb0, src=0xbf9dd0,
n=9575) at grub-core/kern/misc.c:61
#1  0x0000000000451ee3 in grub_memcpy (dest=0xc8adb0, src=0xbf9dd0,
n=32768) at ./include/grub/misc.h:62
#2  0x0000000000452eda in grub_disk_read (disk=0xb99c90,
sector=1953519424, offset=0, size=33792, buf=0xc8adb0) at
grub-core/kern/disk.c:550
#3  0x000000000043a21d in scan_disk (dev=0xb99c70, data=0xb78b50,
original=1, inserted=0x7fff68b7a294) at grub-core/fs/zfs/zfs.c:917
#4  0x0000000000440d95 in zfs_mount (dev=0xb99c70) at
grub-core/fs/zfs/zfs.c:3299
#5  0x0000000000441ee1 in grub_zfs_dir (device=0xb99c70, path=0x474e14
"/") at grub-core/fs/zfs/zfs.c:3790
#6  0x0000000000454cc3 in grub_fs_probe (device=0xb99c70) at
grub-core/kern/fs.c:55
#7  0x0000000000454998 in grub_file_open (name=0xb99c50 "//") at
grub-core/kern/file.c:96
#8  0x00000000004033e6 in call_fill (filename=0x7fff68b7a8e0 "",
info=0x7fff68b7a920) at util/grub-mount.c:292
#9  0x00000000004344dc in grub_ufs_dir (device=0xb77740, path=0xb776e0
"/", hook=0x7fff68b7aac8) at grub-core/fs/ufs.c:640
#10 0x000000000040358d in fuse_readdir (buf=0xb77660,
fill=0x7ff9bd932a05<fill_dir>, off=0, fi=0x7fff68b7ac40) at
util/grub-mount.c:314
#11 0x00007ff9bd92eaba in fuse_fs_readdir (fs=0xb98f20, path=0xb99450
"/", buf=0xb77660, filler=0x7ff9bd932a05<fill_dir>, off=0,
fi=0x7fff68b7ac40) at fuse.c:1401
#12 0x00007ff9bd932dc3 in readdir_fill (f=0xb98e20, req=0xb775d0, ino=1,
size=4096, off=0, dh=0xb77660, fi=0x7fff68b7ac40) at fuse.c:2754
#13 0x00007ff9bd932ed7 in fuse_lib_readdir (req=0xb775d0, ino=1,
size=4096, off=0, llfi=0x7fff68b7acb0) at fuse.c:2780
#14 0x00007ff9bd938a25 in do_readdir (req=0xb775d0, nodeid=1,
inarg=0x7ff9bdf5b038) at fuse_lowlevel.c:846
#15 0x00007ff9bd93a3dd in fuse_ll_process (data=0xb99090,
buf=0x7ff9bdf5b010 "P", len=80, ch=0xb98dd0) at fuse_lowlevel.c:1514
#16 0x00007ff9bd93c3c1 in fuse_session_process (se=0xb77700,
buf=0x7ff9bdf5b010 "P", len=80, ch=0xb98dd0) at fuse_session.c:80
#17 0x00007ff9bd935ffa in fuse_session_loop (se=0xb77700) at fuse_loop.c:33
#18 0x00007ff9bd934c05 in fuse_loop (f=0xb98e20) at fuse.c:3436
#19 0x00007ff9bd93dff1 in fuse_main_common (argc=3, argv=0xb750c0,
op=0x68c3e0, op_size=328, user_data=0x0, compat=0) at helper.c:330
#20 0x00007ff9bd93e059 in fuse_main_real (argc=3, argv=0xb750c0,
op=0x68c3e0, op_size=328, user_data=0x0) at helper.c:342
#21 0x00000000004037c3 in fuse_init () at util/grub-mount.c:384
#22 0x0000000000403f2e in main (argc=3, argv=0x7fff68b7b058) at
util/grub-mount.c:558
(gdb)
#0  0x0000000000455555 in grub_memmove (dest=0xc8adb0, src=0xbf9dd0,
n=9575) at grub-core/kern/misc.c:61
#1  0x0000000000451ee3 in grub_memcpy (dest=0xc8adb0, src=0xbf9dd0,
n=32768) at ./include/grub/misc.h:62
#2  0x0000000000452eda in grub_disk_read (disk=0xb99c90,
sector=1953519424, offset=0, size=33792, buf=0xc8adb0) at
grub-core/kern/disk.c:550
#3  0x000000000043a21d in scan_disk (dev=0xb99c70, data=0xb78b50,
original=1, inserted=0x7fff68b7a294) at grub-core/fs/zfs/zfs.c:917
#4  0x0000000000440d95 in zfs_mount (dev=0xb99c70) at
grub-core/fs/zfs/zfs.c:3299
#5  0x0000000000441ee1 in grub_zfs_dir (device=0xb99c70, path=0x474e14
"/") at grub-core/fs/zfs/zfs.c:3790
#6  0x0000000000454cc3 in grub_fs_probe (device=0xb99c70) at
grub-core/kern/fs.c:55
#7  0x0000000000454998 in grub_file_open (name=0xb99c50 "//") at
grub-core/kern/file.c:96
#8  0x00000000004033e6 in call_fill (filename=0x7fff68b7a8e0 "",
info=0x7fff68b7a920) at util/grub-mount.c:292
#9  0x00000000004344dc in grub_ufs_dir (device=0xb77740, path=0xb776e0
"/", hook=0x7fff68b7aac8) at grub-core/fs/ufs.c:640
#10 0x000000000040358d in fuse_readdir (buf=0xb77660,
fill=0x7ff9bd932a05<fill_dir>, off=0, fi=0x7fff68b7ac40) at
util/grub-mount.c:314
#11 0x00007ff9bd92eaba in fuse_fs_readdir (fs=0xb98f20, path=0xb99450
"/", buf=0xb77660, filler=0x7ff9bd932a05<fill_dir>, off=0,
fi=0x7fff68b7ac40) at fuse.c:1401
#12 0x00007ff9bd932dc3 in readdir_fill (f=0xb98e20, req=0xb775d0, ino=1,
size=4096, off=0, dh=0xb77660, fi=0x7fff68b7ac40) at fuse.c:2754
#13 0x00007ff9bd932ed7 in fuse_lib_readdir (req=0xb775d0, ino=1,
size=4096, off=0, llfi=0x7fff68b7acb0) at fuse.c:2780
#14 0x00007ff9bd938a25 in do_readdir (req=0xb775d0, nodeid=1,
inarg=0x7ff9bdf5b038) at fuse_lowlevel.c:846
#15 0x00007ff9bd93a3dd in fuse_ll_process (data=0xb99090,
buf=0x7ff9bdf5b010 "P", len=80, ch=0xb98dd0) at fuse_lowlevel.c:1514
#16 0x00007ff9bd93c3c1 in fuse_session_process (se=0xb77700,
buf=0x7ff9bdf5b010 "P", len=80, ch=0xb98dd0) at fuse_session.c:80
#17 0x00007ff9bd935ffa in fuse_session_loop (se=0xb77700) at fuse_loop.c:33
#18 0x00007ff9bd934c05 in fuse_loop (f=0xb98e20) at fuse.c:3436
#19 0x00007ff9bd93dff1 in fuse_main_common (argc=3, argv=0xb750c0,
op=0x68c3e0, op_size=328, user_data=0x0, compat=0) at helper.c:330
#20 0x00007ff9bd93e059 in fuse_main_real (argc=3, argv=0xb750c0,
op=0x68c3e0, op_size=328, user_data=0x0) at helper.c:342
#21 0x00000000004037c3 in fuse_init () at util/grub-mount.c:384
#22 0x0000000000403f2e in main (argc=3, argv=0x7fff68b7b058) at
util/grub-mount.c:558
(gdb)

what i found really odd are these:

#5  0x0000000000441ee1 in grub_zfs_dir (device=0xb99c70, path=0x474e14
"/") at grub-core/fs/zfs/zfs.c:3790
...
#9  0x00000000004344dc in grub_ufs_dir (device=0xb77740, path=0xb776e0
"/", hook=0x7fff68b7aac8) at grub-core/fs/ufs.c:640

first it thinks it's a ufs partition, and then tries zfs: WTF?!?!?
btw, i've been a freebsd user so this disk might have been formatted as
ufs in the past but it's lvm+ext3 only now.

-- 
bye,
p.




                 reply	other threads:[~2011-12-14 13:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EE8A85E.4060801@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.