Bug 358241 - untruncated environment strings are printed with ellipsis anyway
untruncated environment strings are printed with ellipsis anyway
Product: Fedora
Classification: Fedora
Component: strace (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Roland McGrath
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-10-30 10:29 EDT by John Reiser
Modified: 2008-04-04 11:29 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-04 11:29:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description John Reiser 2007-10-30 10:29:51 EDT
Description of problem: When strace -v prints environment strings, then most
short ones get printed with ellipsis ("...") even though they are not truncated,
and are less than the length of a "long string".

Version-Release number of selected component (if applicable):

How reproducible: always

Steps to Reproduce:
1. strace -e trace=execve -v date
Actual results:
execve("/bin/date", ["date"], ["SSH_AGENT_PID=3133",
"HOSTNAME=f8test3-32.localdomain"..., "SHELL=/bin/bash"..., "TERM=xterm"...,
"XDG_SESSION_COOKIE=47e96c94f225b"..., "GTK_RC_FILES=/etc/gtk/gtkrc:/hom"...,
"WINDOWID=56712498"..., "GTK_MODULES=gnomebreakpad"..., "USER=jreiser"...,
"LS_COLORS=no=00:fi=00:di=00;34:l"..., "GNOME_KEYRING_SOCKET=/tmp/keyrin"...,
"SSH_AUTH_SOCK=/tmp/ssh-NZRqOH303"..., "SESSION_MANAGER=local/unix:@/tmp"...,
"USERNAME=jreiser"..., "MAIL=/var/spool/mail/jreiser"...,
"PATH=/usr/kerberos/bin:/usr/lib/"..., "DESKTOP_SESSION=default"...,
"GDM_XSERVER_LOCATION=local"..., "INPUTRC=/etc/inputrc"..., "PWD=/tmp"...,
"XMODIFIERS=@im=none"..., "LANG=en_US.UTF-8"..., "GNOME_KEYRING_PID=3030"...,
"GDM_LANG=en_US.UTF-8"..., "GDMSESSION=default"...,
"SSH_ASKPASS=/usr/libexec/openssh"..., "SHLVL=2"..., "HOME=/home/jreiser"...,
"DBUS_SESSION_BUS_ADDRESS=unix:ab"..., "XDG_DATA_DIRS=/usr/local/share/:"...,
"LESSOPEN=|/usr/bin/lesspipe.sh %"..., "WINDOWPATH=7"..., "DISPLAY=:0.0"...,
"G_BROKEN_FILENAMES=1"..., "COLORTERM=gnome-terminal"...,
"XAUTHORITY=/tmp/.gdmQRKR0T"..., "_=/usr/bin/strace"...,
"OLDPWD=/data/Fedora8/logs"...]) = 0

Note the cases "SHELL=/bin/bash"..., "TERM=xterm"..., (etc.).  Nothing has been
truncated, so there should be no ellipsis.

Expected results: ellipsis ["..."] only when each individual name=value pair
exceeds the long-string threshhold, and so will have been truncated for printing.

Additional info: Possibly: some counter or flag is not being reset to zero for
each environment string.
Comment 1 Roland McGrath 2007-11-01 16:25:39 EDT
Consistent reproducer independent of user's env:

env -i LONG=12345678901234567890 FOO=1 ./strace -e trace=execve -v /bin/date
Comment 2 Roland McGrath 2007-11-01 19:54:14 EDT
Fixed upstream.
Comment 3 Bug Zapper 2008-04-04 10:20:50 EDT
Based on the date this bug was created, it appears to have been reported
during the development of Fedora 8. In order to refocus our efforts as
a project we are changing the version of this bug to '8'.

If this bug still exists in rawhide, please change the version back to
(If you're unable to change the bug's version, add a comment to the bug
and someone will change it for you.)

Thanks for your help and we apologize for the interruption.

The process we're following is outlined here:

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.
Comment 4 John Reiser 2008-04-04 11:29:51 EDT
Fixed in strace.x86_64 0:4.5.16-5.fc9.

Note You need to log in before you can comment on or make changes to this bug.