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

lua treats ENOENT as success in getpwall/getgrall #4592

Closed
avtikhon opened this issue Oct 29, 2019 · 6 comments
Closed

lua treats ENOENT as success in getpwall/getgrall #4592

avtikhon opened this issue Oct 29, 2019 · 6 comments
Assignees
Labels
bug Something isn't working qa Issues related to tests or testing subsystem

Comments

@avtikhon
Copy link
Contributor

Tarantool version:
master

OS version:
CentOS 8

Bug description:
lua treats ENOENT as success in getpwall/getgrall
Issue described at systemd/systemd#9585
Previously suggested fix at 7732dad
Error log shows:
builtin/pwd.lua:169: getpwall failed [errno 2]: No such file or directory

Steps to reproduce:
./test-run.py app-tap/pwd.test.lua

Optional (but very desirable):

  • coredump
  • backtrace
  • netstat
avtikhon added a commit that referenced this issue Oct 31, 2019
Enabled packages build rules for CentOS 8.

For now CentOS 8 uses 'python2-' prefix for Python 2 modules
rather the 'python-', changed CentOS 8 packages installation
rules to use python2 packages instead of python.

Found that old packages like python-gevent and python-greenlet
were completely removed from CentOS 8. To fix it the sources
if these packages were downloaded from https://cbs.centos.org/
and rebuilt, to make them available the binaries were saved
at the PackageCloud packpack backport repository.

Met the issue with app-tap/pwd.test.lua test from the commit
7732dad (lua: treat ENOENT as
success in getpwall/getgrall), temporary blocked the test (till
the fix will be pushed) with the new issue:
#4592

Added CentOS 8 into regular testing at gitlab-ci and travis-ci.

Closes #4543
avtikhon added a commit that referenced this issue Oct 31, 2019
Enabled packages build rules for CentOS 8.

For now CentOS 8 uses 'python2-' prefix for Python 2 modules
rather the 'python-', changed CentOS 8 packages installation
rules to use python2 packages instead of python.

Found that old packages like python-gevent and python-greenlet
were completely removed from CentOS 8. To fix it the sources
if these packages were downloaded from https://cbs.centos.org/
and rebuilt, to make them available the binaries were saved
at the PackageCloud packpack backport repository.

Met the issue with app-tap/pwd.test.lua test from the commit
7732dad (lua: treat ENOENT as
success in getpwall/getgrall), temporary blocked the test (till
the fix will be pushed) with the new issue:
#4592

Added CentOS 8 into regular testing at gitlab-ci and travis-ci.

Closes #4543
avtikhon added a commit that referenced this issue Nov 5, 2019
Enabled packages build rules for CentOS 8.

For now CentOS 8 uses 'python2-' prefix for Python 2 modules
rather the 'python-', changed CentOS 8 packages installation
rules to use python2 packages instead of python.

Found that old packages like python-gevent and python-greenlet
were completely removed from CentOS 8. To fix it the sources
if these packages were downloaded from https://cbs.centos.org/
and rebuilt, to make them available the binaries were saved
at the PackageCloud packpack backport repository.

Met the issue with app-tap/pwd.test.lua test from the commit
7732dad (lua: treat ENOENT as
success in getpwall/getgrall), temporary blocked the test (till
the fix will be pushed) with the new issue:
#4592

Found that libunwind library couldn't be installed from dependecies
which was needed by backtrace feature. Decided to block it temporary
till it will be enabled by issue:
#4611

Added CentOS 8 into regular testing at gitlab-ci and travis-ci.

Closes #4543
@Totktonada
Copy link
Member

Yep, systemd/systemd#9585 was closed in systemd v240, while CentOS 8 offers v239 (at least for now). /etc/nsswitch.conf contains systemd entries for passwd and group:

(CentOS 8) $ grep '^passwd\|^group' /etc/nsswitch.conf
passwd:      sss files systemd
group:       sss files systemd

CentOS 7 has no systemd entries here:

(CentOS 7) $ grep '^passwd\|^group' /etc/nsswitch.conf
passwd:     files sss
group:      files sss

That is why we don't see exaclty this problem on CentOS 7.

@kyukhin kyukhin added bug Something isn't working qa Issues related to tests or testing subsystem labels Nov 8, 2019
@kyukhin kyukhin added this to the 2.2.2 milestone Nov 8, 2019
Totktonada pushed a commit that referenced this issue Nov 8, 2019
Added build + test jobs in GitLab-CI and build + test + deploy jobs on
Travis-CI for CentOS 8.

