Bug#809685: lvm2 on sparc64 = bus error

2016-02-11 Thread Anatoly Pugachev
On Tue, Feb 9, 2016 at 10:58 PM, John Paul Adrian Glaubitz
 wrote:
>
> On 02/09/2016 08:15 PM, Anatoly Pugachev wrote:
> > continue from https://bugs.debian.org/809685
>
> You don't have to mention the previous bug report here, your
> message is automatically appended to the existing bug report
> the moment you CC the bug report's address :).
>
> > if I get lvm2 source from git , compile and try to run , there's no "bus 
> > error":
> > (...)
> > root@deb4g:/mnt/1/lvm2# tools/lvm version
> >   LVM version: 2.02.142(2)-git (2016-01-25)
> >   Library version: 1.02.116-git (2016-01-25)
> >   Driver version:  4.34.0
>
> Interesting. Can you post the version numbers for lvm2 taken from
> the Debian package? I have had a look at the lvm2 git repository
> and there don't seem be any big changes after 2.02.142 which
> could cause this issue. If we can pinpoint the change that fixed
> the bug, we could just cherry-pick the necessary patch.


upstream commit
https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=0baf66a992fbac92fa2c30e9bb8e74a5535ff45a

pulling latest git source code for lvm2 , compiling with debian
./configure options (taken from last lvm2 package log from
https://buildd.debian.org/status/fetch.php?pkg=lvm2=sparc64=2.02.141-2=1454711070
) and running , does not return bus error.

PS: thanks for fix to Zdenek Kabelac 



Bug#809685: lvm2 on sparc64 = bus error

2016-02-09 Thread Anatoly Pugachev

continue from https://bugs.debian.org/809685

updated to 2.02.141-2 , still "bus error":

mator@deb4g:/mnt/1$ dpkg -l lvm2
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ NameVersion  Architecture 
Description
+++-===---=
ii  lvm22.02.141-2   sparc64  
Linux Logical Volume Manager
mator@deb4g:/mnt/1$ /sbin/lvm lvs
  WARNING: Running as a non-root user. Functionality may be unavailable.
Bus error

if I get lvm2 source from git , compile and try to run , there's no "bus error":

mator@deb4g:/mnt/1$ git clone https://git.fedorahosted.org/git/lvm2.git 
mator@deb4g:/mnt/1$ cd lvm2
mator@deb4g:/mnt/1/lvm2$ ./configure && make -j
mator@deb4g:/mnt/1/lvm2$ find . -name lvm
./tools/lvm
mator@deb4g:/mnt/1/lvm2$ sudo -s
root@deb4g:/mnt/1/lvm2# export LD_LIBRARY_PATH=./libdm
root@deb4g:/mnt/1/lvm2# tools/lvm lvs
root@deb4g:/mnt/1/lvm2# tools/lvm pvs
root@deb4g:/mnt/1/lvm2# tools/lvm pvcreate /dev/vdiske1 
  Physical volume "/dev/vdiske1" successfully created
root@deb4g:/mnt/1/lvm2# tools/lvm pvcreate /dev/vdiske2
  Physical volume "/dev/vdiske2" successfully created
root@deb4g:/mnt/1/lvm2# tools/lvm pvs
  PV   VG   Fmt  Attr PSize   PFree  
  /dev/vdiske1  lvm2 ---  953.00m 953.00m
  /dev/vdiske2  lvm2 ---  953.00m 953.00m
root@deb4g:/mnt/1/lvm2# tools/lvm vgs
root@deb4g:/mnt/1/lvm2# tools/lvm vgcreate vg1 /dev/vdiske1 /dev/vdiske2
  Volume group "vg1" successfully created
root@deb4g:/mnt/1/lvm2# tools/lvm lvcreate -n vg1/lv1 -L100M
  Logical volume "lv1" created.
root@deb4g:/mnt/1/lvm2# mkfs.ext4 /dev/vg1/lv1
mke2fs 1.43-WIP (18-May-2015)
Creating filesystem with 102400 1k blocks and 25688 inodes
Filesystem UUID: ae62d8e9-37fb-4282-a536-3a529739817c
Superblock backups stored on blocks: 
8193, 24577, 40961, 57345, 73729

Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done 

root@deb4g:/mnt/1/lvm2# mkdir /lvtest
root@deb4g:/mnt/1/lvm2# mount /dev/vg1/lv1 /lvtest
root@deb4g:/mnt/1/lvm2# 
root@deb4g:/mnt/1/lvm2# tools/lvm version
  LVM version: 2.02.142(2)-git (2016-01-25)
  Library version: 1.02.116-git (2016-01-25)
  Driver version:  4.34.0



Bug#809685: lvm2 on sparc64 = bus error

2016-02-09 Thread John Paul Adrian Glaubitz
Hi Anatoly!

On 02/09/2016 08:15 PM, Anatoly Pugachev wrote:
> continue from https://bugs.debian.org/809685

You don't have to mention the previous bug report here, your
message is automatically appended to the existing bug report
the moment you CC the bug report's address :).

> if I get lvm2 source from git , compile and try to run , there's no "bus 
> error":
> (...)
> root@deb4g:/mnt/1/lvm2# tools/lvm version
>   LVM version: 2.02.142(2)-git (2016-01-25)
>   Library version: 1.02.116-git (2016-01-25)
>   Driver version:  4.34.0

