Skip to contentSkip to conversation

Trouble 2.2.14 setup - unresolved symbol lvm_map_ptr (My first time)

linux-lvm Michael Marxmeier 4 participants 14 messages Jan 29, 2000 – Jan 30, 2000

lore
Share & tools
lore
#0 lore raw

Forwarded message ...

-------- Original Message --------
Date: Sat, 29 Jan 2000 13:41:49 -0600
Resent-Date: Sat, 29 Jan 2000 21:14:28 MEZ
From: Chris Anderson <[email protected]>
Organization: Alwan, Inc.
Subject: Trouble 2.2.14 setup - unresolved symbol lvm_map_ptr (My first time)

Ok this is my first try at LVM and I did not get it working.

I ran the 2.2.13 patch on the linux source and it seemed to compile file. I want to setup LVM as a module so I set the flag in the config to module. Do all the compiles then after a reboot i run the below commands. Note I did poke around in the doc and found nothing.

$ depmod -a
/lib/modules/2.2.14/block/lvm.o: unresolved symbol(s)
$ modprobe lvm
/lib/modules/2.2.14/block/lvm.o: unresolved symbol lvm_map_ptr

It looks like something is wrong. Any help please? I hope this is a easy one.

[email protected]

#1 lore raw

Started from scratch (new kernel code and lvm patch) and got it to work. At least that part. Now I am getting a core dump. I will work this out too I guess.

I use veritas every other day in my job as a DBA and it works real nice. I wish the install for LVM was as easy. If this stuff does get into the common source I hope others get it running much easier then I. Is this stuff ready for prime time? (Doc, programs and all)

My current state is below:

$ vgscan
vgscan -- reading all physical volumes (this may take a while...)
vgscan -- no volume groups found
$ pvcreate /dev/hda8
pvcreate -- reinitializing physical volume
pvcreate -- physical volume "/dev/hda8" successfully created
$ vgcreate main_vg /dev/hda8
Segmentation fault (core dumped)
Quoted 25 lines

-------- Original Message --------
Date: Sat, 29 Jan 2000 13:41:49 -0600
Resent-Date: Sat, 29 Jan 2000 21:14:28 MEZ
From: Chris Anderson <[email protected]>
Organization: Alwan, Inc.
Subject: Trouble 2.2.14 setup - unresolved symbol lvm_map_ptr (My first time)

Ok this is my first try at LVM and I did not get it working.

I ran the 2.2.13 patch on the linux source and it seemed to compile file. I want to setup LVM as a module so I set the flag in the config to module. Do all the compiles then after a reboot i run the below commands. Note I did poke around in the doc and found nothing.

$ depmod -a
/lib/modules/2.2.14/block/lvm.o: unresolved symbol(s)
$ modprobe lvm
/lib/modules/2.2.14/block/lvm.o: unresolved symbol lvm_map_ptr

It looks like something is wrong. Any help please? I hope this is a easy one.

[email protected]

#2 lore raw

Please have a look at the BUGS file on the <ftp://linux.msede.com/lvm/v0.8> as well. The fixes in there should help.

Heinz

Quoted 15 lines

Started from scratch (new kernel code and lvm patch) and got it to work. At least that part. Now I am getting a core dump. I will work this out too I guess.

I use veritas every other day in my job as a DBA and it works real nice. I wish the install for LVM was as easy. If this stuff does get into the common source I hope others get it running much easier then I. Is this stuff ready for prime time? (Doc, programs and all)

My current state is below:

$ vgscan
vgscan -- reading all physical volumes (this may take a while...)
vgscan -- no volume groups found
Quoted 33 lines
$ pvcreate /dev/hda8
pvcreate -- reinitializing physical volume
pvcreate -- physical volume "/dev/hda8" successfully created
$ vgcreate main_vg /dev/hda8
Segmentation fault (core dumped)
Quoted 25 lines

-------- Original Message --------
Date: Sat, 29 Jan 2000 13:41:49 -0600
Resent-Date: Sat, 29 Jan 2000 21:14:28 MEZ
From: Chris Anderson <[email protected]>
Organization: Alwan, Inc.
Subject: Trouble 2.2.14 setup - unresolved symbol lvm_map_ptr (My first time)