Updated testing dependencies in the RPM spec to follow the new Python 2
package naming scheme that was introduced in CentOS 8: it uses
'python2-' prefix rather then 'python-'.

CentOS 8 does not provide python2-gevent and python2-greenlet packages,
so they were pushed to https://packagecloud.io/packpack/backports
repository. This repository is enabled in our build image
(packpack/packpack:el-8) by default. Those dependencies are build-time,
so nothing was changed for a user. The source RPM packages were gathered
from https://cbs.centos.org.

Disabled app-tap/pwd.test.lua on CentOS 8 due to systemd-nss issue,
which was not worked around properly. Filed #4592 to resolved it in the
future.

Eliminated libunwind runtime dependency (and libunwind-devel build
dependency) on CentOS 8, because the base system does not provide it.
fiber.info() backtraces and printing of a backtrace after a crash will
not be available on this system. Hopefully we'll fix it in the future,
filed #4611 on this.

Closes #4543
Totktonada pushed a commit that referenced this issue Nov 8, 2019
Added build + test jobs in GitLab-CI and build + test + deploy jobs on
Travis-CI for CentOS 8.

Updated testing dependencies in the RPM spec to follow the new Python 2
package naming scheme that was introduced in CentOS 8: it uses
'python2-' prefix rather then 'python-'.

CentOS 8 does not provide python2-gevent and python2-greenlet packages,
so they were pushed to https://packagecloud.io/packpack/backports
repository. This repository is enabled in our build image
(packpack/packpack:el-8) by default. Those dependencies are build-time,
so nothing was changed for a user. The source RPM packages were gathered
from https://cbs.centos.org.

Disabled app-tap/pwd.test.lua on CentOS 8 due to systemd-nss issue,
which was not worked around properly. Filed #4592 to resolved it in the
future.

Eliminated libunwind runtime dependency (and libunwind-devel build
dependency) on CentOS 8, because the base system does not provide it.
fiber.info() backtraces and printing of a backtrace after a crash will
not be available on this system. Hopefully we'll fix it in the future,
filed #4611 on this.

Closes #4543

Reviewed-by: Alexander Turenko <alexander.turenko@tarantool.org>
Reviewed-by: Igor Munkin <imun@tarantool.org>
Totktonada pushed a commit that referenced this issue Nov 8, 2019
Added build + test jobs in GitLab-CI and build + test + deploy jobs on
Travis-CI for CentOS 8.

Updated testing dependencies in the RPM spec to follow the new Python 2
package naming scheme that was introduced in CentOS 8: it uses
'python2-' prefix rather then 'python-'.

CentOS 8 does not provide python2-gevent and python2-greenlet packages,
so they were pushed to https://packagecloud.io/packpack/backports
repository. This repository is enabled in our build image
(packpack/packpack:el-8) by default. Those dependencies are build-time,
so nothing was changed for a user. The source RPM packages were gathered
from https://cbs.centos.org.

Disabled app-tap/pwd.test.lua on CentOS 8 due to systemd-nss issue,
which was not worked around properly. Filed #4592 to resolved it in the
future.

Eliminated libunwind runtime dependency (and libunwind-devel build
dependency) on CentOS 8, because the base system does not provide it.
fiber.info() backtraces and printing of a backtrace after a crash will
not be available on this system. Hopefully we'll fix it in the future,
filed #4611 on this.

Closes #4543

Reviewed-by: Alexander Turenko <alexander.turenko@tarantool.org>
Reviewed-by: Igor Munkin <imun@tarantool.org>
(cherry picked from commit e3d9d8c)
Totktonada pushed a commit that referenced this issue Nov 8, 2019
Added build + test jobs in GitLab-CI and build + test + deploy jobs on
Travis-CI for CentOS 8.

Updated testing dependencies in the RPM spec to follow the new Python 2
package naming scheme that was introduced in CentOS 8: it uses
'python2-' prefix rather then 'python-'.

CentOS 8 does not provide python2-gevent and python2-greenlet packages,
so they were pushed to https://packagecloud.io/packpack/backports
repository. This repository is enabled in our build image
(packpack/packpack:el-8) by default. Those dependencies are build-time,
so nothing was changed for a user. The source RPM packages were gathered
from https://cbs.centos.org.

