Bug 202460 - ltrace doesn't find all getenv calls
Summary: ltrace doesn't find all getenv calls
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: ltrace
Version: 4.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Petr Machata
QA Contact: Jay Turner
URL:
Whiteboard:
Depends On: 201910
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-08-14 16:30 UTC by Petr Machata
Modified: 2015-05-05 01:32 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-10-17 14:54:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Petr Machata 2006-08-14 16:30:40 UTC
+++ This bug was initially created as a clone of Bug #201910 +++

Description of problem:


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


How reproducible:
Always

Steps to Reproduce:
1. ltrace -fo/tmp/a psql
2. setenv PGUSER someuser
3. ltrace -fo/tmp/a psql
  
Actual results:
The 'getenv("PGUSER")' call is not recorded (amongst others), but other getenv
calls are.


Expected results:
Ltrace should have recorded all getenv calls.

Additional info:
This is a weird error.

-- Additional comment from pmachata on 2006-08-10 06:09 EST --
Can you try this, please?
$ ltrace psql --help 2>&1 | grep PGUSER
Because this works for me:
getenv("PGUSER")                                 = NULL
getenv("PGUSER")                                 = NULL


-- Additional comment from kernel on 2006-08-11 12:17 EST --
# ltrace psql --help  |& grep PGUSER
getenv("PGUSER")                                 = NULL
getenv("PGUSER")                                 = NULL
# ltrace -fo/tmp/a psql --help >& /dev/null; grep PGUSER /tmp/a
25900 getenv("PGUSER")                           = NULL
25900 getenv("PGUSER")                           = NULL
# ltrace -fo/tmp/a psql; grep PGUSER /tmp/a
Password: 
psql: FATAL:  password authentication failed for user "root"
# setenv PGUSER db
# setenv PGDATABASE process
# ltrace -fo/tmp/a psql
Password: 
Welcome to psql 8.1.4, the PostgreSQL interactive terminal.
...
process=# \q
# grep PGUSER /tmp/a
# grep PGDATABASE /tmp/a
# 

The psql process is getting the values from the environment, but ltrace isn't
seeing the corresponding getenv() calls except when the command is 'psql --help'.

Comment 2 Jay Turner 2006-08-14 16:58:21 UTC
QE ack if we determine that it is a bug.

Comment 4 RHEL Program Management 2006-08-18 14:41:54 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 5 Petr Machata 2006-10-17 14:54:06 UTC
Sorry, completely forgot about this one. It's not a bug, but missing feature of
ltrace, where ltrace doesn't trace calls done from libraries. This feature might
appear in one of future ltreace releases, but no ETA is given.


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