Ok this is my first try at LVM and I did not get it working.

I ran the 2.2.13 patch on the linux source and it seemed to compile file. I want to setup LVM as a module so I set the flag in the config to module. Do all the compiles then after a reboot i run the below commands. Note I did poke around in the doc and found nothing.

$ depmod -a
/lib/modules/2.2.14/block/lvm.o: unresolved symbol(s)
$ modprobe lvm
/lib/modules/2.2.14/block/lvm.o: unresolved symbol lvm_map_ptr

It looks like something is wrong. Any help please? I hope this is a easy one.

[email protected]

Content-Description: S/MIME Cryptographic Signature

[Attachment, skipping...]

Signature · 11 lines
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Systemmanagement CS-TS                           T-Nova
                                                 Entwicklungszentrum Darmstadt
Heinz Mauelshagen                                Otto-Roehm-Strasse 71c
Senior Systems Engineer                          Postfach 10 05 41
                                                 64205 Darmstadt
[email protected]                      Germany
                                                 +49 6151 886-425
                                                          FAX-386
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#3 lore raw
Quoted 2 lines · Heinz Mauelshagen

Please have a look at the BUGS file on the <ftp://linux.msede.com/lvm/v0.8> as well. The fixes in there should help.

Thanks. I just found that right before this email.

Not that this is a big problem but maybe a little bug:

$ vgdisplay -A
Segmentation fault (core dumped)

I did this after I "vgcreate test_vg /dev/hda8". It looks like
"tool/lib/vg_check_active.c" has the same bug as
"tools/lib/lvm_tab_vg_check_exist_all_vg.c". I think core dump are problems no?

I think this project is important for the Linux people, they just do not know that a Volume manager is the only way to split up drives and now that drives are bigger. Well..

I hope to help by my input so please do not think I am not happy to have acess to this software and this newgroup.

Quoted 69 lines

Heinz

Quoted 15 lines

Started from scratch (new kernel code and lvm patch) and got it to work. At least that part. Now I am getting a core dump. I will work this out too I guess.

I use veritas every other day in my job as a DBA and it works real nice. I wish the install for LVM was as easy. If this stuff does get into the common source I hope others get it running much easier then I. Is this stuff ready for prime time? (Doc, programs and all)

My current state is below:

$ vgscan
vgscan -- reading all physical volumes (this may take a while...)
vgscan -- no volume groups found
Quoted 33 lines
$ pvcreate /dev/hda8
pvcreate -- reinitializing physical volume
pvcreate -- physical volume "/dev/hda8" successfully created
$ vgcreate main_vg /dev/hda8
Segmentation fault (core dumped)
Quoted 25 lines

-------- Original Message --------
Date: Sat, 29 Jan 2000 13:41:49 -0600
Resent-Date: Sat, 29 Jan 2000 21:14:28 MEZ
From: Chris Anderson <[email protected]>
Organization: Alwan, Inc.
Subject: Trouble 2.2.14 setup - unresolved symbol lvm_map_ptr (My first time)

Ok this is my first try at LVM and I did not get it working.

I ran the 2.2.13 patch on the linux source and it seemed to compile file. I want to setup LVM as a module so I set the flag in the config to module. Do all the compiles then after a reboot i run the below commands. Note I did poke around in the doc and found nothing.

$ depmod -a
/lib/modules/2.2.14/block/lvm.o: unresolved symbol(s)
$ modprobe lvm
/lib/modules/2.2.14/block/lvm.o: unresolved symbol lvm_map_ptr

It looks like something is wrong. Any help please? I hope this is a easy one.

[email protected]

Content-Description: S/MIME Cryptographic Signature

[Attachment, skipping...]

--

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Systemmanagement CS-TS T-Nova
Entwicklungszentrum Darmstadt
Heinz Mauelshagen Otto-Roehm-Strasse 71c
Senior Systems Engineer Postfach 10 05 41

                                                 64205 Darmstadt
[email protected]                      Germany
                                                 +49 6151 886-425
                                                          FAX-386

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

