Date: Wed, 08 Apr 2020 22:02:40 +0000 From: bugzilla-noreply@freebsd.org To: pkg@FreeBSD.org Subject: [Bug 245462] ports-mgmt/pkg: 1.14.2 pipe remains open while running scripts Message-ID: <bug-245462-32340@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D245462 Bug ID: 245462 Summary: ports-mgmt/pkg: 1.14.2 pipe remains open while running scripts Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: pkg@FreeBSD.org Reporter: sobomax@FreeBSD.org Assignee: pkg@FreeBSD.org Flags: maintainer-feedback?(pkg@FreeBSD.org) We are observing latest version of pkg hanging if some process spawn by the script remains running after script itself exits. Inspecting the process with GDB the pkg-static process stucks doing poll() = on FD#7: (gdb) bt #0 0x000000000084ba1a in _poll () #1 0x00000000007fad26 in __thr_poll () #2 0x00000000005e7303 in pkg_script_run (pkg=3D0x801079000, type=3DPKG_SCRIPT_POST_INSTALL, upgrade=3Dfalse) at scripts.c:248 #3 0x0000000000469574 in pkg_add_port (db=3D0x801078700, pkg=3D0x801079000, input_path=3D0x7fffffffe7b7 "/tmp/media/ssp_port/work/stage", reloc=3D0x0, testing=3Dfalse) at pkg_ports.c:1338 #4 0x0000000000416535 in exec_register (argc=3D7, argv=3D0x7fffffffe3e8) at register.c:195 #5 0x0000000000411202 in main (argc=3D7, argv=3D0x7fffffffe3e8) at main.c:= 886 Then checking the file descriptor table using lsof shows the following, the stray denyhosts process is a culprit, however it's unclear why it should ha= ve a pipe connected all the way to the pkg-static: [sobomax@builder ~]$ ps -xalww | grep -w 33903 0 33903 33901 0 52 0 27020 22276 select I - 0:02.54 /usr/local/sbin/pkg-static register -i /tmp/media/ssp_port/work/stage -m /tmp/media/ssp_port/work/.metadir -f /tmp/media/ssp_port/work/.PLIST.mktmp 0 33923 33903 0 73 0 0 0 - Z - 0:02.16 <defunct> 0 34324 33903 0 75 0 0 0 - Z - 0:00.00 <defunct> 0 34325 33903 0 20 0 21096 17760 select S - 0:00.01 /usr/local/bin/python2.7 /usr/local/bin/denyhosts.py --config /usr/local/etc/denyhosts.conf --noemail --daemon 70 34361 33903 0 73 0 0 0 - Z - 0:05.03 <defunct> [sobomax@builder ~]$ sudo lsof | grep -w 0xfffff8017cc32000 pkg-stati 33903 root 7u unix 0xfffff8017cc32000 0t0= =20=20=20=20 ->0xfffff80480a06000 python2.7 34325 root 4u unix 0xfffff80480a06000 0t0= =20=20=20=20 ->0xfffff8017cc32000 I believe this is direct result of the single change here: https://github.com/freebsd/pkg/commit/767fbd77ee64e22a31a4d5903c1e36dcd8533= a70 Some comments were left in that commit as to how to fix possibly. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-245462-32340>