Zypper hung when installing a custom package

Hi All,

I need some help in debugging a package installation failure. Initially I thought it’s scriptlet failure, but the rpm child process of zypper seems to be exiting with 0 and staying as . Not sure what’s the culprit here.

process list:

root      3856  2618  0 10:06 ?        00:00:00  \_ sshd: cloud-user [priv]
cloud-u+  3878  3856  0 10:06 ?        00:00:00  |   \_ sshd: cloud-user@pts/0
cloud-u+  3879  3878  0 10:06 pts/0    00:00:00  |       \_ -bash
root      3921  3879  0 10:07 pts/0    00:00:00  |           \_ sudo su
root      3922  3921  0 10:07 pts/0    00:00:00  |               \_ su
root      3923  3922  0 10:07 pts/0    00:00:00  |                   \_ bash
root      4484  3923 25 10:11 pts/0    00:02:49  |                       \_ strace -o zyppertrace -f -ff zypper --non-interactive --no-gpg-checks install ../mypackage
root      4486  4484  3 10:11 pts/0    00:00:21  |                           \_ zypper --non-interactive --no-gpg-checks install ../mypackage.noarch
root      4511  4486  0 10:11 pts/0    00:00:00  |                               \_ /usr/bin/systemd-inhibit --what=sleep:shutdown:idle --who=zypp --mode=block --why=Zypp commit running. /u
root      4513  4511  0 10:11 pts/0    00:00:00  |                               |   \_ /usr/bin/cat
root      4512  4486  0 10:11 pts/0    00:00:00  |                               \_ /usr/bin/python3 /usr/lib/zypp/plugins/commit/snapper.py
root      4516  4486  0 10:11 pts/0    00:00:00  |                               \_ /bin/bash /usr/lib/zypp/plugins/commit/btrfs-defrag-plugin.sh
root      4639  4486  3 10:12 pts/0    00:00:18  |                               \_ [rpm] <defunct>

Could you please help me in understanding the failure. I have strace output of all the child processes.

Below is the strace of zypper process (pid 4486) after the exit of rpm process:

poll([{fd=22, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 1 ([{fd=22, revents=POLLIN}])
read(22, "+ exit 0\n", 4096)            = 9
fcntl(22, F_GETFL)                      = 0x800 (flags O_RDONLY|O_NONBLOCK)
fcntl(22, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
fcntl(22, F_GETFL)                      = 0x800 (flags O_RDONLY|O_NONBLOCK)
fcntl(22, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
poll([{fd=22, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = ? ERESTART_RESTARTBLOCK (Interrupted by signal)
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=4639, si_uid=0, si_status=0, si_utime=1095, si_stime=723} ---
restart_syscall(<... resuming interrupted poll ...>) = 0
poll([{fd=22, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 0 (Timeout)
poll([{fd=22, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 0 (Timeout)
poll([{fd=22, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 0 (Timeout)
poll([{fd=22, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 0 (Timeout)
poll([{fd=22, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 0 (Timeout)
poll([{fd=22, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 0 (Timeout)
poll([{fd=22, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 0 (Timeout)
poll([{fd=22, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 0 (Timeout)

Installation with rpm package manager is getting completed without any issues.