Disabled app-tap/pwd.test.lua on CentOS 8 due to systemd-nss issue,
which was not worked around properly. Filed #4592 to resolved it in the
future.

Eliminated libunwind runtime dependency (and libunwind-devel build
dependency) on CentOS 8, because the base system does not provide it.
fiber.info() backtraces and printing of a backtrace after a crash will
not be available on this system. Hopefully we'll fix it in the future,
filed #4611 on this.

Closes #4543

Reviewed-by: Alexander Turenko <alexander.turenko@tarantool.org>
Reviewed-by: Igor Munkin <imun@tarantool.org>
(cherry picked from commit e3d9d8c)
Totktonada pushed a commit that referenced this issue Nov 8, 2019
Added build + test jobs in GitLab-CI and build + test + deploy jobs on
Travis-CI for CentOS 8.

Updated testing dependencies in the RPM spec to follow the new Python 2
package naming scheme that was introduced in CentOS 8: it uses
'python2-' prefix rather then 'python-'.

CentOS 8 does not provide python2-gevent and python2-greenlet packages,
so they were pushed to https://packagecloud.io/packpack/backports
repository. This repository is enabled in our build image
(packpack/packpack:el-8) by default. Those dependencies are build-time,
so nothing was changed for a user. The source RPM packages were gathered
from https://cbs.centos.org.

Disabled app-tap/pwd.test.lua on CentOS 8 due to systemd-nss issue,
which was not worked around properly. Filed #4592 to resolved it in the
future.

Eliminated libunwind runtime dependency (and libunwind-devel build
dependency) on CentOS 8, because the base system does not provide it.
fiber.info() backtraces and printing of a backtrace after a crash will
not be available on this system. Hopefully we'll fix it in the future,
filed #4611 on this.

Closes #4543

Reviewed-by: Alexander Turenko <alexander.turenko@tarantool.org>
Reviewed-by: Igor Munkin <imun@tarantool.org>
(cherry picked from commit e3d9d8c)
@Totktonada
Copy link
Member

pwd.getpwall() hangs now on CentOS 7 (with some specific configuration) and due to commit f5d8331 it leads to tarantool hang at startup. However after several minutes it gives control back.

I'll update this comment with more info, asked it from the user.

@Totktonada
Copy link
Member

Jira: TNT-13.

@ligurio ligurio added this to DOING in Quality Assurance May 19, 2020
@ligurio ligurio assigned ligurio and unassigned Totktonada and avtikhon May 19, 2020
@ligurio
Copy link
Member

ligurio commented May 21, 2020

can't reproduce

systemd-libs-239-18.el8_1.5.x86_64
systemd-pam-239-18.el8_1.5.x86_64
systemd-239-18.el8_1.5.x86_64
systemd-udev-239-18.el8_1.5.x86_64
$ ../../test/test-run.py --builddir=/home/centos/tarantool/build --vardir=/home/centos/tarantool/build/test/var app-tap/pwd.test.lua
<snipped>
======================================================================================
WORKR TEST                                            PARAMS          RESULT
---------------------------------------------------------------------------------
[001] app-tap/pwd.test.lua                                            [ pass ]
---------------------------------------------------------------------------------
$ cat /etc/redhat-release                                                                                         
CentOS Linux release 8.1.1911 (Core)

on ci passed too - https://gitlab.com/tarantool/tarantool/pipelines/148600403

@avtikhon, please help to reproduce

@avtikhon
Copy link
Contributor Author

avtikhon commented May 30, 2020

I've tried all suggestions mentioned in our chats, tried to rollback all commits step by step to src/lua/pwd.lua, even tried different changes in the file on CentOS 8 and Fedora 29, and failed to reproduce the issue. The only possible way that I've found is to change the /etc/nsswitch.conf file in wrong way to reproduce the ENOENT in getgrall function:

passwd:      sss files ldap
group:       sss files systemd

Anyway this error mentioned in getgrent as:

       ENOENT ... For NSS backends in glibc this indicates the backend is not correctly configured.

And seems that the root issue wasn't reproduced.

Trying to run on dev1 host a lot of runs of the app-tap/pwd.test.lua test, got only issue with command:

cd /export/avtikhon/src/test && while time ./test-run.py --builddir ../../bld --long -j 160 `for r in {1..200} ; do echo app-tap/pwd.test.lua ; done` ; do date ; done

that once in 400 test run the test hangs for a half of a minute and then continues.

