[linux-lvm] 1.0.1-rc2 lvcreate segfaults, pvcreate, vgcreate ok

John Marquart jomarqua at techie.com
Wed Sep 26 16:54:27 UTC 2001


I think you are running into a problem i had.   look in the archives for
mails from/to jomarqua at indiana.edu - but i think the problem is your
inline functions that lvcreate uses.

There is a patch that was recommended to me - should fix your problem i
think - it is at:

http://incandescent.mp3revolution.net/lvm/inline_fix.diff

-j


On Wed, 26 Sep 2001, Jim Cromie wrote:

>
> I recently pulled 2.4.10, built, installed, and tested ok on a Redhat 7.1
> machine.
>
> then I activated LVM module config, applied 1.0.1-rc2 LVM patches,
> rebuilt,
> manually corrected 3-ary max(), min() s to 2 arg version, as per
>
> http://lists.sistina.com/pipermail/lvm-devel/2001-September/000657.html
>
>
> reboot works, insmod lvm-mod installs module as expected,
> pvcreate, vgcreate both worked..
>
> lvcreate segfaults however, apparently after nearly completing the LV
> setup.
>
> # gdb /sbin/lvcreate
> (gdb) r -d -L1000 -nVL_test VG_test
> ....
> <55555> pv_check_new -- CALLED
> <55555> pv_check_new -- LEAVING with ret: 0
> <4444> pv_check_consistency -- LEAVING with ret: 0
> <333> lv_check_on_pv -- LEAVING with ret: 1
> <22> pv_reserve_pe -- LEAVING with ret: 0
> <1> lv_setup_for_create -- pv_reserve_pe returned: 0   pe_last: 250  pe:
> 0
> <1> lv_setup_for_create -- pe: 0
> <1> lv_setup_for_create -- LEAVING with ret: 0
> <1> lvm_dont_interrupt -- CALLED
> <1> lvm_dont_interrupt -- LEAVING
>
> Program received signal SIGSEGV, Segmentation fault.
> lv_create (vg=0x5, lv=0xbffff9f4,
>     lv_name=0xbffffa0c
> ":ûÿ¿Rûÿ¿nûÿ¿\203ûÿ¿\233ûÿ¿½ûÿ¿Üûÿ¿èûÿ¿òûÿ¿µýÿ¿Ôýÿ¿îýÿ¿\003þÿ¿\032þÿ¿%þÿ¿0þÿ¿=þÿ¿Eþÿ¿Uþÿ¿cþÿ¿qþÿ¿\202þÿ¿\220þÿ¿²þÿ¿Ëþÿ¿Öþÿ¿áþÿ¿\024ÿÿ¿")
> at lv_create_remove.c:42
> 42 int lv_create ( vg_t *vg, lv_t *lv, char *lv_name) {
> (gdb) bt
> #0  lv_create (vg=0x5, lv=0xbffff9f4,
>     lv_name=0xbffffa0c
> ":ûÿ¿Rûÿ¿nûÿ¿\203ûÿ¿\233ûÿ¿½ûÿ¿Üûÿ¿èûÿ¿òûÿ¿µýÿ¿Ôýÿ¿îýÿ¿\003þÿ¿\032þÿ¿%þÿ¿0þÿ¿=þÿ¿Eþÿ¿Uþÿ¿cþÿ¿qþÿ¿\202þÿ¿\220þÿ¿²þÿ¿Ëþÿ¿Öþÿ¿áþÿ¿\024ÿÿ¿")
> at lv_create_remove.c:42
> #1  0x0804b03d in strcpy () at ../sysdeps/generic/strcpy.c:31
> #2  0x40079177 in __libc_start_main (main=0x8049390 <strcpy+384>, argc=5,
> ubp_av=0xbffff9f4, init=0x8048e88 <_init>,
>     fini=0x804b4d0 <_fini>, rtld_fini=0x4000e184 <_dl_fini>,
> stack_end=0xbffff9ec) at ../sysdeps/generic/libc-start.c:129
> (gdb)
> (gdb) list
> 37
> 38 /* internal function */
> 39 int lv_create_remove ( vg_t *, lv_t *, char *, int);
> 40
> 41
> 42 int lv_create ( vg_t *vg, lv_t *lv, char *lv_name) {
> 43    return lv_create_remove ( vg, lv, lv_name, LV_CREATE);
> 44 }
> 45
> 46
> (gdb)
>
> (gdb) up
> #1  0x0804b03d in strcpy () at ../sysdeps/generic/strcpy.c:31
> 31 ../sysdeps/generic/strcpy.c: No such file or directory.
>  in ../sysdeps/generic/strcpy.c
>
>
> Apriori, it looks like lv_name is uninitialized.  But it runs pretty far
> before choking.
>
> looking deeper;
>
> (gdb) b lv_create
> (gdb) b strcpy
> (gdb) r
> ....
> <4444> lv_check_consistency_all_lv -- vg->lv[245]: 0  name: (null)
> <4444> lv_check_consistency_all_lv -- vg->lv[246]: 0  name: (null)
> <4444> lv_check_consistency_all_lv -- vg->lv[247]: 0  name: (null)
> <4444> lv_check_consistency_all_lv -- vg->lv[248]: 0  name: (null)
> <4444> lv_check_consistency_all_lv -- vg->lv[249]: 0  name: (null)
> <4444> lv_check_consistency_all_lv -- vg->lv[250]: 0  name: (null)
> <4444> lv_check_consistency_all_lv -- vg->lv[251]: 0  name: (null)
> <4444> lv_check_consistency_all_lv -- vg->lv[252]: 0  name: (null)
> <4444> lv_check_consistency_all_lv -- vg->lv[253]: 0  name: (null)
> <4444> lv_check_consistency_all_lv -- vg->lv[254]: 0  name: (null)
> <4444> lv_check_consistency_all_lv -- LEAVING with ret: 0
> <333> vg_check_consistency_with_pv_and_lv -- LEAVING with ret: 0
> <22> vg_cfgrestore -- LEAVING with ret: 0
> <1> lvm_tab_vg_check_exist -- before vg.pv_cur check with vg.pv_cur: 1
> pv_count: 1
> <22> vg_free -- CALLED
> <22> vg_free -- entering PV loop
> <22> vg_free -- entering LV loop
> <22> vg_free -- LEAVING with ret: 0
> <1> lvm_tab_vg_check_exist -- LEAVING with ret: 1
> <1> vg_check_active -- CALLED with VG: VG_test
> <22> vg_check_name -- CALLED with VG: VG_test
> <333> lvm_check_chars -- CALLED with name: "VG_test"
> <333> lvm_check_chars -- LEAVING with ret: 0
> <22> vg_check_name -- LEAVING with ret: 0
> <22> vg_status -- CALLED with VG: VG_test
> <333> vg_check_name -- CALLED with VG: VG_test
> <4444> lvm_check_chars -- CALLED with name: "VG_test"
> <4444> lvm_check_chars -- LEAVING with ret: 0
> <333> vg_check_name -- LEAVING with ret: 0
> <22> vg_status -- LEAVING with ret: 0
> <1> vg_check_active -- LEAVING with ret: 1
> <1> lv_check_name -- CALLED with lv_name: "/dev/VG_test/VL_test"
> <22> lvm_check_chars -- CALLED with name: "/dev/VG_test/VL_test"
> <22> lvm_check_chars -- LEAVING with ret: 0
>
> Breakpoint 1, strcpy (dest=0xbfffecc0
> "dm\001@õÚÑ\013\2137\001 at 0íÿ¿\020l\001@Ñ\210\004\bìq\001@ÿÿÿÿ",
>     src=0xbffff650 "/dev/VG_test/VL_test") at
> ../sysdeps/generic/strcpy.c:34
> 34 ../sysdeps/generic/strcpy.c: No such file or directory.
>  in ../sysdeps/generic/strcpy.c
> (gdb)
> (gdb) frame
> #0  strcpy (dest=0xbfffecc0
> "dm\001@õÚÑ\013\2137\001 at 0íÿ¿\020l\001@Ñ\210\004\bìq\001@ÿÿÿÿ",
> src=0xbffff650 "/dev/VG_test/VL_test")
>     at ../sysdeps/generic/strcpy.c:34
> 34 in ../sysdeps/generic/strcpy.c
> (gdb)
>
> so - string is initialized, at least to start
>
>
> I cant get any more insight at this time, HTH
>
>
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm at sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html
>





More information about the linux-lvm mailing list