Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

centos 8 stream + "scl enable gcc-toolset-10 bash" + "make rpms" = brokern rpmDB or hand rpmbuild #12168

Closed
slavonnet opened this issue May 31, 2021 · 3 comments
Labels
Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@slavonnet
Copy link

subject. rpmdb may be fixed by rpmdb --rebuilddb

Executing(%clean): /bin/sh -e /tmp/zfs-build-root-O3Ukni3p/TMP/rpm-tmp.25OgrY
+ umask 022
+ cd /tmp/zfs-build-root-O3Ukni3p/BUILD
+ cd zfs-2.1.99
+ '[' /tmp/zfs-build-root-O3Ukni3p/BUILDROOT/zfs-dkms-2.1.99-247_g8d5f211fc.el8.x86_64 '!=' / ']'
+ rm -rf /tmp/zfs-build-root-O3Ukni3p/BUILDROOT/zfs-dkms-2.1.99-247_g8d5f211fc.el8.x86_64
+ exit 0
Executing(--clean): /bin/sh -e /tmp/zfs-build-root-O3Ukni3p/TMP/rpm-tmp.ZbJm11
+ umask 022
+ cd /tmp/zfs-build-root-O3Ukni3p/BUILD
+ rm -rf zfs-2.1.99
+ exit 0
error: rpmdb: BDB1547 environment reference count went negative
make[1]: выход из каталога «/root/zfs»

make[2]: Leaving directory '/root/zfs'
Installing zfs-dkms-2.1.99-247_g8d5f211fc.el8.src.rpm
error: rpmdb: BDB0113 Thread/process 888798/140574157304640 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 -  (-30973)
error: cannot open Packages database in /var/lib/rpm
error: rpmdb: BDB0113 Thread/process 888798/140574157304640 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 -  (-30973)
error: cannot open Packages database in /var/lib/rpm

+ exit 0
Executing(--clean): /bin/sh -e /tmp/zfs-build-root-hqxM84b8/TMP/rpm-tmp.e6daal
+ umask 022
+ cd /tmp/zfs-build-root-hqxM84b8/BUILD
+ rm -rf zfs-2.1.99
+ exit 0
/bin/sh: line 13: 999165 Segmentation fault      (core dumped) LANG=C rpmbuild --define "_tmppath $rpmbuild/TMP" --define "_topdir $rpmbuild" --define "_without_debug 1" --define "_without_debuginfo 1" --define "_without_debug_kmem 1" --define "_without_debug_kmem_tracking 1" --define "_without_asan 1" --rebuild $rpmpkg
make[1]: *** [Makefile:1669: rpm-common] Error 1
make[1]: Leaving directory '/root/zfs'
make: *** [Makefile:1612: rpm-dkms] Error 2

[root@vm2 zfs]# dmesg | tail
[768316.916357] NFSD: starting 90-second grace period (net f00000a8)
[768349.149015] NFSD: all clients done reclaiming, ending NFSv4 grace period (net f00000a8)
[1242093.488747] traps: rpmbuild[174036] general protection fault ip:7f8f7ac9b82d sp:7ffc6842cfc0 error:0 in libdb-5.3.so[7f8f7abb5000+1ba000]
[1242168.887957] traps: rpmbuild[207867] general protection fault ip:7f79aa24882d sp:7ffc801c63e0 error:0 in libdb-5.3.so[7f79aa162000+1ba000]
[1242301.167488] traps: rpmbuild[283285] general protection fault ip:7fae86c3982d sp:7ffeab07f420 error:0 in libdb-5.3.so[7fae86b53000+1ba000]
[1242371.121661] traps: rpmbuild[309038] general protection fault ip:7f281f82282d sp:7ffdd55e6a10 error:0 in libdb-5.3.so[7f281f73c000+1ba000]
[1242561.837446] traps: rpmbuild[370187] general protection fault ip:7f972d43082d sp:7fff07bafeb0 error:0 in libdb-5.3.so[7f972d34a000+1ba000]
[1243282.545012] traps: rpmbuild[769141] general protection fault ip:7fe67c4bd82d sp:7fff041956d0 error:0 in libdb-5.3.so[7fe67c3d7000+1ba000]
[1243620.445644] traps: rpmbuild[888798] general protection fault ip:7fd9f76bb82d sp:7ffdc507f910 error:0 in libdb-5.3.so[7fd9f75d5000+1ba000]
[1243788.291795] traps: rpmbuild[999165] general protection fault ip:7f3083cda82d sp:7ffe9d842bc0 error:0 in libdb-5.3.so[7f3083bf4000+1ba000]

@slavonnet slavonnet added Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang) labels May 31, 2021
@slavonnet slavonnet changed the title centos 8 stream + "scl enable gcc-toolset-10 bash" + "make rpms" = brokern rpmDB or hand rpmbyuld centos 8 stream + "scl enable gcc-toolset-10 bash" + "make rpms" = brokern rpmDB or hand rpmbuild May 31, 2021
@rincebrain
Copy link
Contributor

Sounds like #12071 to me; I recommend some combination of "don't rpmbuild as root" and "get your distro to pull the fix mentioned in the redhat bug linked in there".

@slavonnet
Copy link
Author

yes. in non root user all is ok

@rincebrain
Copy link
Contributor

Okay, since I couldn't seem to convince anyone to report it to someone who could fix it, I've gone and done it, and hopefully it'll trickle out to everyone else if they fix it (and if they don't, then I learned something about CentOS.)

(I know you could be using OEL or RHEL or some other distaff cousin I've not thought of, I just figured it would probably flow out if I got it fixed in one place, plus CentOS is what I have access to.)

rincebrain added a commit to rincebrain/zfs that referenced this issue Jun 1, 2021
Having an old enough version of "file" and no "uncompress" program
installed can cause rpmbuild as root to crash and mangle rpmdb.

So let's check for uncompress and the version of file, and if the
latter is too old and the former is absent, refuse to build rpm
targets.

Closes: openzfs#12071
Closes: openzfs#12168

Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
rincebrain added a commit to rincebrain/zfs that referenced this issue Jun 4, 2021
Having an old enough version of "file" and no "uncompress" program
installed can cause rpmbuild as root to crash and mangle rpmdb.

So let's add a build dependency for RPM-based systems.

Closes: openzfs#12071
Closes: openzfs#12168

Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
rincebrain added a commit to rincebrain/zfs that referenced this issue Jun 4, 2021
Having an old enough version of "file" and no "uncompress" program
installed can cause rpmbuild as root to crash and mangle rpmdb.

So let's add a build dependency for RPM-based systems.

Closes: openzfs#12071
Closes: openzfs#12168

Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
rincebrain added a commit to rincebrain/zfs that referenced this issue Jun 4, 2021
Having an old enough version of "file" and no "uncompress" program
installed can cause rpmbuild as root to crash and mangle rpmdb.

So let's add a build dependency for RPM-based systems.

Closes: openzfs#12071
Closes: openzfs#12168

Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
@jwk404 jwk404 closed this as completed in 1a345d6 Jun 11, 2021
behlendorf pushed a commit that referenced this issue Jun 16, 2021
Having an old enough version of "file" and no "uncompress" program
installed can cause rpmbuild as root to crash and mangle rpmdb.

So let's add a build dependency for RPM-based systems.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes: #12071
Closes: #12168
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

No branches or pull requests

2 participants