Also the error message is not user friendly:

local pwgr_errstr = "get%s failed [errno %d]: %s"
produces:
[001] LuajitError: builtin/pwd.lua:101: getgetgrall failed [errno 2]: No such file or directory
while it has to be:
[001] LuajitError: builtin/pwd.lua:101: get getgrall failed [errno 2]: No such file or directory

Seems

@Totktonada
Copy link
Member

I unable to reproduce it too. Tried in a CentOS 8 docker container and also on a virtual machine with CentOS 8.

I found a chat log with Alexander related to this problem. It was on a work-in-progress patch to support CentOS 8 and there were suspectful errors about libcurl.so (see below). So maybe this pwd test problem was infuenced by this.

[001] app-tap/pwd.test.lua                                            [ fail ]
[001] Test failed! Output from reject file app-tap/pwd.reject:
[001] TAP version 13
[001] 1..6
[001] ok - checking user by id
[001] ok - checking user by name
[001] ok - checking group by id
[001] ok - checking group by name
[001] 
[001] Last 15 lines of Tarantool Log file [Instance "app_server"][/mnt/test/var/001_app-tap/pwd.test.lua.tarantool.log]:
[001] tarantool: /lib64/libcurl.so.4: no version information available (required by tarantool)
[001] builtin/pwd.lua:169: getpwall failed [errno 2]: No such file or directory
[Main process] Got failed test; gently terminate all workers...
[001] Worker "001_app-tap" got failed test; stopping the server...
---------------------------------------------------------------------------------
Statistics:
* fail: 1
Failed tasks:
- [app-tap/pwd.test.lua, null]

@avtikhon Let's close the issue with removing pwd.skipcond file.

Filed #5034 to fix the startup freeze.

avtikhon added a commit that referenced this issue May 31, 2020
During creating patch:

  e3d9d8c ("build: add CentOS 8 into CI / CD")

was found the issue:

  [001] app-tap/pwd.test.lua                                            [ fail ]
  [001] Test failed! Output from reject file app-tap/pwd.reject:
  [001] TAP version 13
  [001] 1..6
  [001] ok - checking user by id
  [001] ok - checking user by name
  [001] ok - checking group by id
  [001] ok - checking group by name
  [001]
  [001] Last 15 lines of Tarantool Log file [Instance "app_server"][/mnt/test/var/001_app-tap/pwd.test.lua.tarantool.log]:
  [001] tarantool: /lib64/libcurl.so.4: no version information available (required by tarantool)
  [001] builtin/pwd.lua:169: getpwall failed [errno 2]: No such file or directory

Currently it was tried to reproduce the issue, but all the attempts
didn't got the needed fail. After discussion of the issue decided to
close the current one as not the issue for the test and continue the
fixes for getpwall/getgrall functions within issue #5034.

Closes #4592
avtikhon added a commit that referenced this issue May 31, 2020
During creating patch:

  e3d9d8c ("build: add CentOS 8 into CI / CD")

was found the issue:

  [001] app-tap/pwd.test.lua                                            [ fail ]
  [001] Test failed! Output from reject file app-tap/pwd.reject:
  [001] TAP version 13
  [001] 1..6
  [001] ok - checking user by id
  [001] ok - checking user by name
  [001] ok - checking group by id
  [001] ok - checking group by name
  [001]
  [001] Last 15 lines of Tarantool Log file [Instance "app_server"][/mnt/test/var/001_app-tap/pwd.test.lua.tarantool.log]:
  [001] tarantool: /lib64/libcurl.so.4: no version information available (required by tarantool)
  [001] builtin/pwd.lua:169: getpwall failed [errno 2]: No such file or directory

Currently it was tried to reproduce the issue, but all the attempts
didn't got the needed fail. After discussion of the issue decided to
close the current one as not the issue for the test and continue the
fixes for getpwall/getgrall functions within issue #5034.

Closes #4592
@avtikhon avtikhon moved this from DOING to ON REVIEW in Quality Assurance Jun 2, 2020
avtikhon added a commit that referenced this issue Jun 2, 2020
During creating patch:

  e3d9d8c ("build: add CentOS 8 into CI / CD")

