Project

General

Profile

Bug #20989

ps returns truncated command line in dune/ArtSupport/DuneToolManager.cxx

Added by Thomas Junk about 1 year ago. Updated about 1 year ago.

Status:
Feedback
Priority:
Normal
Assignee:
Start date:
10/02/2018
Due date:
% Done:

0%

Estimated time:
Duration:

Description

In n dune/ArtSupport/DuneToolManager.cxx,

this line

sscom << "ps -fp " << pid << " >" << sftmp;

is used to determine the command line and arguments. Problem is, the ps command truncates its output based on the value of the COLUMNS environment variable, leaving a partial string of arguments. This is becoming more common with /cvmfs pathnames.

History

#1 Updated by Tingjun Yang about 1 year ago

David, would you fix this?

#2 Updated by David Adams about 1 year ago

What value do we need for COLUMNS?

#3 Updated by David Adams about 1 year ago

When I redirect "ps -fp", e.g. when I run

ps -fp 59986 >tmp.tmp

on dunegpvm or my desktop, I do not see a limit from COLUMNS. I do if I do not redirect, I do see the truncation.

Where are you seeing a problem?

#4 Updated by Thomas Junk about 1 year ago

If I run Jason's example (see the slack thread under larsoft), and put a breakpoint in DuneToolManager.cxx after the temporary file is created with the output of ps, I see output truncated at 80 characters.

<dunegpvm08.fnal.gov> cat /dune/data/users/trj/dumptest/tmpproc29642.tmp
UID PID PPID C STIME TTY TIME CMD
trj 29642 29640 3 11:22 ? 00:00:05 /cvmfs/larsoft.opensciencegrid.o

#5 Updated by Thomas Junk about 1 year ago

Suggested bugfix:

sscom << "ps -fwwp " << pid << " >" << sftmp;

#6 Updated by David Adams about 1 year ago

  • Status changed from New to Feedback

I have not been able to reproduce the problem but I added the "ww" argument and it causes me no problem.

I will wait a couple day and close this if there are no complaints from Jenkins.



Also available in: Atom PDF