Interesting. Can you post the version numbers for lvm2 taken from
the Debian package? I have had a look at the lvm2 git repository
and there don't seem be any big changes after 2.02.142 which
could cause this issue. If we can pinpoint the change that fixed
the bug, we could just cherry-pick the necessary patch.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913



Bug#809685: lvm2 on sparc64 = bus error

2016-01-02 Thread Anatoly Pugachev
Package: lvm2
Version: 2.02.138-1
Severity: important

Dear Maintainer,


   * What led up to the situation?

installed sid/unstable to sparc64 LDOM, any commands from lvm2 give "bus error":

root@deb2g:~# lvm vgs
Bus error
root@deb2g:~# lvm pvs
Bus error
root@deb2g:~# lvm lvs
Bus error

   * What exactly did you do (or not do) that was effective (or
 ineffective)?


I have to recompile lvm2 debian package with debug info, to provide a
more useful bug report:

$ export DEB_BUILD_OPTIONS="debug nostrip noopt"
$ fakeroot apt-get source -b lvm2
$ dpkg -i *.deb

set ulimit -c to unlimited and generated core dump:

root@deb2g:~# lvm lvs
Bus error (core dumped)

root@deb2g:~/lvm2-2.02.138/lib# gdb -c ~/core lvm
GNU gdb (Debian 7.10-1) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "sparc64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from lvm...done.
[New LWP 49239]
BFD: /usr/lib/debug/.build-id/4d/44c0a548a67dd7e04cca0de97c0484075b1f26.debug:
unable to initialize decompress status for section .debug_aranges
BFD: /usr/lib/debug/.build-id/4d/44c0a548a67dd7e04cca0de97c0484075b1f26.debug:
unable to initialize decompress status for section .debug_aranges

warning: File 
"/usr/lib/debug/.build-id/4d/44c0a548a67dd7e04cca0de97c0484075b1f26.debug"
has no build-id, file skipped
BFD: /usr/lib/debug/.build-id/3e/3e3a164f7512b8b3b9928318ec5c82273f6bc5.debug:
unable to initialize decompress status for section .debug_aranges
BFD: /usr/lib/debug/.build-id/3e/3e3a164f7512b8b3b9928318ec5c82273f6bc5.debug:
unable to initialize decompress status for section .debug_aranges

warning: File 
"/usr/lib/debug/.build-id/3e/3e3a164f7512b8b3b9928318ec5c82273f6bc5.debug"
has no build-id, file skipped
BFD: /usr/lib/debug/.build-id/7c/c7de128525bd40eb138195d0a5497bafa265e5.debug:
unable to initialize decompress status for section .debug_aranges
BFD: /usr/lib/debug/.build-id/7c/c7de128525bd40eb138195d0a5497bafa265e5.debug:
unable to initialize decompress status for section .debug_aranges

warning: File 
"/usr/lib/debug/.build-id/7c/c7de128525bd40eb138195d0a5497bafa265e5.debug"
has no build-id, file skipped
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/sparc64-linux-gnu/libthread_db.so.1".
BFD: /usr/lib/debug/.build-id/8d/42f401d8a2edf007e528345360f24bb4765b77.debug:
unable to initialize decompress status for section .debug_aranges
BFD: /usr/lib/debug/.build-id/8d/42f401d8a2edf007e528345360f24bb4765b77.debug:
unable to initialize decompress status for section .debug_aranges

warning: File 
"/usr/lib/debug/.build-id/8d/42f401d8a2edf007e528345360f24bb4765b77.debug"
has no build-id, file skipped
BFD: /usr/lib/debug/.build-id/a5/a9e43ad4150d898711c1e541aeae3effb7fd6c.debug:
unable to initialize decompress status for section .debug_aranges
BFD: /usr/lib/debug/.build-id/a5/a9e43ad4150d898711c1e541aeae3effb7fd6c.debug:
unable to initialize decompress status for section .debug_aranges

warning: File 
"/usr/lib/debug/.build-id/a5/a9e43ad4150d898711c1e541aeae3effb7fd6c.debug"
has no build-id, file skipped
Core was generated by `lvm lvs'.
Program terminated with signal SIGUSR1, User defined signal 1.
#0  0x0115740c in calc_crc (initial=0, buf=0x1345a0a
"a|.*/|", size=6) at misc/crc.c:69
69  crc = crc ^ xlate32(*start++);
(gdb) bt
#0  0x0115740c in calc_crc (initial=0, buf=0x1345a0a
"a|.*/|", size=6) at misc/crc.c:69
#1  0x01199f20 in lvmetad_set_token (filter=0x13459e8) at
cache/lvmetad.c:190
#2  0x010a126c in _init_lvmetad (cmd=0x1335000) at
commands/toolcontext.c:1686
#3  0x010a1410 in init_connections (cmd=0x1335000) at
commands/toolcontext.c:1718
#4  0x01053868 in lvm_run_command (cmd=0x1335000, argc=0,
argv=0x7feffafbca8) at lvmcmdline.c:1564
#5  0x010564e0 in lvm2_main (argc=1, argv=0x7feffafbca0) at
lvmcmdline.c:2121
#6  0x01087d80 in main (argc=2, argv=0x7feffafbc98) at lvm.c:22
(gdb)



-- System Information:
Debian Release: stretch/sid
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: sparc64

Kernel: Linux 4.3.0-1-sparc64-smp (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages lvm2 depends on:
ii  dmeventd