was found the issue:

  [001] app-tap/pwd.test.lua                                            [ fail ]
  [001] Test failed! Output from reject file app-tap/pwd.reject:
  [001] TAP version 13
  [001] 1..6
  [001] ok - checking user by id
  [001] ok - checking user by name
  [001] ok - checking group by id
  [001] ok - checking group by name
  [001]
  [001] Last 15 lines of Tarantool Log file [Instance "app_server"][/mnt/test/var/001_app-tap/pwd.test.lua.tarantool.log]:
  [001] tarantool: /lib64/libcurl.so.4: no version information available (required by tarantool)
  [001] builtin/pwd.lua:169: getpwall failed [errno 2]: No such file or directory

Currently it was tried to reproduce the issue, but all the attempts
didn't got the needed fail. After discussion of the issue decided to
close the current one as not the issue for the test and continue the
fixes for getpwall/getgrall functions within issue #5034.

Closes #4592
@kyukhin kyukhin closed this as completed in b92549a Jun 3, 2020
kyukhin pushed a commit that referenced this issue Jun 3, 2020
During creating patch:

  e3d9d8c ("build: add CentOS 8 into CI / CD")

was found the issue:

  [001] app-tap/pwd.test.lua                                            [ fail ]
  [001] Test failed! Output from reject file app-tap/pwd.reject:
  [001] TAP version 13
  [001] 1..6
  [001] ok - checking user by id
  [001] ok - checking user by name
  [001] ok - checking group by id
  [001] ok - checking group by name
  [001]
  [001] Last 15 lines of Tarantool Log file [Instance "app_server"][/mnt/test/var/001_app-tap/pwd.test.lua.tarantool.log]:
  [001] tarantool: /lib64/libcurl.so.4: no version information available (required by tarantool)
  [001] builtin/pwd.lua:169: getpwall failed [errno 2]: No such file or directory

Currently it was tried to reproduce the issue, but all the attempts
didn't got the needed fail. After discussion of the issue decided to
close the current one as not the issue for the test and continue the
fixes for getpwall/getgrall functions within issue #5034.

Closes #4592

(cherry picked from commit b92549a)
kyukhin pushed a commit that referenced this issue Jun 3, 2020
During creating patch:

  e3d9d8c ("build: add CentOS 8 into CI / CD")

was found the issue:

  [001] app-tap/pwd.test.lua                                            [ fail ]
  [001] Test failed! Output from reject file app-tap/pwd.reject:
  [001] TAP version 13
  [001] 1..6
  [001] ok - checking user by id
  [001] ok - checking user by name
  [001] ok - checking group by id
  [001] ok - checking group by name
  [001]
  [001] Last 15 lines of Tarantool Log file [Instance "app_server"][/mnt/test/var/001_app-tap/pwd.test.lua.tarantool.log]:
  [001] tarantool: /lib64/libcurl.so.4: no version information available (required by tarantool)
  [001] builtin/pwd.lua:169: getpwall failed [errno 2]: No such file or directory

Currently it was tried to reproduce the issue, but all the attempts
didn't got the needed fail. After discussion of the issue decided to
close the current one as not the issue for the test and continue the
fixes for getpwall/getgrall functions within issue #5034.

Closes #4592

(cherry picked from commit b92549a)
kyukhin pushed a commit that referenced this issue Jun 3, 2020
During creating patch:

  e3d9d8c ("build: add CentOS 8 into CI / CD")

was found the issue:

  [001] app-tap/pwd.test.lua                                            [ fail ]
  [001] Test failed! Output from reject file app-tap/pwd.reject:
  [001] TAP version 13
  [001] 1..6
  [001] ok - checking user by id
  [001] ok - checking user by name
  [001] ok - checking group by id
  [001] ok - checking group by name
  [001]
  [001] Last 15 lines of Tarantool Log file [Instance "app_server"][/mnt/test/var/001_app-tap/pwd.test.lua.tarantool.log]:
  [001] tarantool: /lib64/libcurl.so.4: no version information available (required by tarantool)
  [001] builtin/pwd.lua:169: getpwall failed [errno 2]: No such file or directory

Currently it was tried to reproduce the issue, but all the attempts
didn't got the needed fail. After discussion of the issue decided to
close the current one as not the issue for the test and continue the
fixes for getpwall/getgrall functions within issue #5034.

Closes #4592

(cherry picked from commit b92549a)
@avtikhon avtikhon moved this from ON REVIEW to DONE in Quality Assurance Jun 5, 2020
@avtikhon avtikhon removed this from DONE in Quality Assurance Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working qa Issues related to tests or testing subsystem
Projects
None yet
Development

No branches or pull requests

4 participants