#4 lore raw
Quoted 6 lines
Quoted 2 lines · Heinz Mauelshagen

Please have a look at the BUGS file on the <ftp://linux.msede.com/lvm/v0.8> as well. The fixes in there should help.

Thanks. I just found that right before this email.

Good.

Quoted 5 lines

Not that this is a big problem but maybe a little bug:

$ vgdisplay -A
Segmentation fault (core dumped)

Could you provide the output of "vgdisplay -dA" to analyze this?

Quoted 4 lines

I did this after I "vgcreate test_vg /dev/hda8". It looks like
"tool/lib/vg_check_active.c" has the same bug as
"tools/lib/lvm_tab_vg_check_exist_all_vg.c". I think core dump are problems no?

Yep ;-{(

Quoted 6 lines

I think this project is important for the Linux people, they just do not know that a Volume manager is the only way to split up drives and now that drives are bigger. Well..

I hope to help by my input

Yes, i appreciate this.

Quoted 2 lines

so please do not think I am not happy to have acess to this software and this newgroup.

Not at all.

Heinz

Quoted 61 lines
Quoted 61 lines

Heinz

Quoted 15 lines

Started from scratch (new kernel code and lvm patch) and got it to work. At least that part. Now I am getting a core dump. I will work this out too I guess.

I use veritas every other day in my job as a DBA and it works real nice. I wish the install for LVM was as easy. If this stuff does get into the common source I hope others get it running much easier then I. Is this stuff ready for prime time? (Doc, programs and all)

My current state is below:

$ vgscan
vgscan -- reading all physical volumes (this may take a while...)
vgscan -- no volume groups found
Quoted 33 lines
$ pvcreate /dev/hda8
pvcreate -- reinitializing physical volume
pvcreate -- physical volume "/dev/hda8" successfully created
$ vgcreate main_vg /dev/hda8
Segmentation fault (core dumped)
Quoted 25 lines

-------- Original Message --------
Date: Sat, 29 Jan 2000 13:41:49 -0600
Resent-Date: Sat, 29 Jan 2000 21:14:28 MEZ
From: Chris Anderson <[email protected]>
Organization: Alwan, Inc.
Subject: Trouble 2.2.14 setup - unresolved symbol lvm_map_ptr (My first time)

Ok this is my first try at LVM and I did not get it working.

I ran the 2.2.13 patch on the linux source and it seemed to compile file. I want to setup LVM as a module so I set the flag in the config to module. Do all the compiles then after a reboot i run the below commands. Note I did poke around in the doc and found nothing.

$ depmod -a
/lib/modules/2.2.14/block/lvm.o: unresolved symbol(s)
$ modprobe lvm
/lib/modules/2.2.14/block/lvm.o: unresolved symbol lvm_map_ptr

It looks like something is wrong. Any help please? I hope this is a easy one.

[email protected]

Content-Description: S/MIME Cryptographic Signature

[Attachment, skipping...]

--

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Quoted 9 lines
Quoted 9 lines

Systemmanagement CS-TS T-Nova
Entwicklungszentrum Darmstadt
Heinz Mauelshagen Otto-Roehm-Strasse 71c
Senior Systems Engineer Postfach 10 05 41

                                                 64205 Darmstadt
[email protected]                      Germany
                                                 +49 6151 886-425
                                                          FAX-386

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Content-Description: S/MIME Cryptographic Signature

[Attachment, skipping...]

Signature · 11 lines
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Systemmanagement CS-TS                           T-Nova
                                                 Entwicklungszentrum Darmstadt
Heinz Mauelshagen                                Otto-Roehm-Strasse 71c
Senior Systems Engineer                          Postfach 10 05 41
                                                 64205 Darmstadt
[email protected]                      Germany
                                                 +49 6151 886-425
                                                          FAX-386
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#5 lore raw
Quoted 14 lines · Heinz Mauelshagen
Quoted 6 lines
Quoted 2 lines · Heinz Mauelshagen

Please have a look at the BUGS file on the <ftp://linux.msede.com/lvm/v0.8> as well. The fixes in there should help.

Thanks. I just found that right before this email.

Good.

Quoted 5 lines

Not that this is a big problem but maybe a little bug:

$ vgdisplay -A
Segmentation fault (core dumped)
$  /sbin/vgdisplay -dA
lvm_check_kernel_lvmtab_consistency -- CALLED
vg_check_active_all_vg -- CALLED
vg_status_get_count -- CALLED
vg_status_get_count -- LEAVING with ret: 0  and  count: 1
vg_status_get_namelist -- CALLED
vg_status_get_namelist -- LEAVING
vg_check_active_all_vg -- LEAVING
lvm_tab_vg_check_exist_all_vg -- CALLED
lvm_tab_read -- CALLED
lvm_tab_read -- LEAVING with ret: 0  data: 804B740  size: 8
lvm_tab_vg_check_exist_all_vg -- LEAVING with ret: 0
lvm_check_kernel_lvmtab_consistency -- LEAVING with ret: 1
lvm_get_iop_version -- CALLED
lvm_get_iop_version -- AFTER ioctl ret: 0
lvm_get_iop_version -- LEAVING with ret: 0
vg_check_active_all_vg -- CALLED
vg_status_get_count -- CALLED
vg_status_get_count -- LEAVING with ret: 0  and  count: 1
vg_status_get_namelist -- CALLED
vg_status_get_namelist -- LEAVING
vg_check_active_all_vg -- LEAVING
vg_check_name -- CALLED
vg_check_name -- vg_name: "main_vg"
lvm_check_chars -- CALLED
lvm_check_chars -- LEAVING
vg_check_name -- LEAVING with ret: 0
lvm_tab_vg_check_exist -- CALLED with vg_name: "main_vg"
vg_check_name -- CALLED
vg_check_name -- vg_name: "main_vg"
lvm_check_chars -- CALLED
lvm_check_chars -- LEAVING
vg_check_name -- LEAVING with ret: 0
lvm_tab_read -- CALLED
Segmentation fault
Quoted 114 lines

Could you provide the output of "vgdisplay -dA" to analyze this?

Quoted 4 lines

I did this after I "vgcreate test_vg /dev/hda8". It looks like
"tool/lib/vg_check_active.c" has the same bug as
"tools/lib/lvm_tab_vg_check_exist_all_vg.c". I think core dump are problems no?

Yep ;-{(

Quoted 6 lines

I think this project is important for the Linux people, they just do not know that a Volume manager is the only way to split up drives and now that drives are bigger. Well..

I hope to help by my input

Yes, i appreciate this.

Quoted 2 lines

so please do not think I am not happy to have acess to this software and this newgroup.

Not at all.

Heinz

Quoted 61 lines
Quoted 61 lines

Heinz

Quoted 15 lines

Started from scratch (new kernel code and lvm patch) and got it to work. At least that part. Now I am getting a core dump. I will work this out too I guess.

I use veritas every other day in my job as a DBA and it works real nice. I wish the install for LVM was as easy. If this stuff does get into the common source I hope others get it running much easier then I. Is this stuff ready for prime time? (Doc, programs and all)

My current state is below:

$ vgscan
vgscan -- reading all physical volumes (this may take a while...)
vgscan -- no volume groups found
Quoted 33 lines
$ pvcreate /dev/hda8
pvcreate -- reinitializing physical volume
pvcreate -- physical volume "/dev/hda8" successfully created
$ vgcreate main_vg /dev/hda8
Segmentation fault (core dumped)
Quoted 25 lines

-------- Original Message --------
Date: Sat, 29 Jan 2000 13:41:49 -0600
Resent-Date: Sat, 29 Jan 2000 21:14:28 MEZ
From: Chris Anderson <[email protected]>
Organization: Alwan, Inc.
Subject: Trouble 2.2.14 setup - unresolved symbol lvm_map_ptr (My first time)

Ok this is my first try at LVM and I did not get it working.

I ran the 2.2.13 patch on the linux source and it seemed to compile file. I want to setup LVM as a module so I set the flag in the config to module. Do all the compiles then after a reboot i run the below commands. Note I did poke around in the doc and found nothing.

$ depmod -a
/lib/modules/2.2.14/block/lvm.o: unresolved symbol(s)
$ modprobe lvm
/lib/modules/2.2.14/block/lvm.o: unresolved symbol lvm_map_ptr

It looks like something is wrong. Any help please? I hope this is a easy one.

[email protected]

Content-Description: S/MIME Cryptographic Signature

[Attachment, skipping...]

--

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Quoted 9 lines
Quoted 9 lines

Systemmanagement CS-TS T-Nova
Entwicklungszentrum Darmstadt
Heinz Mauelshagen Otto-Roehm-Strasse 71c
Senior Systems Engineer Postfach 10 05 41

                                                 64205 Darmstadt
[email protected]                      Germany
                                                 +49 6151 886-425
                                                          FAX-386

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Content-Description: S/MIME Cryptographic Signature

[Attachment, skipping...]

--

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Systemmanagement CS-TS T-Nova
Entwicklungszentrum Darmstadt
Heinz Mauelshagen Otto-Roehm-Strasse 71c
Senior Systems Engineer Postfach 10 05 41

                                                 64205 Darmstadt
[email protected]                      Germany
                                                 +49 6151 886-425
                                                          FAX-386

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

#6 lore raw
Quoted 44 lines
Quoted 14 lines · Heinz Mauelshagen
Quoted 6 lines
Quoted 2 lines · Heinz Mauelshagen

Please have a look at the BUGS file on the <ftp://linux.msede.com/lvm/v0.8> as well. The fixes in there should help.

Thanks. I just found that right before this email.

Good.

Quoted 5 lines

Not that this is a big problem but maybe a little bug:

$ vgdisplay -A
Segmentation fault (core dumped)
$  /sbin/vgdisplay -dA
lvm_check_kernel_lvmtab_consistency -- CALLED
vg_check_active_all_vg -- CALLED
vg_status_get_count -- CALLED
vg_status_get_count -- LEAVING with ret: 0  and  count: 1
vg_status_get_namelist -- CALLED
vg_status_get_namelist -- LEAVING
vg_check_active_all_vg -- LEAVING
lvm_tab_vg_check_exist_all_vg -- CALLED
lvm_tab_read -- CALLED
lvm_tab_read -- LEAVING with ret: 0  data: 804B740  size: 8
lvm_tab_vg_check_exist_all_vg -- LEAVING with ret: 0
lvm_check_kernel_lvmtab_consistency -- LEAVING with ret: 1
lvm_get_iop_version -- CALLED
lvm_get_iop_version -- AFTER ioctl ret: 0
lvm_get_iop_version -- LEAVING with ret: 0
vg_check_active_all_vg -- CALLED
vg_status_get_count -- CALLED
vg_status_get_count -- LEAVING with ret: 0  and  count: 1
vg_status_get_namelist -- CALLED
vg_status_get_namelist -- LEAVING
vg_check_active_all_vg -- LEAVING
vg_check_name -- CALLED
vg_check_name -- vg_name: "main_vg"
lvm_check_chars -- CALLED
lvm_check_chars -- LEAVING
vg_check_name -- LEAVING with ret: 0
Quoted 9 lines
lvm_tab_vg_check_exist -- CALLED with vg_name: "main_vg"
vg_check_name -- CALLED
vg_check_name -- vg_name: "main_vg"
lvm_check_chars -- CALLED
lvm_check_chars -- LEAVING
vg_check_name -- LEAVING with ret: 0
lvm_tab_read -- CALLED
Segmentation fault

<SNIP>

Would you please be so kind as to change "free ( data);" to

   if ( data != NULL) {
      free ( data);
      data = NULL;
   } 

and recompile/retry.

Heinz

Signature · 11 lines
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Systemmanagement CS-TS                           T-Nova
                                                 Entwicklungszentrum Darmstadt
Heinz Mauelshagen                                Otto-Roehm-Strasse 71c
Senior Systems Engineer                          Postfach 10 05 41
                                                 64205 Darmstadt
[email protected]                      Germany
                                                 +49 6151 886-425
                                                          FAX-386
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#7 lore raw
Quoted 54 lines · Heinz Mauelshagen
Quoted 44 lines
Quoted 14 lines · Heinz Mauelshagen
Quoted 6 lines
Quoted 2 lines · Heinz Mauelshagen

Please have a look at the BUGS file on the <ftp://linux.msede.com/lvm/v0.8> as well. The fixes in there should help.

Thanks. I just found that right before this email.

Good.

Quoted 5 lines

Not that this is a big problem but maybe a little bug:

$ vgdisplay -A
Segmentation fault (core dumped)
$  /sbin/vgdisplay -dA
lvm_check_kernel_lvmtab_consistency -- CALLED
vg_check_active_all_vg -- CALLED
vg_status_get_count -- CALLED
vg_status_get_count -- LEAVING with ret: 0  and  count: 1
vg_status_get_namelist -- CALLED
vg_status_get_namelist -- LEAVING
vg_check_active_all_vg -- LEAVING
lvm_tab_vg_check_exist_all_vg -- CALLED
lvm_tab_read -- CALLED
lvm_tab_read -- LEAVING with ret: 0  data: 804B740  size: 8
lvm_tab_vg_check_exist_all_vg -- LEAVING with ret: 0
lvm_check_kernel_lvmtab_consistency -- LEAVING with ret: 1
lvm_get_iop_version -- CALLED
lvm_get_iop_version -- AFTER ioctl ret: 0
lvm_get_iop_version -- LEAVING with ret: 0
vg_check_active_all_vg -- CALLED
vg_status_get_count -- CALLED
vg_status_get_count -- LEAVING with ret: 0  and  count: 1
vg_status_get_namelist -- CALLED
vg_status_get_namelist -- LEAVING
vg_check_active_all_vg -- LEAVING
vg_check_name -- CALLED
vg_check_name -- vg_name: "main_vg"
lvm_check_chars -- CALLED
lvm_check_chars -- LEAVING
vg_check_name -- LEAVING with ret: 0
Quoted 9 lines
lvm_tab_vg_check_exist -- CALLED with vg_name: "main_vg"
vg_check_name -- CALLED
vg_check_name -- vg_name: "main_vg"
lvm_check_chars -- CALLED
lvm_check_chars -- LEAVING
vg_check_name -- LEAVING with ret: 0
lvm_tab_read -- CALLED
Segmentation fault
Quoted 8 lines

<SNIP>

Would you please be so kind as to change "free ( data);" to

   if ( data != NULL) {
      free ( data);
      data = NULL;
   }

Only found one of these in lvm_tab_vg_check_exist.c

But it cores in the lvm_tab_read.c function at the else if

around line 70 (not sure because of my debug code)

The below code is the problem.

         else if ( ( buffer = malloc ( stat_b.st_size)) == NULL) {
           ret =  -LVM_ELVM_TAB_READ_MALLOC;

I placed debug statements in it to see this.

Note that stat_b.st_size = 8

I hope this helps. I do not know enough (yet) about the code to know what buffer is and why it is setup this way.

Quoted 18 lines

and recompile/retry.

Heinz
--

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Systemmanagement CS-TS T-Nova
Entwicklungszentrum Darmstadt
Heinz Mauelshagen Otto-Roehm-Strasse 71c
Senior Systems Engineer Postfach 10 05 41

                                                 64205 Darmstadt
[email protected]                      Germany
                                                 +49 6151 886-425
                                                          FAX-386

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

#8 lore raw

Chris,
IMO there's no obvious reason, why it should core there with size == 8.

Do you have an old libc in place by accident which might give us a reason to assume an broken malloc()?
If so: try with an actual one.

Any ideas from other list members?

Heinz

Quoted 89 lines
Quoted 54 lines · Heinz Mauelshagen
Quoted 44 lines
Quoted 14 lines · Heinz Mauelshagen
Quoted 6 lines
Quoted 2 lines · Heinz Mauelshagen

Please have a look at the BUGS file on the <ftp://linux.msede.com/lvm/v0.8> as well. The fixes in there should help.

Thanks. I just found that right before this email.

Good.

Quoted 5 lines

Not that this is a big problem but maybe a little bug:

$ vgdisplay -A
Segmentation fault (core dumped)
$  /sbin/vgdisplay -dA
lvm_check_kernel_lvmtab_consistency -- CALLED
vg_check_active_all_vg -- CALLED
vg_status_get_count -- CALLED
vg_status_get_count -- LEAVING with ret: 0  and  count: 1
vg_status_get_namelist -- CALLED
vg_status_get_namelist -- LEAVING
vg_check_active_all_vg -- LEAVING
lvm_tab_vg_check_exist_all_vg -- CALLED
lvm_tab_read -- CALLED
lvm_tab_read -- LEAVING with ret: 0  data: 804B740  size: 8
lvm_tab_vg_check_exist_all_vg -- LEAVING with ret: 0
lvm_check_kernel_lvmtab_consistency -- LEAVING with ret: 1
lvm_get_iop_version -- CALLED
lvm_get_iop_version -- AFTER ioctl ret: 0
lvm_get_iop_version -- LEAVING with ret: 0
vg_check_active_all_vg -- CALLED
vg_status_get_count -- CALLED
vg_status_get_count -- LEAVING with ret: 0  and  count: 1
vg_status_get_namelist -- CALLED
vg_status_get_namelist -- LEAVING
vg_check_active_all_vg -- LEAVING
vg_check_name -- CALLED
vg_check_name -- vg_name: "main_vg"
lvm_check_chars -- CALLED
lvm_check_chars -- LEAVING
vg_check_name -- LEAVING with ret: 0
Quoted 9 lines
lvm_tab_vg_check_exist -- CALLED with vg_name: "main_vg"
vg_check_name -- CALLED
vg_check_name -- vg_name: "main_vg"
lvm_check_chars -- CALLED
lvm_check_chars -- LEAVING
vg_check_name -- LEAVING with ret: 0
lvm_tab_read -- CALLED
Segmentation fault
Quoted 8 lines

<SNIP>

Would you please be so kind as to change "free ( data);" to

   if ( data != NULL) {
      free ( data);
      data = NULL;
   }

Only found one of these in lvm_tab_vg_check_exist.c

But it cores in the lvm_tab_read.c function at the else if

around line 70 (not sure because of my debug code)

The below code is the problem.

         else if ( ( buffer = malloc ( stat_b.st_size)) == NULL) {
           ret =  -LVM_ELVM_TAB_READ_MALLOC;

I placed debug statements in it to see this.

Note that stat_b.st_size = 8

I hope this helps. I do not know enough (yet) about the code to know what buffer is and why it is setup this way.

Quoted 6 lines

and recompile/retry.

Heinz
--

Signature · 11 lines
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Systemmanagement CS-TS                           T-Nova
                                                 Entwicklungszentrum Darmstadt
Heinz Mauelshagen                                Otto-Roehm-Strasse 71c
Senior Systems Engineer                          Postfach 10 05 41
                                                 64205 Darmstadt
[email protected]                      Germany
                                                 +49 6151 886-425
                                                          FAX-386
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#9 lore raw
Quoted 7 lines

IMO there's no obvious reason, why it should core there with size == 8.

Do you have an old libc in place by accident which might give us a reason to assume an broken malloc()?
If so: try with an actual one.

Any ideas from other list members?

Conventional wisdom tells that when malloc crashes the free list (aka arena) has been trashed. This can happen eg. by a double free (some malloc versions check against this) or by writing beyond the end of a buffer.

You might want to try the following:
env MALLOC_CHECK_=1 vgcreate ...

This will use a debugging version of malloc which might print sone diagnostics to stderr if a problem is encountered.

see malloc(3) for additional information.

Hope this helps
Michael

--

Michael Marxmeier           Marxmeier Software AG
E-Mail: [email protected]      Besenbruchstrasse 9
Phone : +49 202 2431440     42285 Wuppertal, Germany
Fax   : +49 202 2431420     http://www.msede.com/
#10 lore raw
Quoted 8 lines · Michael Marxmeier
Quoted 7 lines

IMO there's no obvious reason, why it should core there with size == 8.

Do you have an old libc in place by accident which might give us a reason to assume an broken malloc()?
If so: try with an actual one.

Any ideas from other list members?

Quoted 7 lines

Conventional wisdom tells that when malloc crashes the free list (aka arena) has been trashed. This can happen eg. by a double free (some malloc versions check against this) or by writing beyond the end of a buffer.

You might want to try the following:
env MALLOC_CHECK_=1 vgcreate ...

[...]

Another way is to run it under Electric Fence. This has better checking than MALLOC_CHECK_.

BTW, the function could be made shorter by using mmap on the file instead of malloc+read.

-Andi

#11 lore raw
In reply to Michael Marxmeier
Quoted 8 lines · Michael Marxmeier
Quoted 7 lines

IMO there's no obvious reason, why it should core there with size == 8.

Do you have an old libc in place by accident which might give us a reason to assume an broken malloc()?
If so: try with an actual one.

Any ideas from other list members?

Quoted 8 lines

Conventional wisdom tells that when malloc crashes the free list (aka arena) has been trashed. This can happen eg. by a double free (some malloc versions check against this) or by writing beyond the end of a buffer.

You might want to try the following:
env MALLOC_CHECK_=1 vgcreate ...

This is printed out when I set the check. Also it does not crash if I set it to 1.

malloc: using debugging hooks
realloc(): invalid pointer 0x804b730!

Whats next? Should I look for a double free?

Quoted 14 lines

This will use a debugging version of malloc which might print sone diagnostics to stderr if a problem is encountered.

see malloc(3) for additional information.

Hope this helps
Michael

--

Michael Marxmeier           Marxmeier Software AG
E-Mail: [email protected]      Besenbruchstrasse 9
Phone : +49 202 2431440     42285 Wuppertal, Germany
Fax   : +49 202 2431420     http://www.msede.com/
#12 lore raw
Quoted 5 lines · Chris Anderson
Quoted 2 lines · Michael Marxmeier

You might want to try the following:
env vgcreate ...

Quoted 7 lines

This is printed out when I set the check. Also it does not crash if I set it to 1.

malloc: using debugging hooks
realloc(): invalid pointer 0x804b730!

Whats next? Should I look for a double free?

Probably. If you set MALLOC_CHECK_=2 you get an instanteous core dump (by the virtue of abort()) so you can fire up your favourite debugger and look the call chain.

This suspicously looks like the bug documented in
http://linux/lvm/doc/BUGS

You _did_ make the suggested fix for
tools/lib/lvm_tab_vg_check_exist_all_vg.c ?

Michael

Signature · 4 lines
Michael Marxmeier           Marxmeier Software AG
E-Mail: [email protected]      Besenbruchstrasse 9
Phone : +49 202 2431440     42285 Wuppertal, Germany
Fax   : +49 202 2431420     http://www.msede.com/
#13 lore raw

Re: [linux-lvm] Trouble 2.2.14 setup (My first time)

Quoted 18 lines · Michael Marxmeier
Quoted 5 lines · Chris Anderson
Quoted 2 lines · Michael Marxmeier

You might want to try the following:
env vgcreate ...

Quoted 7 lines

This is printed out when I set the check. Also it does not crash if I set it to 1.

malloc: using debugging hooks
realloc(): invalid pointer 0x804b730!

Whats next? Should I look for a double free?

Probably. If you set MALLOC_CHECK_=2 you get an instanteous core dump (by the virtue of abort()) so you can fire up your favourite debugger and look the call chain.

Quoted 5 lines

This suspicously looks like the bug documented in
http://linux/lvm/doc/BUGS

You _did_ make the suggested fix for
tools/lib/lvm_tab_vg_check_exist_all_vg.c ?

Yes, I did what the bug list asked me to do. That is how I got the other tools to work.

I do not see where the "vgdisplay -A" command uses that area of code from the bug list.

Quoted 9 lines

Michael

--

Michael Marxmeier           Marxmeier Software AG
E-Mail: [email protected]      Besenbruchstrasse 9
Phone : +49 202 2431440     42285 Wuppertal, Germany
Fax   : +49 202 2431420     http://www.msede.com/