Bug 885233 - strace pf lgetxattr gives bad "process_vm_readv: Bad address"
Summary: strace pf lgetxattr gives bad "process_vm_readv: Bad address"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: strace
Version: 19
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Dmitry V. Levin
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-07 20:53 UTC by John Reiser
Modified: 2013-06-13 06:51 UTC (History)
4 users (show)

Fixed In Version: strace-4.8-1.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-13 06:51:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description John Reiser 2012-12-07 20:53:51 UTC
Description of problem: The system call
   ssize_t lgetxattr (const char *path, const char *name,
                            void *value, size_t size);
specifically allows 0==value on input (the output then tells how long a subsequent call should be in order to obtain the full value), but strace always complains:
    process_vm_readv: Bad address
It's easy to get many many many spurious complaints, which slow and obscure the useful output.

The manual page says:
       An empty buffer of size zero can be passed into these calls  to  return
       the  current size of the named extended attribute, which can be used to
       estimate the size of a buffer which is sufficiently large to  hold  the
       value associated with the extended attribute.

Version-Release number of selected component (if applicable):
strace-4.7-2.fc18.x86_64


How reproducible: every time


Steps to Reproduce:
1. mkdir foo.dir
2. date >foo.dir/foo
3. strace cp -al foo.dir bar.dir 2>&1  |  grep readv
  
Actual results:
lgetxattr("foo.dir", "security.selinux"process_vm_readv: Bad address


Expected results: no complaints for lgetxattr(,,0,)


Additional info:

Comment 1 John Reiser 2012-12-07 21:02:22 UTC
I guess the important info is on the following line of the strace:
   lgetxattr("foo.dir", "security.selinux"process_vm_readv: Bad address
   , 0x0, 0) = 37
where 0x0==value and 0==size.  Because 0==size, then the buffer is empty (designates a character array of length 0).  It is never allowed to access a null string (the valid length is zero), so the address does not matter, and can be 0.

Comment 2 Fedora Admin XMLRPC Client 2012-12-07 21:16:45 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 3 Dmitry V. Levin 2012-12-07 22:06:24 UTC
Thanks, I've pushed a fix for this issue:
http://strace.git.sourceforge.net/git/gitweb.cgi?p=strace/strace;a=commitdiff;h=v4.7-34-ge622516

Comment 4 Dmitry V. Levin 2012-12-08 00:28:01 UTC
(In reply to comment #3)
> Thanks, I've pushed a fix for this issue:

http://strace.git.sourceforge.net/git/gitweb.cgi?p=strace/strace;a=commitdiff;h=v4.7-35-g1f21513

Comment 5 Fedora End Of Life 2013-04-03 19:30:28 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 6 Fedora Update System 2013-06-05 23:33:58 UTC
strace-4.8-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/strace-4.8-1.fc19

Comment 7 Fedora Update System 2013-06-06 17:29:48 UTC
Package strace-4.8-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing strace-4.8-1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-10196/strace-4.8-1.fc19
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2013-06-13 06:51:29 UTC
strace-4.8-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


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