Bug 62377 - strace hangs when running programs from command line
Summary: strace hangs when running programs from command line
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-05 09:40 UTC by Nate Eldredge
Modified: 2005-04-12 08:56 UTC (History)
1 user (show)

See Also:


Attachments
strace-4.5.1.diff (561 bytes, patch)
2004-12-26 16:15 UTC, Drazen Kacar
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Eldredge 2004-02-05 09:40:05 UTC
Using strace 4.5.1 from the port, if you try to strace a program from 
the command line, it hangs.

$ strace ls
.... (nothing happens)

However, attaching to an already running process works fine.

Bizarrely enough, the following also works:

$ strace -o /dev/null strace ls

How-To-Repeat: See above.
Comment 1 Cy Schubert 2004-02-07 06:08:28 UTC
In message <200401300622.i0U6MDvw019935@mercury.lan>, Nate Eldredge writes:
> 
> >Number:         62377

I am unable to recreate this problem under -CURRENT.


Cheers,
--
Cy Schubert <Cy.Schubert@komquats.com>        http://www.komquats.com/
BC Government                     .                       FreeBSD UNIX
Cy.Schubert@osg.gov.bc.ca         .                     cy@FreeBSD.org
http://www.gov.bc.ca/             .            http://www.FreeBSD.org/
Comment 2 Nate Eldredge 2004-02-07 10:20:45 UTC
On Fri, 6 Feb 2004, Cy Schubert wrote:

> In message <200401300622.i0U6MDvw019935@mercury.lan>, Nate Eldredge writes:
> >
> > >Number:         62377
>
> I am unable to recreate this problem under -CURRENT.

Extremely mysterious.  I upgraded to 5.2-RELEASE and rebuilt strace, and
it's still broken.

Stranger yet:

strace strace ls: breaks

truss strace ls: works

running strace under stock gdb 5.2.1 breaks

running strace under gdb 5.3 (from port) works

-- 
Nate Eldredge
nge@cs.hmc.edu
Comment 3 Nate Eldredge 2004-02-07 10:34:58 UTC
And now I'm really confused.  If I add `printf("");' as the first
non-declaration line of `main' in strace, it works.  When I take it out,
it breaks again.  Something very bizzare is going on.

On Sat, 7 Feb 2004, Nate Eldredge wrote:

> On Fri, 6 Feb 2004, Cy Schubert wrote:
>
> > In message <200401300622.i0U6MDvw019935@mercury.lan>, Nate Eldredge writes:
> > >
> > > >Number:         62377
> >
> > I am unable to recreate this problem under -CURRENT.
>
> Extremely mysterious.  I upgraded to 5.2-RELEASE and rebuilt strace, and
> it's still broken.
>
> Stranger yet:
>
> strace strace ls: breaks
>
> truss strace ls: works
>
> running strace under stock gdb 5.2.1 breaks
>
> running strace under gdb 5.3 (from port) works
>
> --
> Nate Eldredge
> nge@cs.hmc.edu
>

-- 
Nate Eldredge
nge@cs.hmc.edu
Comment 4 Kirill Ponomarev freebsd_committer freebsd_triage 2004-02-13 14:04:32 UTC
Hi,

On Thu, Jan 29, 2004 at 10:22:13PM -0800, Nate Eldredge wrote:
> 
> >Number:         62377
> >Category:       ports
> >Synopsis:       strace hangs when running programs from command line
> >Confidential:   no
> >Severity:       serious
> >Priority:       medium
> >Responsible:    freebsd-ports-bugs
> >State:          open


Could you please investigate this PR with submitter ?

-Kirill
Comment 5 Kirill Ponomarev freebsd_committer freebsd_triage 2004-02-13 14:04:39 UTC
State Changed
From-To: open->feedback

Asked maintainer to investigate it with submitter.
Comment 6 Mark Linimon 2004-11-20 05:54:11 UTC
Adding to audit trail from email from maintainer:

Subject: Re: FreeBSD ports Problem Reports for ports you maintain
Date: Wednesday 20 October 2004 06:30 pm
From: Alex Semenyaka <alex@semenyaka.ru>

I could not reproduce the problem described since May 2004. Strace is
frequently used by me so I hope that the problem does not exist
anymore and was inspired by the changes in the kernel code.

        SY, Alex

-------------------------------------------------------

To submitter: does the problem still persist in 5.3R?
Comment 7 Drazen Kacar 2004-12-26 16:15:21 UTC
Happened to me too, with 5.2.1 and 5.3. Attached patch fixes the problem.
I didn't test on 4.x systems.

-- 
 .-.   .-.    Yes, I am an agent of Satan, but my duties are largely
(_  \ /  _)   ceremonial.
     |
     |        dave@fly.srk.fer.hr
Comment 8 Florent Thoumie freebsd_committer freebsd_triage 2005-04-12 08:55:52 UTC
State Changed
From-To: feedback->closed

Patch committed, Nate said it fixed this issue in private email.