[Bug 882411] New: fuser prints PIDs with "%6d" causing large PIDs to be glued together
https://bugzilla.novell.com/show_bug.cgi?id=882411 https://bugzilla.novell.com/show_bug.cgi?id=882411#c0 Summary: fuser prints PIDs with "%6d" causing large PIDs to be glued together Classification: openSUSE Product: openSUSE 13.1 Version: Final Platform: x86-64 OS/Version: openSUSE 13.1 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: gerben@sgi.com QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0 If you have kernel.pid_max set to something larger than 99999 you will get PIDs with 6 digits. In this case fuser will produce output like: 90594 92545 95039 95459 95484 96321 97059 99381101264105909107266108324111597112058112778113808114386115892 11634011692811844711863511866212092712094912133912137712266412557 81264441273851276511277821279161280461285201319471323681323711327 34132898133141133641135616137231138589138637138638139038143840144 31914517114693214939414939515138815455915640215908116164316804316 89671691781745131749521753821763021832481833121860151897181975321 98419200172200691202418205571213815215965216406218121219993221441 22652222872922957722957823038123099923408023655524012424111324237 0245389245543 on its standard output. This is caused by the printf("%6d", pptr->pid) statement. As a result of this constructs like: pids=$(fuser -m filesystem 2>/dev/null) for pid in $pids do kill -KILL $pid done will fail. E.g. such a construct is present in the High Availability product in: /usr/lib/ocf/resource.d/heartbeat/Filesystem which will lead to the unability to unmount a file system. BTW. "fuser -m -k -KILL filesystem" should work correctly. Reproducible: Always Steps to Reproduce: 1. As root set kernel.pid_max to something larger than 99999. E.g. # sysctl -w kernel.pid_max=999999 2. run the fuser command: $ fuser -m / 2>/dev/null Actual Results: 95484 96321 97059 99381101264105909107266 Expected Results: 95484 96321 97059 99381 101264 105909 107266 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=882411 https://bugzilla.novell.com/show_bug.cgi?id=882411#c1 Gerben Jansen <gerben@sgi.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gerben@sgi.com --- Comment #1 from Gerben Jansen <gerben@sgi.com> 2014-06-12 09:29:32 UTC --- I believe changing the printf("%6d", pptr->pid) statement into printf(" %5d", pptr->pid) will fix the problem. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=882411 https://bugzilla.novell.com/show_bug.cgi?id=882411#c2 Gerben Jansen <gerben@sgi.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CLOSED Resolution| |FIXED --- Comment #2 from Gerben Jansen <gerben@sgi.com> 2014-06-12 09:41:20 UTC --- Oops. This is already fixed in 13.1 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com