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 1210290 - ltrace: handle_event.c:623: handle_x_sysret: Assertion `d > 0' failed
Summary: ltrace: handle_event.c:623: handle_x_sysret: Assertion `d > 0' failed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ltrace
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jeff Law
QA Contact: Martin Cermak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-09 10:59 UTC by Petr Machata
Modified: 2015-11-19 03:30 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
In rare circumstances, when tracing a multi-threaded process without the "-f" option, secondary (untraced) threads were ignored and their stack trace was not kept up-to-date. As a consequence, ltrace terminated unexpectedly with an assertion error ("Assertion `d > 0' failed"). This bug has been fixed, and ltrace no longer crashes in the described scenario.
Clone Of:
Environment:
Last Closed: 2015-11-19 03:30:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2141 0 normal SHIPPED_LIVE ltrace bug fix update 2015-11-19 07:40:19 UTC

Description Petr Machata 2015-04-09 10:59:27 UTC
Description of problem:
Description of problem:
bug 1208351.

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


How reproducible:
On ARM.  The nature of fix is however not arch-specific, and therefore I suspect the bug is more general, and we are just lucky that it doesn't trigger on x86_64.

Steps to Reproduce:
1. Obtain an ARM
2. Compile http://anonscm.debian.org/cgit/collab-maint/ltrace.git/tree/testsuite/ltrace.main/main-threaded.c?id=9c6ba6adc6aad1be1761b73cd34ef67d5cd5823e
3. Run ltrace -L ./a.out

Actual results:
Assertion failure.

Expected results:
It works.

Additional info:
With -f, it always works.  The problem is in ignoring non-traced threads properly.

The following upstream commits fix the problem:
http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=4724bd5a4a19db117a1d280b9d1a3508fd4e03fa
http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=72ee29639c55b5942bc07c8ed0013005f8fc5a97

Fedora package backports these as patches 20 and 21.

Comment 1 Martin Cermak 2015-04-09 13:07:08 UTC
(In reply to Petr Machata from comment #0)
> Steps to Reproduce:
> 1. Obtain an ARM
> 2. Compile
> http://anonscm.debian.org/cgit/collab-maint/ltrace.git/tree/testsuite/ltrace.
> main/main-threaded.c?id=9c6ba6adc6aad1be1761b73cd34ef67d5cd5823e

=======
#include <pthread.h>

extern void print (char *);

#define	PRINT_LOOP	10

void *
th_main (void *arg)
{
  int i;
  for (i=0; i<PRINT_LOOP; i++)
    print (arg);
  return NULL;
}

int
main ()
{
  pthread_t thread1;
  pthread_t thread2;
  pthread_t thread3;
  pthread_create (&thread1, NULL, th_main, "aaa");
  pthread_create (&thread2, NULL, th_main, "bbb");
  pthread_create (&thread3, NULL, th_main, "ccc");
  pthread_join (thread1, NULL);
  pthread_join (thread2, NULL);
  pthread_join (thread3, NULL);
  return 0;
}
=======

> 3. Run ltrace -L ./a.out

Comment 9 errata-xmlrpc 2015-11-19 03:30:33 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2141.html


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