Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1067486

Summary: s390x WARNING: unhandled syscall: 326 (dup3)
Product: Red Hat Enterprise Linux 7 Reporter: Miloš Prchlík <mprchlik>
Component: valgrindAssignee: Mark Wielaard <mjw>
Status: CLOSED CURRENTRELEASE QA Contact: Miroslav Franc <mfranc>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: jakub, mbenitez, mfranc, ohudlick
Target Milestone: rc   
Target Release: ---   
Hardware: s390x   
OS: Unspecified   
Whiteboard:
Fixed In Version: valgrind-3.9.0-5.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 10:59:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Miloš Prchlík 2014-02-20 14:25:30 UTC
Description of problem:

dup3 function causes valgrind to warn:

[root@ibm-z10-70 ~]# cat dup3.c 
#include <unistd.h>

int main(int argc, char **argv)
{
  dup3(0, 0, 0);

  return 0;
}
[root@ibm-z10-70 ~]# 
[root@ibm-z10-70 ~]# 
[root@ibm-z10-70 ~]# gcc -o dup3 dup3.c
[root@ibm-z10-70 ~]# 
[root@ibm-z10-70 ~]# 
[root@ibm-z10-70 ~]# valgrind --leak-check=full --read-var-info=yes ./dup3
==62394== Memcheck, a memory error detector
==62394== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==62394== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright info
==62394== Command: ./dup3
==62394== 
--62394-- WARNING: unhandled syscall: 326
--62394-- You may be able to write your own handler.
--62394-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--62394-- Nevertheless we consider this a bug.  Please report
--62394-- it at http://valgrind.org/support/bug_reports.html.
==62394== 
==62394== HEAP SUMMARY:
==62394==     in use at exit: 0 bytes in 0 blocks
==62394==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==62394== 
==62394== All heap blocks were freed -- no leaks are possible
==62394== 
==62394== For counts of detected and suppressed errors, rerun with: -v
==62394== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
[root@ibm-z10-70 ~]# 



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

valgrind-3.9.0-4.el7.s390x


How reproducible:

Always on s390x, no warning on x86_64 nor ppc64


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Mark Wielaard 2014-02-20 14:36:03 UTC
Strange, looks like this was just forgotten on s390x, all other arches do support it. It might be as simple as the following (untested)patch:

diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c
index 8bbdf3d..2de367a 100644
--- a/coregrind/m_syswrap/syswrap-s390x-linux.c
+++ b/coregrind/m_syswrap/syswrap-s390x-linux.c
@@ -1044,7 +1044,7 @@ static SyscallTableEntry syscall_table[] = {
    LINXY(__NR_inotify_init1,  sys_inotify_init1),                     // 324
 
    LINXY(__NR_pipe2,  sys_pipe2),                                     // 325
-   // (__NR_dup3,  ),
+   LINXY(__NR_dup3,  sys_dup3),                                       // 326
    LINXY(__NR_epoll_create1,  sys_epoll_create1),                     // 327
    LINXY(__NR_preadv, sys_preadv),                                    // 328
    LINX_(__NR_pwritev, sys_pwritev),                                  // 329

I'll follow up upstream.

Comment 3 Mark Wielaard 2014-02-20 15:45:39 UTC
Patch was indeed trivial and already pushed upstream.

Comment 6 Ludek Smid 2014-06-13 10:59:06 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.